Commit Graph

11689 Commits

Author SHA1 Message Date
Max Kellermann fb907f5f76 output/Thread: KILL implicitly closes and disables the AudioOutput
Reduce shutdown latency by two commands per output.
2016-12-14 08:29:09 +01:00
Max Kellermann b107a1583f output/MultipleOutputs: move code to AudioOutput::EnableDisableWait() 2016-12-14 08:00:43 +01:00
Max Kellermann ced3f320eb output/MultipleOutputs: reduce lock/unlock calls in EnableDisable()
Use ScopeLock to manage the lock; don't unlock after obtaining the
"really_enabled" flag; keep the same lock during EnableWait() /
DisableWait().
2016-12-14 07:54:05 +01:00
Max Kellermann a9d7293818 output/Thread: wake up the player thread periodically while playing
Without this, the pipe would run empty very often, which may result in
an xrun if the roundtrip to the PlayerThread and back takes too long.
By waking up the PlayerThread before the pipe runs empty, we make MPD
much more latency tolerant, which is a major optimization.
2016-12-13 22:39:49 +01:00
Max Kellermann add42e9edf NEWS: add "player" section 2016-12-13 22:39:49 +01:00
Max Kellermann 265ad4b96a output/Thread: eliminate redundant nullptr check 2016-12-13 22:20:41 +01:00
Max Kellermann 92eeb4969f output/Thread: don't wake up the player after receiving command in Play()
If we have a pending command, then the player thread is already awake.
Even if not, we'll wake it up as soon as we have finished the command.
2016-12-13 22:17:06 +01:00
Max Kellermann 6fcddaf8fa output/Thread: use AtScopeExit() to revert the in_playback_loop flag 2016-12-13 22:15:52 +01:00
Max Kellermann 41fd583fbc output/Thread: eliminate one ScopeLock 2016-12-13 21:57:03 +01:00
Max Kellermann ceba6816de output/Thread: split Open()
Simplify the code, eliminate duplicate rollback code and eliminate the
"goto" kludge.
2016-12-13 21:46:27 +01:00
Max Kellermann 093cb475bb output/Thread: simplify the retry_audio_format declaration 2016-12-13 21:34:43 +01:00
Max Kellermann d44790b35f output/Thread: reduce locking further in Open() 2016-12-13 21:26:28 +01:00
Max Kellermann f8164a3dd1 output/Thread: unlock mutex during OpenFilter() 2016-12-13 21:24:14 +01:00
Max Kellermann c20126598f output/Thread: remove unused variable 2016-12-13 21:24:05 +01:00
Max Kellermann 6c818bb37a AudioFormat: add method WithMask(), shortcut for ApplyMask() 2016-12-13 20:57:46 +01:00
Max Kellermann 8cb160b1f8 test/run_convert: pass out_audio_format to PcmConvert::Open() 2016-12-13 20:57:36 +01:00
Max Kellermann df91f3738a output/Thread: remove a useless out_audio_format setting
Now that I can see the Reopen() method clearly, it is obvious that the
out_audio_format setting will get overwritten by the following Open()
call.
2016-12-13 20:43:29 +01:00
Max Kellermann b5b268f606 output/Thread: remove another redundant "open" check 2016-12-13 20:41:54 +01:00
Max Kellermann ce6b8c94a2 output/Thread: convert redundant runtime check to assertion 2016-12-13 20:29:16 +01:00
Max Kellermann 6e643fe58b output/Thread: don't deinitialize the pipe in Close() 2016-12-13 20:28:19 +01:00
Max Kellermann 2bf91a0487 output/Internal: merge REOPEN and OPEN 2016-12-13 20:07:00 +01:00
Max Kellermann 2775d747ac output/Thread: move MusicPipe code to class SharedPipeConsumer 2016-12-13 16:33:23 +01:00
Max Kellermann 99659e4cf9 release v0.19.21
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlhPxTwQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEoR8EACnEBj1zPTiraIoDZi9ZyqvwHZWILdcHRID
 8XdUWmgIAwbL83Fwzxfokl060TWa43DWTWtGvieWkMcaAaTYNf8wxH6KZFmEVPCe
 cvveFM6/PXJuEED16QjGoII9OzlIH330C4mmcmsfLPrcbAfULx7OtF7neIfbgpPX
 ZKgrO6HVbpsMH57+o1CnX6sZXHwW9EvUy0j4YRuSfGX/7pgItfBrypDqPJCv2Hy1
 mDy6gKWr7psA5ZiwYfTWVU1SPBuJiaKEM2jU80A5XVN0eZOi1EtUeySpyQO8Uncu
 hnJApi9Pd6IT9Tb4Wz7LshmqHCjG82KC+EppI4ESrqE3R/OEsho1iPFej4SdJycV
 XIcIRJ/S2JeopgGo4k/vlVzf4Y/9CMZZ7nP4fG1/1yjIYFQbefJeo1Gp/8b5ZTRD
 5PjFgNGFyClwXNsHesF/2wDlCs1/DTv51BnapVLKD6AO9uyAOrzxBSeg8qSuprXx
 K5m/z2dMdUNjBDzrSBzxKtVBwPfuARuo4Q633AxBk5C+HRpSdirtgrDBgE2aTDfU
 4o+BjrhiL60t1C5iQJ48ahzCIRkEfe0czmfeNxu5Jiig8Y9cYtkYJezniyBIGkbL
 RpqPxnD0YFTzzvuP8dWP+3zarxelETDwnH8KxD5jLpy2Rf2qjoNbeJNd70N6e8nN
 z7Hnvp4YwQ==
 =qsCR
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.21'

release v0.19.21
2016-12-13 11:00:39 +01:00
Max Kellermann 3bbcda917c release v0.19.21 2016-12-13 10:54:04 +01:00
Max Kellermann 7e43fb79af Makefile.am: fix mpd.socket path in EXTRA_DIST 2016-12-13 10:53:41 +01:00
Max Kellermann eb2b567da6 NEWS: fix version number 2016-12-13 10:45:53 +01:00
Max Kellermann ab332d7b2e systemd: add user unit
The user unit omits the "ProtectKernelModules" setting which fails
with modular kernels:

 Failed at step CAPABILITIES spawning /usr/bin/mpd: Operation not permitted

It is unfortunate that systemd (version 232) is unable to reduce its
own capabilities, because this requires us to split system and user
units.

 https://bugs.musicpd.org/view.php?id=4608
2016-12-13 10:24:10 +01:00
Max Kellermann 53e22b81ef systemd: add "system" sub directory 2016-12-13 10:24:10 +01:00
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