Commit Graph

9462 Commits

Author SHA1 Message Date
Max Kellermann
5f66af3712 fs/io/BufferedReader: add missing Consume() call 2016-08-16 11:47:31 +02:00
Max Kellermann
31ae50b137 fs/io/BufferedReader: add method ReadFull() 2016-08-16 08:46:44 +02:00
Max Kellermann
87e0459fcc util/WritableBuffer: add method skip_front() 2016-08-16 08:46:30 +02:00
Max Kellermann
07e58ae64f fs/io/FileReader: add missing include 2016-08-16 07:58:44 +02:00
Max Kellermann
a88d18148c fs/io/FileOutputStream: change #if to #ifdef 2016-08-16 07:49:30 +02:00
Max Kellermann
1cf43a9dc9 fs/io/FileOutputStream: add missing include 2016-08-16 07:49:01 +02:00
Max Kellermann
196ce8426b fs/io/FileOutputStream: decouple from the FileSystem library 2016-08-15 22:42:44 +02:00
Max Kellermann
6a95c34a81 fs/io/FileOutputStream: use C++11 initializers 2016-08-15 22:34:53 +02:00
Max Kellermann
ea0e6d9824 fs/FileSystem: RemoveFile() throws exception on error 2016-08-15 22:25:15 +02:00
Max Kellermann
14d3da0e18 fs/FileSystem: remove unused FOpenModes 2016-08-15 22:21:34 +02:00
Max Kellermann
b6b8fb7d73 PlaylistFile: use TruncateFile()
As a side effect, "playlistclear" no longer creates a new playlist if
the given one doesn't yet exist.
2016-08-15 22:19:55 +02:00
Max Kellermann
2bca3cd247 fs/FileSystem: add TruncateFile() 2016-08-15 22:13:38 +02:00
Max Kellermann
22a353b8e3 event/SignalMonitor: fix obsolete nullptr check in SignalCallback() 2016-08-15 12:40:16 +02:00
Max Kellermann
743fa73a01 Merge branch 'v0.19.x' 2016-08-15 12:33:07 +02:00
Max Kellermann
a546bfe7d9 decoder/wildmidi: support libWildMidi 0.4 2016-08-15 10:08:35 +02:00
Max Kellermann
25deae6cc7 decoder/wildmidi: move code to wildmidi_output() 2016-08-15 10:07:08 +02:00
Nils Schneider
62000670e3 Support S24_P32/S32/FLOAT sample formats on Pulse
This is based on a patch from Ian Scott in 2014. It was never committed,
so I figured I'd fix the outstanding issue and resubmit it.

https://www.mail-archive.com/mpd-devel%40musicpd.org/msg00139.html
2016-08-15 10:02:29 +02:00
Max Kellermann
ac49043fbb output/pulse: move variable declaration down 2016-08-15 10:02:22 +02:00
Jacob Vosmaer
4d6192adcd Use a ScopeLock around condition.wait() 2016-08-07 15:47:21 +02:00
Jacob Vosmaer
9f1ada898e Improve readability of frame completion loop 2016-08-07 14:15:55 +02:00
Jacob Vosmaer
5617521380 Must lock/unlock around wait 2016-08-06 15:25:58 +02:00
Jacob Vosmaer
9835a2545d Do not assume two pops are enough 2016-08-06 15:19:10 +02:00
Jacob Vosmaer
c28cefeeb0 output/osx: wait-free render callback
Closes https://bugs.musicpd.org/view.php?id=4537 .

Removed the 'cancel' function because it violates 'single producer,
single consumer'.
2016-08-06 00:08:10 +02:00
Max Kellermann
afd5b750dc release v0.19.18
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJXpMKjAAoJECNuiljG20USti8QAJC6Y/wnyBgE8bGGynhNKoIy
 H5GQP9a3iFAiZ4ZBQ6jJAVMhRVzStxqTvYdU8ISbrE9Sw92i37ZaUwvbOcMGjN8G
 vm3oTSsPaQKABuaeNo0vdWDKEUIjXIFzyXL31SnGVCkS3KMLFUcq5p4/9OaFtxiD
 dMshfi8S+g5MLZf1xf6sviTwHTNQJYYMOEGDlq9E21UorwA5jN22dgYRiEoYAPrv
 eOCO+N+N7N3VazIN+Y2L0cU3NtJpRvtv001UcfP0oSb12bysSepCCVc02sYQYIY6
 W0LCjgzAbLX5nxyNDR75cjwPZlVDXhulesUVg/0uEEITdwmd8E3MtAxygsSTth6r
 fNo6NThceoD10T/HgSCaU/vXOV5MNw3oVwc4Q/aoCoPryuNGeN9vDIro3+EaPdsW
 6cfBMTYIU3iWpdNt+WI1mTf2aD4RvWWb0C7kgD6CF2QUm8aBRSHmQAnua0cWvlx9
 SSMhG7p4FXrLAveuqaPfDItsQ9IA8oW9E6nxgD8W7eCHEo+fUa1D8Ymfjl7Qcldb
 WdT2u38PmF7s/z+YwrFWTISwdDieYq/XC7xPibUYDJQzqBmBksB07sJUwVAO6xF2
 YhVlHhhIhYajD4n0VCLuC2QzRgoLEhaNstlK/q01lGZbW4F9/dNuZ2Fe/O+yWsLH
 ksxyC62N4oy10f8/PSp1
 =48Tb
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.18'

