Commit Graph

11511 Commits

Author SHA1 Message Date
Max Kellermann 3fc9d50adb doc/user: fix --with-systemdsystemunitdir example 2016-12-13 10:24:10 +01:00
Max Kellermann c2da6dd45b test/test_queue_priority: fix unit test failure after recent "setprio" change 2016-12-13 08:36:42 +01:00
Max Kellermann 7146f825b2 decoder/ffmpeg: fix double free bug
From the avformat_open_input() API documentation:

 "Note that a user-supplied AVFormatContext will be freed on failure."

https://bugs.musicpd.org/view.php?id=4607
2016-12-13 08:34:05 +01:00
Max Kellermann f61a5f5200 configure.ac: prepare for 0.19.21 2016-12-13 08:31:21 +01:00
Max Kellermann dc05dd7ca1 output/Multiple: make chunk_is_consumed_in() an AudioOutput method 2016-12-11 21:59:28 +01:00
Max Kellermann 57dd344f3b decoder/wavpack: implement WavpackStreamReader64 if available 2016-12-10 00:24:54 +01:00
Max Kellermann f7f59df8aa decoder/wavpack: move code to WavpackInput methods 2016-12-10 00:17:46 +01:00
Max Kellermann 0525a6f90f decoder/wavpack: use WavpackSeekSample64() if available 2016-12-10 00:12:47 +01:00
Max Kellermann 7b4305d81b decoder/wavpack: seek errors are fatal
The libWavPack documentation says:

 "After a FALSE return the file should not be accessed again (other
 than to close it); this is a fatal error."
2016-12-10 00:11:29 +01:00
Max Kellermann 94e9e93fa4 ReplayGainGlobal: move replay_gain_config into struct Config
Yet another global variable removed.
2016-12-10 00:03:29 +01:00
Max Kellermann d2a1294e9a Main: add struct Config, empty currently 2016-12-10 00:00:50 +01:00
Max Kellermann 3d897f18cd test/read_tags: use ScanGenericTags(InputStream&) after ScanStream() 2016-12-09 23:53:16 +01:00
Max Kellermann 68c14d1e53 test/read_tags: catch exceptions from ScanFile() before falling back to ScanStream() 2016-12-09 23:53:16 +01:00
Max Kellermann 48089394a5 test/read_tags: use AtScopeExit() 2016-12-09 23:53:16 +01:00
Max Kellermann 30bd190b41 decoder/wavpack: implement scan_stream() 2016-12-09 23:23:35 +01:00
Max Kellermann cf93cd9307 decoder/wavpack: convert WavpackInput::client to pointer 2016-12-09 23:23:02 +01:00
Max Kellermann f40816e063 decoder/wavpack: add WavpackOpen() wrappers which throw exception 2016-12-09 23:15:40 +01:00
Max Kellermann 3759f29852 decoder/wavpack: move wavpack_scan_file() down 2016-12-09 23:15:06 +01:00
Max Kellermann bc5555933f decoder/wavpack: support native DSD 2016-12-09 23:08:54 +01:00
Max Kellermann ead7ae8504 decoder/wavpack: use template for format_sample_X() 2016-12-09 22:53:01 +01:00
Max Kellermann ad5abba8c6 decoder/wavpack: move 8 and 16 bit conversion to separate functions 2016-12-09 22:49:07 +01:00
Max Kellermann 61296cedd2 decoder/wavpack: rename format_samples_float() to format_samples_nop() 2016-12-09 22:47:32 +01:00
Max Kellermann d9c29a2c4f decoder/wavpack: use std::copy_n() 2016-12-09 22:23:19 +01:00
Max Kellermann f5172e6b84 decoder/wavpack: use int16_t instead of uint16_t
Technically, these samples are signed.  There was no practical
difference, only the declaration was formally wrong.
2016-12-09 22:21:31 +01:00
Max Kellermann 544bcbe903 decoder/wavpack: use WavpackGetNumSamples64() if available 2016-12-09 22:09:32 +01:00
Max Kellermann f35dab1b56 decoder/wavpack: check WavpackGetNumSamples()==-1 2016-12-09 21:46:29 +01:00
Max Kellermann caee420087 decoder/wavpack: move code to GetDuration() 2016-12-09 21:45:22 +01:00
Max Kellermann e8c374113e decoder/wavpack: make is_float const 2016-12-09 21:30:31 +01:00
Max Kellermann 98a241a730 decoder/wavpack: use WavpackGetReducedChannels()
Since we don't use OPEN_2CH_MAX, this should be equal to
WavpackGetNumChannels() - but who knows, maybe a future libWavPack
version breaks this assumption.
2016-12-09 21:23:38 +01:00
Max Kellermann be8297d6f6 decoder/wavpack: basic DSD support (WavPack 5)
Enable OPEN_DSD_AS_PCM if available.  No OPEN_DSD_NATIVE yet.

 https://bugs.musicpd.org/view.php?id=4606