release v0.19.18
2016-08-05 18:51:38 +02:00
Max Kellermann
d042ab87da decoder/Thread: delete the InputStream on error
Fixes memory leak after stream failure.  See
https://bugs.musicpd.org/view.php?id=4562
2016-08-05 18:15:30 +02:00
Max Kellermann
588303b78d lib/nfs/Manager: add Compare(ManagedConnection, ManagedConnection)
Required for Boost 1.61, which uses that overload in a BOOST_ASSERT().
2016-08-05 18:06:07 +02:00
Max Kellermann
5834843b8a decoder/ffmpeg: fix the AVCodecParameters API check
Turns out the libavcodec version numbers are not linear;  the feature
was added in FFmpeg 3.1 commit 998e1b8, libavcodec 57.14.0; but FFmpeg
3.0 has version 57.48.101.  Ouch!
2016-08-02 19:15:23 +02:00
Max Kellermann
2777a23672 Merge branch 'v0.19.x' 2016-07-29 20:25:59 +02:00
Max Kellermann
762f3afb9d decoder/sidplay: allow building with libsidplayfp instead of libsidplay2
https://bugs.musicpd.org/view.php?id=4558
2016-07-29 19:32:21 +02:00
Max Kellermann
7fb2f15a1a decoder/ffmpeg: check avformat_open_input() return value 2016-07-29 19:32:21 +02:00
Max Kellermann
7456dccd3a decoder/ffmpeg: FfmpegOpenInput() returns Error 2016-07-29 19:32:21 +02:00
Max Kellermann
245f41bb7e decoder/ffmpeg: fix endless recursion in FfmpegScanStream()
Was accidently added by commit cafc266e0
2016-07-29 19:32:21 +02:00
Max Kellermann
9bfb844cfa decoder/sidplay: read the "date" tag 2016-07-29 17:47:08 +02:00
Max Kellermann
d790d3ba3c decoder/sidplay: add GetInfoString() 2016-07-29 17:38:04 +02:00
Max Kellermann
c3dbc92766 decoder/sidplay: use SidTune::getStatus() 2016-07-29 17:31:34 +02:00
Max Kellermann
0bd25f1e17 decoder/sidplay: log detailed error message 2016-07-29 17:04:38 +02:00
Max Kellermann
a4cd7411e8 decoder/sidplay: remove unnecessary error check
The ReSIDBuilder constructor cannot fail.
2016-07-29 17:03:26 +02:00
Max Kellermann
bf276f6235 decoder/sidplay: use SidTune::getStatus() 2016-07-29 16:58:58 +02:00
Max Kellermann
071cacc9a4 decoder/sidplay: pass SidTuneMod to get_song_length()
Eliminate duplicate SidTune construction.
2016-07-29 14:56:05 +02:00
Max Kellermann
33f33323af decoder/sidplay: simplify the SidDatabase::length() call 2016-07-29 14:55:58 +02:00
Max Kellermann
388fae2c47 decoder/sidplay: include cleanup 2016-07-29 14:55:28 +02:00
Max Kellermann
9f878b77e9 decoder/sidplay: use class SidDatabase
Remove our own songlength database parser.
2016-07-29 14:55:28 +02:00
Max Kellermann
a547d2aaba decoder/sidplay: use config_param::GetBlockPath() 2016-07-29 14:55:28 +02:00
Max Kellermann
c013026821 decoder/sidplay: make "songlength_file" local 2016-07-29 14:55:28 +02:00
Max Kellermann
96b48a2404 decoder/sidplay: pass parsed path to get_song_length()
Eliminates duplicate ParseContainerPath() call.
2016-07-29 14:55:28 +02:00
Max Kellermann
9612975c2c decoder/sidplay: merge get_container_name() and get_song_num() 2016-07-29 14:55:28 +02:00
Max Kellermann
41bfd45a2e fs/Path: make IsAbsolute() const 2016-07-29 14:55:28 +02:00
Max Kellermann
bbdcbd1f08 fs/Path: add methods GetBase() and GetDirectoryName() 2016-07-29 14:55:28 +02:00
Max Kellermann
6b3c525a9d db/update/ExcludeList: declare exclude_list_domain only if HAVE_GLIB 2016-07-29 14:55:28 +02:00
Max Kellermann
83aed7051c output/shout: rename "encoding" to "encoder"
The user manual specifies "encoder", which is consistent with other
output plugins.  "encoding" should be deprecated.
2016-07-29 10:52:03 +02:00
Max Kellermann
77c6e45e65 Compiler.h: require gcc 4.7 or newer
The ScopeExit library uses C++11 initializers, which gcc 4.6 does not
support.  Let's kill support for this ancient incomplete C++11
compiler, nobody should be using it anymore.
2016-07-29 09:52:23 +02:00
Max Kellermann
8825393660 decoder/ffmpeg: use avcodec_alloc_context3()
This commit suppresses the remaining deprecation warnings with FFmpeg 3.1.
2016-07-29 09:20:36 +02:00
Max Kellermann
2b9246c6ad decoder/ffmpeg: use avcodec_send_packet() and avcodec_receive_frame() on FFmpeg 3.1 2016-07-29 09:20:05 +02:00
Max Kellermann
a9edb4de28 decoder/ffmpeg: use AtScopeExit() for safe cleanup 2016-07-29 09:08:14 +02:00
Max Kellermann
a076ddf38c util/ScopeExit: new utility library
Similar to boost::scope_exit, but fewer include dependencies.
2016-07-29 09:07:58 +02:00
Max Kellermann
0c809fbb40 Merge branch 'v0.19.x' 2016-07-29 09:00:20 +02:00
Max Kellermann
cafc266e0b decoder/ffmpeg: merge avformat_close_input() calls 2016-07-28 20:38:07 +02:00
Max Kellermann
a3d020eff9 decoder/ffmpeg: use AVCodecParameters on FFmpeg 3.1
The AVCodecContext attribute is deprecated.
2016-07-28 19:50:25 +02:00
Max Kellermann
8412d94d05 decoder/ffmpeg: add GetCodecParameters()
Preparing for FFmpeg 3.1 support.
2016-07-28 19:49:47 +02:00
Max Kellermann
d1c5bb956a decoder/ffmpeg: move code to IsAudio() 2016-07-28 19:49:45 +02:00
Max Kellermann
70986bc120 decoder/ffmpeg: move code to FfmpegSendFrame() 2016-07-28 19:49:18 +02:00
Max Kellermann
f31fe8b865 decoder/ffmpeg: include cleanup 2016-07-28 19:49:17 +02:00
Max Kellermann
142a9fe530 decoder/ffmpeg: move code to pcm/Interleave.cxx 2016-07-28 19:49:13 +02:00
Max Kellermann
4dd2ad9b27 decoder/ffmpeg: check for commands earlier
Improve initial seek by not reading/decoding the first frame before
checking for the seek command.
2016-07-28 19:48:27 +02:00
Max Kellermann
62f7375804 decoder/ffmpeg: simplify mpd_ffmpeg_open_input() 2016-07-28 19:48:25 +02:00
Max Kellermann
543296b5ba decoder/ffmpeg: move code to lib/ffmpeg/Init.cxx 2016-07-28 19:48:22 +02:00
Max Kellermann
5fee130d00 decoder/ffmpeg: move code to lib/ffmpeg/LogCallback.cxx 2016-07-28 19:47:49 +02:00
Max Kellermann
073facea70 decoder/ffmpeg: remove obsolete comment 2016-07-28 19:47:47 +02:00
Max Kellermann
dbe3b6eee4 decoder/ffmpeg: convert enums to constexpr 2016-07-28 19:47:36 +02:00
Max Kellermann
df97049647 decoder/ffmpeg: move struct AvioStream to FfmpegIo.hxx 2016-07-28 19:47:31 +02:00
Max Kellermann
42c5f68362 decoder/ffmpeg: use AVStream::duration
Use the duration of the stream we're actually decoding - not the
"global" attribute AVFormatContext::duration which may differ.
2016-07-28 19:47:24 +02:00
Max Kellermann
cc19e760cf decoder/ffmpeg: use more references 2016-07-28 19:45:22 +02:00
Max Kellermann
0ff22a16fa decoder/ffmpeg: move code to lib/ffmpeg/Time.hxx 2016-07-28 19:45:11 +02:00
Max Kellermann
47360ec906 decoder/ffmpeg: use av_free() instead of av_freep() 2016-07-28 19:45:07 +02:00
Max Kellermann
087a9938d2 decoder/ffmpeg: add API documentation 2016-07-28 19:45:05 +02:00
Max Kellermann
26d8e41a6b decoder/ffmpeg: copy_interleave_frame() returns ConstBuffer 2016-07-28 19:45:01 +02:00
Max Kellermann
750ae1d3f3 decoder/ffmpeg: copy_interleave_frame() returns Error 2016-07-28 19:44:42 +02:00
Max Kellermann
f8a9a7a108 decoder/ffmpeg: simplify ffmpeg_send_packet() 2016-07-28 19:44:39 +02:00
Max Kellermann
eb192137d6 decoder/ffmpeg: copy the AVPacket in ffmpeg_send_packet()
Revert commit 70495aad by rewriting it.  Turns out, in old FFmpeg
versions, copying the AVPacket is necessary.
2016-07-28 19:42:25 +02:00
Max Kellermann
c25b464f37 decoder/ffmpeg: move code to class FfmpegBuffer 2016-07-27 17:31:02 +02:00
Max Kellermann
710b48d410 decoder/ffmpeg: log detailed error message 2016-07-27 17:28:12 +02:00
Max Kellermann
5e77a8199d decoder/ffmpeg: remove obsolete comment 2016-07-27 17:28:12 +02:00
Max Kellermann
6637db086b decoder/ffmpeg: add "pure" attributes 2016-07-27 17:28:12 +02:00
Max Kellermann
a271a55da7 decoder/ffpmeg: make variables more local 2016-07-27 17:28:12 +02:00
Max Kellermann
6eeec6cbfa decoder/ffpmeg: simplify ffmpeg_send_packet() 2016-07-27 17:22:13 +02:00
Max Kellermann
5e3f3b0400 decoder/ffpmeg: rename functions to CamelCase 2016-07-27 17:18:58 +02:00
Max Kellermann
923c402f69 decoder/ffmpeg: optimize ffmpeg_scan_dictionary()
Don't scan tag items if the handler doesn't implement the tag()
method.
2016-07-27 17:17:14 +02:00
Jacob Vosmaer
ad80acb22a output/osx: remove incorrect memset behavior
In e068d62 I added code that zeros the remainder of the output buffer
if there are not enough input frames available. I have now learned
that we can signal to the caller of the render callback how much data
is in the output buffers. In practice, the input buffer is so large
that it does not matter so much how we handle input buffer underruns,
but I suppose that saying 'there is no data' is better than 'here is
some silence for you'.
2016-07-22 20:58:37 +02:00
Max Kellermann
bd8414f8ea Merge branch 'osx-channelmap' of git://github.com/jacobvosmaer/MPD 2016-07-14 09:19:24 +02:00
Max Kellermann
44219d5e91 decoder/flac: refactor flac_convert() to class FlacPcmImport 2016-07-11 23:34:55 +02:00
Max Kellermann
b9de3270f6 decoder/flac: specialize "stereo" for all bit depths 2016-07-11 23:33:34 +02:00
Max Kellermann
590d6faeb0 decoder/flac: convert flac_convert_*() to templates 2016-07-11 23:27:57 +02:00
Max Kellermann
62e96e9a58 decoder/flac: pass number of frames to flac_convert() 2016-07-11 23:24:48 +02:00
Max Kellermann
1c818ef0a0 decoder/flac: improve warning message about unsupported bit depth 2016-07-11 23:13:33 +02:00
Max Kellermann
d6ce2e3671 decoder/flac: move functions into struct FlacDecoder 2016-07-11 23:11:22 +02:00
Max Kellermann
85b6a52662 decoder/flac: use C++11 initializers 2016-07-11 22:44:39 +02:00
Max Kellermann
0246082b9b decoder/flac: move position code to FlacDecoder::GetDeltaPosition() 2016-07-11 22:38:26 +02:00
Max Kellermann
3b031c6ba5 decoder/flac: throw exception on FLAC__stream_decoder_new() failure 2016-07-11 22:38:03 +02:00
Max Kellermann
74740ca50b decoder/flac: add class FlacStreamDecoder wrapping a FLAC__StreamDecoder* 2016-07-11 22:37:55 +02:00
Max Kellermann
631baa7120 decoder/flac: eliminate redundant FlacDecoder attributes 2016-07-11 22:37:52 +02:00
Max Kellermann
657d6edff7 decoder/flac: add FlacInput getter methods 2016-07-11 22:37:49 +02:00
Max Kellermann
737c5a9549 decoder/flac: rename struct flac_data to FlacDecoder 2016-07-11 22:37:46 +02:00
Jacob Vosmaer
4cd9abe632 output/osx channel_map feature 2016-07-09 18:29:35 +02:00
Max Kellermann
b67e7df38e release v0.19.17
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJXgCv6AAoJECNuiljG20USR3cP/RALB4qlhecMo6H8VwZvfjiA
 FHfhBKfdpHM3U3EEIZc1zxwHIdWk1yELtmx298vmJbWUifpYAYarXF5497tZf2XE
 AVfhTltEJEd7xB5ZULnEScM1aHzMZm5HRcHwM1UqNCsXP7PT8fmpk7gw19pKOChT
 h8V3+tpC403lCIcHcJGlkuzgZvKIZDs73g7a0+4GxD9XRAPwnMYRl3Cfd8QjKT/U
 r67AcOwQlS6hWJFs0K1JjOQwfwbRq2YmuOmFJua6n8O6CI/7t4h3faSQ0V/5qjFd
 k/pAMRtX6mz3mjVhZv4cuMy+QILWlxUNwLBIwtxSfbwcFKrN0vtIRG8O9622hTs2
 +mvYiVboWABk6hnukiDAfki96jWYHlsCJR5oIK9DZ4nBe5RVp0r9Nq/ook2AW2it
 6VgYIDBI5zS/blyJzXtzDVWEtSmLFxm21JSl+jHfWDtL6/rQGimdVOFkRw40oCBz
 seYb5kIbilrg6xq1KiBMT+EWmXMf+q+3YWQsu01blXGYGPhpUqhIr0h/qUfWAqMs
 fwIsoxsTrkQQjEWb6YWupPrdOLZ+kTAyaK+7v8B8JmzS/H3SohusMPUZKsQXl82s
 5LJVLtVxB9WRRmpfSoYqfk7CkTHOktCzVmiHb/FYUYElS9VKmJYYU8XQ25snCoZ6
 bYtERsH28q8rrpkWWEXP
 =IXD5
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.17'

release v0.19.17
2016-07-09 00:46:09 +02:00
Max Kellermann
ab95027fc6 decoder/flac: suppress warning at end of stream
This is required if a stream ands without another chained FLAC file.
2016-07-08 23:19:47 +02:00
Max Kellermann
ed3bc4ab63 decoder/flac: move code to FlacInitAndDecode() 2016-07-08 23:03:49 +02:00
Max Kellermann
68064f1aa6 decoder/flac: move duplicate code to flac_data::Initialize() 2016-07-08 22:44:23 +02:00
Max Kellermann
475ac76a5f decoder/flac: late "total_frames" initialization 2016-07-08 22:43:31 +02:00
Max Kellermann
79d4f8674c decoder/flac: remove "duration" parameter from flac_decoder_initialize()
It's always 0.
2016-07-08 22:41:19 +02:00
Max Kellermann
e42eed4d4c decoder/flac: remove pointless check 2016-07-08 22:41:19 +02:00
Max Kellermann
4a7042e847 decoder/flac: handle unknown duration correctly
If the duration is unknown, pass SignedSongTime::Negative(), as
documented for decoder_initialized().
2016-07-08 22:33:49 +02:00
Max Kellermann
7f36923eb4 decoder/flac: pass SignedSongTime to decoder_initialized() 2016-07-08 22:32:23 +02:00
Max Kellermann
2ca8d69126 decoder/flac: document flac_data::position 2016-07-08 22:20:16 +02:00
Max Kellermann
70367d70c8 decoder/flac: remove obsolete sub-song support
This is obsolete because it has been moved to the MPD core.
2016-07-08 21:59:30 +02:00
Jacob Vosmaer
e068d62ac6 output/osx rewrite render callback 2016-07-08 15:36:42 +02:00
Max Kellermann
e6389ff5a1 client/ClientRead: call Break() before Close()
Referencing the attribute "partition" is illegal after Close(),
because Close() deletes "this".
2016-07-07 13:54:04 +02:00
Max Kellermann
b46cf57d98 event/BufferedSocket: OnSocketReady() returns true after close
Fixes use-after-free bug (https://bugs.musicpd.org/view.php?id=4548).
2016-07-07 13:52:20 +02:00
Max Kellermann
6f59d71e07 decoder/API: check initial_seek_running in _check_cancel_read()
The "seeking" flag is not set for the initial seek, and so
decoder_read() could be canceled when another SEEK was emitted during
initial seek.

This fixes several seek problems, for example the one reported for the
FLAC decoder plugin:

 https://bugs.musicpd.org/view.php?id=4552
2016-07-06 15:46:04 +02:00
Max Kellermann
f9130f42a2 decoder/flac: try to recover from seek error()
libFLAC API documentation suggests that FLAC__stream_decoder_flush()
should be called to recover from FLAC__STREAM_DECODER_SEEK_ERROR.
2016-07-05 19:29:56 +02:00
Max Kellermann
faf2eeaa99 decoder/flac: evaluate all possible FLAC__stream_decoder_get_state() values
Stop after all fatal errors.  This fixes assertion failures in
libFLAC.
2016-07-05 19:27:40 +02:00
Max Kellermann
1c7de0b4ac output/shout: remove pointless memset() call 2016-07-05 18:02:35 +02:00
Max Kellermann
58487e484f filter/route: use PcmSilence() 2016-07-05 18:01:29 +02:00
Max Kellermann
104075f3e0 PlayerThread: use PcmSilence() in SendSilence()
No change for regular PCM, but DSD uses 0x69 now.
2016-07-05 18:01:29 +02:00
Max Kellermann
b8097eaf2e pcm/Volume: move silence pattern to Silence.cxx 2016-07-05 17:52:53 +02:00
Max Kellermann
5eb0cbc887 PlayerThread: make chunk allocation error non-fatal in SendSilence()
Fixes abort after seeking on fast machines.
2016-07-05 17:44:45 +02:00
Max Kellermann
1a4a6f3807 filter/Observer: fix memory leak 2016-07-04 15:25:21 +02:00
Max Kellermann
a012b25335 filter/convert: fix no-op check
Commit 3a212412 changed the meaning of out_audio_format, but I forgot
to apply this to ConvertFilter::FilterPCM().

See https://bugs.musicpd.org/view.php?id=4551
2016-07-04 15:17:03 +02:00
Jacob Vosmaer
2fdbae3e1f Remove braces 2016-07-03 16:45:23 +02:00
Jacob Vosmaer
87e06793c2 Get rid of GetMacOSStatusCommentString 2016-07-03 14:06:53 +02:00
Jacob Vosmaer
8cc451a2e2 Use error.Set instead of error.Format 2016-07-03 13:36:35 +02:00
Jacob Vosmaer
723c2c7fa9 Remove some debugging code 2016-07-03 13:18:44 +02:00
Jacob Vosmaer
4dd2c5cdd5 Convert device name from CFStringRef to char* 2016-07-03 12:59:19 +02:00
Jacob Vosmaer
bdc257b40e Add debug statements 2016-07-02 23:44:21 +02:00
Jacob Vosmaer
4728f7c697 Use AudioComponent instead of Carbon Component 2016-07-02 23:35:44 +02:00
Max Kellermann
07228ff56a tag/Id3Load: use offset_type instead of off_t 2016-07-02 14:00:52 +02:00
Max Kellermann
a61f153df7 system/Error: add missing include 2016-07-02 13:59:47 +02:00
Max Kellermann
34e91850d9 decoder/pcm: assume that audio/L16 is big-endian
See https://bugs.musicpd.org/view.php?id=4547
2016-07-01 21:34:56 +02:00
Max Kellermann
ba8e579e9b pcm/Volume: use 0x69 to generate DSD silence 2016-07-01 21:22:21 +02:00
Max Kellermann
072e39c9cf filter/ReplayGain: skip PcmVolume if a mixer is set
Previously, volume was applied twice: once by PcmVolume, and again by
the hardware mixer.
2016-07-01 21:17:52 +02:00
Max Kellermann
3a21241248 filter/FilterInternal: split class Filter, add class PreparedFilter
For easier state management inside filter plugins.
2016-07-01 21:04:24 +02:00
Max Kellermann
5c75096bcd pcm/Volume: remove assert() from destructor
While this assert() was useful when we had to track the object's state
manually, there was no practical purpose other than verifying old
code, and it complicates our new C++ code.
2016-07-01 21:04:24 +02:00
Max Kellermann
a43b0f5253 mixer/software: move Filter management to the AudioOutput 2016-07-01 18:23:53 +02:00
Max Kellermann
d93271e86d mixer/software: use C++11 initializers 2016-07-01 14:06:08 +02:00
Dimitris Papastamos
4a6df9f961 output/sndio: Remove unused attribute
The variable is actually used in this function.
2016-06-24 09:11:36 +02:00
Dimitris Papastamos
a43ae2369b output/sndio: Add 24-bit 4-byte packed audio format support 2016-06-24 09:11:30 +02:00
Dimitris Papastamos
9a049de859 output/sndio: No need to use a loop in Play()
This is a left-over from the previous version of the code
that was retrying on EINTR.
2016-06-24 09:10:57 +02:00
Dimitris Papastamos
58b8398aa0 output/sndio: Use size_t instead of ssize_t
Some minor style fixes as well.
2016-06-23 11:11:42 +02:00
Max Kellermann
645751f680 output/Init: use C++11 initializers 2016-06-22 18:44:00 +02:00
Dimitris Papastamos
26c0924461 sndio: Eliminate remaining goto usage to conform to MPD style 2016-06-22 16:10:46 +02:00
Dimitris Papastamos
d4f801a8e9 sndio: Fix segmentation fault when audio card is removed
This can happen if you remove an external audio card or if you stop
sndiod(8) while playing a song.

sio_write() will retry internally if it fails with errno == EINTR
so no need to handle that.
2016-06-22 16:10:38 +02:00
Dimitris Papastamos
8406864963 sndio: Allow tweaking application buffer size
It defaults to 250 ms.
2016-06-22 16:09:57 +02:00
Max Kellermann
85ef034fd0 filter/ReplayGain: use C++11 initializers 2016-06-22 12:43:47 +02:00
Max Kellermann
59141f62bb filter/route: use std::array 2016-06-22 12:24:55 +02:00
Dimitris Papastamos
d68cadba7b sndio: No need to use a timer so get rid of it 2016-06-22 11:28:58 +02:00
Max Kellermann
1207fd1f16 output/sndio: remove unnecessary initialization 2016-06-22 11:01:37 +02:00
Dimitris Papastamos
8aa61e230c sndio: Add option to select output device 2016-06-22 11:00:06 +02:00
Max Kellermann
2c7bda8a3b output/sndio: define SIO_DEVANY if it is undefined
Fixes build failure on Debian Wheezy.
2016-06-22 10:58:44 +02:00
Dimitris Papastamos
d58c5dd398 sndio: Implement sndio_test_default_device() 2016-06-22 10:54:59 +02:00
Dimitris Papastamos
171da7a347 Add sndio output plugin 2016-06-22 08:44:47 +02:00
Max Kellermann
3fd70a769a event/SignalMonitor: remove unused function SignalMonitorGetEventLoop 2016-06-20 10:48:34 +02:00
Max Kellermann
4280f84535 event/SignalMonitor: use BoundMethod instead of raw function pointer 2016-06-20 10:46:36 +02:00
Max Kellermann
c3d9c32615 util/BindMethod: add nullptr constructor and bool operator 2016-06-20 10:36:37 +02:00
Max Kellermann
a938b609b9 util/BindMethod: document the default constructor 2016-06-20 10:36:09 +02:00
Max Kellermann
d3c7fac606 thread/Thread: throw std::system_error on error 2016-06-17 19:11:20 +02:00
Max Kellermann
fea3f6cc72 thread/Thread: use C++11 initialisers 2016-06-17 19:11:19 +02:00
Max Kellermann
aee5966e1c input/thread: use C++11 initialisers 2016-06-17 19:10:39 +02:00
Max Kellermann
95e53ac0a0 input/alsa: rebase on AsyncInputStream
Use the snd_pcm_t only in the IOThread, and reuse code that is
well-known to work.
2016-06-17 18:36:54 +02:00
Max Kellermann
5d11759f7d input/async: use class DeferredCall 2016-06-17 18:31:58 +02:00
Max Kellermann
829616534e event/DeferredCall: new class supposed to replace DeferredMonitor
Comes with a callback pointer instead of a virtual method, which
allows multiple instances in one class.
2016-06-17 18:26:29 +02:00
Max Kellermann
863f4d8366 util/BindMethod: new utility class for callbacks
Replaces the old BoundMethod template.
2016-06-17 18:20:19 +02:00
Max Kellermann
bdd0c3686d input/async: use class HugeAllocation 2016-06-17 18:06:02 +02:00
Max Kellermann
91769d536d util/HugeAllocator: add class HugeAllocation 2016-06-17 18:01:13 +02:00
Max Kellermann
9500343d85 util/HugeAllocator: add "noexcept" 2016-06-17 17:59:45 +02:00
Max Kellermann
ef053035d0 util/HugeAllocator: throw std::bad_alloc on error 2016-06-17 17:57:40 +02:00
Max Kellermann
8b903626c2 release v0.19.16
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJXXuZbAAoJECNuiljG20USSegP/1gYoDyp4vDDCcRBNZkr3hlE
 VbFyEz06/chfUTCRWFxtM6ghVMzSpqv7I8wDA8zv22NTkForVWD3gjimtJqJ/R4w
 aT7QMZJmJUIH0Uf+dRp98YRG7m5S1Y5JkKEYu4oxQOECxbNMPd+ilbb6wwr2pYZ/
 k2ks+oyYtPgqtWlriIbJMwXOyQEfqNCJgzxUzC2U6idVALYpj+5aK+VTY4Nk1YXw
 nLAu8TT40jNYFfss0bDYBzQbm/82m8Q9JIkmoOpX/3WaRaCjaVza7IvRKgDPZutJ
 mmrtu5SJ+QgLQLaXvav84KwtXhDbJu4zEbC7tUL0LGSmzbpiiz2DSUJP2jQ0C6nS
 wgcACFkHGBLOjKNbjDB1eUhS7ouzxTGgPlsMC89254R7XQP/5EV9H3Quxb48Bxq7
 PuW6nNHytppfAIZP18X62oL8hpSgwK1zLe34jzayJlkGIg5O1he4FcJQykvlzrjm
 fBvL+hX3TM9exfASQujNXVgxFGPmgb37bE2aQyxZunE1DltJWfHyOhdme9vCuEcB
 acz8gR/jcp8OKe4RCEdD1g86CSW2wlMfKfnzuwPPhcw0L3kz6OYcjRr2oMae7uG0
 /NFw+PcdHcVKXjiRoJsdCvtN+jRtJhCUn314IskgyKad/UNcELbo7WDBUqHC36Wg
 ncM6Sis4oal4jPXJ2JoE
 =6ee1
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.16'

release v0.19.16
2016-06-13 19:03:59 +02:00
Max Kellermann
4ecd325371 decoder/flac: log seek errors 2016-06-13 18:37:45 +02:00
Max Kellermann
021519f295 command/QueueCommands: eliminate duplicate code in handle_addid() 2016-06-13 18:28:03 +02:00
Max Kellermann
e83685d667 Merge branch 'addid-with-pos' of git://github.com/ewollesen/MPD 2016-06-13 18:27:21 +02:00
Eric Wollesen
81a198a76a return id for "addid" with position
Previously the id was being returned only when a position wasn't
specified.
2016-06-13 10:14:20 -06:00
Max Kellermann
5771d67202 player/Thread: cancel outputs before seeking
.. instead of doing it after seeking.  After seeking, the command had
no effect, because CheckDecoderStartup() waits for all outputs to
finish.  This caused a very long delay while seeking and switching
songs (https://bugs.musicpd.org/view.php?id=4534).
2016-06-13 09:13:56 +02:00
Lazaros Koromilas
b2b7974ba0 util/WStringAPI: wcpcpy(3) is not yet supported on OpenBSD/NetBSD
Signed-off-by: Lazaros Koromilas <lostd@2f30.org>
2016-06-12 16:36:17 +02:00
Lazaros Koromilas
f59ca94416 net/Resolver: correct includes for gettaddrinfo(3)
Signed-off-by: Lazaros Koromilas <lostd@2f30.org>
2016-06-12 16:36:17 +02:00
Max Kellermann
22ff0d80ce decoder/pcm: add MIME type "audio/x-mpd-float" 2016-06-10 23:06:21 +02:00
Max Kellermann
5a22a0c27d decoder/pcm: implement RFC 2586 (audio/L16)
https://bugs.musicpd.org/view.php?id=4525
2016-06-10 22:52:35 +02:00
Max Kellermann
287ef181ba util/MimeType: add ParseMimeTypeParameters() 2016-06-10 22:52:35 +02:00
Max Kellermann
92cdea123e TagStream, decoder/Thread, ...: ignore MIME type parameters for matching plugins 2016-06-10 22:24:13 +02:00
Max Kellermann
e4c7e343c8 util/StringUtil: use CamelCase 2016-06-10 22:08:13 +02:00
Max Kellermann
2ee43c403c decoder/vorbis: reimplement using class OggDecoder
Use libvorbis instead of libvorbisfile, which gives us more control
over the decoding process.
2016-05-14 12:31:12 +02:00
Max Kellermann
24fa3f5e7b Revert "decoder/Thread: flush last chunk only on success"
This reverts commit 995cd95474.  It was
a bad idea because it caused assertion failures when a decoder plugin
aborted with an exception.
2016-05-14 12:31:12 +02:00
Max Kellermann
bbbda7f812 decoder/opus: move code to new class OggDecoder
Prepare to reuse the same code for a new Vorbis decoder plugin based
on libvorbis instead of libvorbisfile.
2016-05-14 11:31:31 +02:00
Max Kellermann
e958900380 decoder/vorbis: reimplement _scan_stream() with plain libvorbis 2016-05-14 10:52:52 +02:00
Max Kellermann
74926c1dd3 decoder/opus: move _scan_stream() code to OggReadPacket() 2016-05-14 10:39:53 +02:00
Max Kellermann
2654888782 decoder/OggFind: move to lib/xiph/ 2016-05-14 10:34:05 +02:00
Max Kellermann
b5ecfb4c9a decoder/opus: move code to class OggVisitor 2016-05-13 13:37:49 +02:00
Max Kellermann
07fa3764ef lib/xiph/OggStreamState: add wrapper for ogg_stream_reset() 2016-05-13 13:37:45 +02:00
Max Kellermann
5acc77a163 decoder/opus: change return types to void 2016-05-13 13:24:32 +02:00
Max Kellermann
0709878b4c decoder/API: add class StopDecoder 2016-05-13 13:23:24 +02:00
Max Kellermann
662e477028 decoder/opus: throw exceptions instead of returning DecoderCommand::STOP 2016-05-13 13:18:19 +02:00
Max Kellermann
b7b7c381ee decoder/Thread: catch exceptions
Allow decoders to throw std::runtime_error.
2016-05-13 13:01:39 +02:00
Max Kellermann
995cd95474 decoder/Thread: flush last chunk only on success 2016-05-13 13:01:31 +02:00