2016-12-09 21:03:47 +01:00
Max Kellermann 09da80e9f4 tag/ApeTag: don't export ape_tags[] 2016-12-09 20:59:07 +01:00
Max Kellermann df4ecf63a8 decoder/wavpack: disable OPEN_TAGS
Use MPD's internal APE tag code, which works just as well.  This
removes some duplicate code for reading tags and ReplayGain.
2016-12-09 20:53:54 +01:00
Max Kellermann b4d1937857 decoder/wavpack: change norm_offset to 0
MPD uses a floating point range from -1 to +1 internally - why ask
libwavpack to use -32768..+32768 only to reduce it back to -1..+1
afterwards?
2016-12-09 20:53:45 +01:00
Max Kellermann 0be5fbdc35 decoder/wavpack: use AtScopeExit() 2016-12-09 20:53:04 +01:00
Max Kellermann ae7e25ea65 release v0.19.20
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlhLAzUQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEp8ED/92V7el1LsuifbIKP4xFmHfENxB5bzBCQHZ
 f4DlGybr7pA4FZQIR5Z0qulvVr+sdY0Y8hgSoOCKzmHGuOgQ6zxHVGVMWLY5N0JN
 ExOrSGUhIjNV+L06LA/YDOE4Z9VUuSi6ZLx1KSLvFbYWULmoqoQREo001YyrfmYr
 pSq+MosGX7i/lFEOrOzw1keEnOUIlqoEJ8IpPks+Xtkk8159TJS2z2FsgWBnlG5W
 qO/N/Nn+TBZZjsDkOoJcdsQ6ot1ThJgxMWY+fduNP5Fe8s2oCHc8dAdYMyfhQiky
 0xq139T8tLRRJUkv9inK63Zd0sn06/pemDD+XZGNE6arwvTsqriEwPcJHgsJYfaQ
 wqGWv+DrMTGVSZnH+XUACLpUexmd8M6q1MZ3g12tRjQHNM06Yn6PePdHUm4IuclJ
 eGsXEb1+jgr6/tMxYkmjUIs8SacpTK2ZUx4aYIG7+tVNmfGompK1gYlYT86ZVEEh
 byzy7A67C9BpSkuC/4YzXT/oHBpDf7T4WVz1TEKZT3vke6l0CDTwYCQyBcG0NFCe
 Pic45q4RgLbkH6NR4bJ1oX/XRCgh8V2QkLKdgcpzS4Lv+TE2hHRlBf9a7SVufIPT
 yBNlY91nT8zUfws/7LBwfZtYQB7VcudUMlmSigtlrvr9CvpRCuGCCY5vdLxi4LYz
 3lm6wOrp5g==
 =opJg
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.20'

release v0.19.20
2016-12-09 20:18:54 +01:00
Max Kellermann fef45d469c release v0.19.20 2016-12-09 20:02:07 +01:00
Max Kellermann e7353ec7e7 Queue: "setprio" re-enqueues old song if priority has been raised
This commit changes a minor queue priority design to something which
makes a little bit more sense.

Previously, a song that had already been played would only be
re-enqueued if its priority had just been raised above the current
song's.  This means that if it was already above, it was not
re-enqueued.  That is a surprising behavior, because users expect a
song to be played when its priority is raised.

Now the song is always re-enqueued if its priority is raised (and
above the current song's - no matter if it has already been above
before).

 https://bugs.musicpd.org/view.php?id=4592
2016-12-09 13:02:26 +01:00
Max Kellermann e3237f057d systemd: more paranoid security settings 2016-12-09 10:41:44 +01:00
Florian Schlichting 54d5d9d1cc systemd: protect /usr when running under systemd 2016-12-09 10:41:44 +01:00
Clément B 31d9aebf0b systemd: also disable mpd.socket when disabling mpd.service
e.g. when running 'update-rc.d mpd disable'
2016-12-09 10:41:43 +01:00
Max Kellermann 5013de6770 LogInit: convert use_stdout flag to out_fd=STDOUT_FILENO 2016-12-04 20:15:45 +01:00
Max Kellermann 301abac0c1 LogInit: initialize out_fd properly to avoid closing stdin 2016-12-04 20:13:37 +01:00
Max Kellermann 9614c48e4c LogInit: throw exception instead of calling FatalError() 2016-12-04 20:07:41 +01:00
Max Kellermann c6e1ca1c22 system/Error: use std::generic_category() for errno on Windows
It's wrong to use std::system_category() for both GetLastError() and
errno on Windows.  Apparently, everybody uses std::generic_category()
for errno values, which appears to be a safe choice.

Some discussion on this confusing topic can be found here:

 https://stackoverflow.com/questions/28746372/system-error-categories-and-standard-system-error-codes
2016-12-04 20:07:11 +01:00
Max Kellermann 30dc473697 system/Error: allow using errno functions on Windows
The Windows standard library emulates part of POSIX, which includes
errno.
2016-12-04 20:07:09 +01:00
Max Kellermann 65974ceabc PlaylistFile: remove redundant existence check 2016-12-04 20:04:16 +01:00
Max Kellermann 6caf53d1c2 fs/FileSystem: RenameFile() throws exception on error 2016-12-04 19:59:33 +01:00
Max Kellermann dee6e498d9 fs/CheckFile: use IsAccessDenied() 2016-12-04 19:56:25 +01:00
Max Kellermann b3723274f7 decoder/Bridge: move code to DecoderControl::SetReady() 2016-12-03 14:20:51 +01:00
Max Kellermann 9fb7cc796b decoder/Control: add attribute configured_audio_format
Obsoletes the same variable from AudioConfig.cxx.
2016-12-03 14:12:08 +01:00