Max Kellermann
a17a481e30
event/BufferedSocket: add "noexcept"
2017-12-20 10:42:17 +01:00
Max Kellermann
8ac73a9eba
output/alsa: add attributes "dop" and "allowed_formats"
2017-12-19 11:57:52 +01:00
Max Kellermann
86a06a7acc
output/Interface: add "attributes" map
...
These attributes are printed in the "outputs" response, and the new
command "outputset" allows setting new values.
No attributes are currently implemented.
2017-12-19 11:57:52 +01:00
Max Kellermann
39dc83bd82
output/Print: print the plugin name
2017-12-19 11:52:10 +01:00
Max Kellermann
503063cddc
output/Print: use %u for the index
2017-12-19 11:52:09 +01:00
Max Kellermann
914df18bf9
Main, ...: catch any exception, not just std::runtime_error
2017-12-19 10:56:23 +01:00
Max Kellermann
37c27fa606
output/Interface: convert need_fully_defined_audio_format to flag
2017-12-19 08:41:34 +01:00
Max Kellermann
edee8a3446
Compiler.h: add gcc_returns_nonnull, gcc_returns_twice
2017-12-18 23:00:13 +01:00
Max Kellermann
6246d36fe6
Merge branch 'v0.20.x'
2017-12-16 20:56:06 +01:00
Yue Wang
f1ef9f9d31
OSXOutputPlugin: set the buffer time to be 100ms
...
[mk: the following text was copied from
https://github.com/MusicPlayerDaemon/MPD/pull/167 ]
For certain format (hi-res files) and normal buffer size hardware, The
hardware may at once consume most of the buffers. However, in Delay()
function, MPD is supposed to wait for 25 ms after the next try. it
will create a hiccup. The negative impact is much major than
increasing the latency.
I understand larger buffers come at a price. That's why in my earlier
commit last year I significantly reduced it. However, the buffer size
in CoreAudio is set according to the hardware, which is super small
latency. For instance, the system audio of 2015 generation of macbook
pro has maximum buffer size of 4096 samples, which is just 0.09s for
44.1k framerate, or 0.04s for 96k frames --- . compare to the 0.5 sec
latency alsa plugin has, even if we quadruple it, it's still super
tiny.
2017-12-12 10:56:42 +01:00
Max Kellermann
fbc4bb29dc
Merge branch 'v0.20.x'
2017-12-03 16:22:08 +01:00
Max Kellermann
de90d401d2
MusicChunk: add magic value IGNORE_REPLAY_GAIN
...
This fixes spurious replay gain logs when the player inserts silence
chunks, because those silence chunks had no replay gain attached,
resetting the ReplayGainFilter state, flipping it forth and back.
2017-12-03 11:39:12 +01:00
Yue Wang
7ba7ce3af7
Correctly set the mixer plugin for osx output
2017-12-02 23:29:23 -08:00
Max Kellermann
7d579e7400
lib/alsa/NonBlock: throw exception on error
...
Avoid another potential deadlock: if no file descriptors are
registered, our non-blocking ALSA code cannot ever work.
2017-11-14 21:08:07 +01:00
Max Kellermann
e0f777d4eb
output/alsa: move code to LockCaughtError()
2017-11-14 21:07:59 +01:00
Max Kellermann
febd1ad09c
output/alsa: fix deadlock bug
...
After UnlockActivate() returns, we not only need to check for errors,
but also for more room in the ring buffer. If we don't check the ring
buffer, it may be drained already, and the cond.wait() call will never
finish.
Closes #151
2017-11-14 21:02:53 +01:00
Max Kellermann
e2c81aa9ea
Merge branch 'v0.20.x'
2017-11-14 12:31:13 +01:00
Max Kellermann
014f8cd693
output/httpd: flush encoder after tag
...
Without the flush, ReadPage() may not return any data, or not all
data. This may result in incomplete ddata the new "header" page,
corrupting streams with some encoders such as Vorbis.
Fixes #145
2017-11-14 12:00:14 +01:00
Max Kellermann
c582a9faae
event/MultiSocketMonitor: add "noexcept"
2017-11-12 17:42:50 +01:00
Max Kellermann
390e830994
{mixer,output}/alsa: migrate from DeferredMonitor to DeferEvent
2017-11-12 17:27:58 +01:00
Max Kellermann
44c60567dd
output/alsa: add "allowed_formats" setting
...
Allows defining a list of supported audio formats, and allows
switching on and off DoP with certain formats.
This is a first rough draft. The setting syntax and its semantics may
still be redesigned.
2017-11-10 23:05:50 +01:00
Max Kellermann
20199e770c
output/shout: use the shout_metadata_t only once
...
There is no documentation on whether calling shout_metadata_add()
multiple times on one instance is allowed. To be sure, let's allocate
the object on demand each time in SendTag().
2017-11-10 22:30:53 +01:00
Max Kellermann
4c824e5309
output/shout: simplify shout_tag_to_metadata()
2017-11-10 22:26:25 +01:00
Max Kellermann
981bc85879
output/shout: relax quality and bitrate checks, forward as-is
2017-11-10 22:19:00 +01:00
Max Kellermann
015527d870
output/shout: make "quality" and "bitrate" local variables
2017-11-10 22:17:51 +01:00
Max Kellermann
6464b4b372
encoder/Configured: glue code to initialize PreparedEncoder
2017-11-10 21:54:57 +01:00
Max Kellermann
fef9747fbf
output/shout: use MIME type instead of the encoder plugin name
...
This is more robust, for example it allows using the Shine encoder
plugin instead of LAME.
2017-11-10 21:52:54 +01:00
Max Kellermann
13816c1c7d
output/{recorder,httpd,shout}: use std::unique_ptr to manage PreparedEncoder pointer
2017-11-10 21:35:22 +01:00
Max Kellermann
c54a920d13
output/httpd: make enum strictly-typed
2017-11-10 21:25:03 +01:00
Max Kellermann
83f8eeec44
output/httpd: migrate from DeferredMonitor to DeferEvent
2017-11-10 21:18:00 +01:00
Max Kellermann
b83fbad6a1
output/httpd: use C++11 initializers
2017-11-10 21:15:57 +01:00
Max Kellermann
0ff4350352
event/ServerSocket: pass UniqueSocketDescriptor by value
...
Passing it by value is actually smaller (32 bit) than the rvalue
reference (64 bit pointer), and it ensures that the object is consumed
after the call returns, no matter how the methods are implemented.
2017-11-10 20:43:14 +01:00
Max Kellermann
5fd2b7cc79
event/SocketMonitor: eliminate Read(), Write()
...
Migrate callers to GetSocket().Read(), GetSocket.Write(), which is the
same.
2017-11-10 20:37:52 +01:00
Max Kellermann
59a8836924
event/SocketMonitor: add "noexcept"
2017-11-10 20:20:07 +01:00
Max Kellermann
49784513b1
util/{Const,Writable}Buffer, ...: rename IsEmpty() to empty(), imitating STL
2017-11-10 19:24:33 +01:00
Max Kellermann
523051132d
Merge branch 'v0.20.x'
2017-11-05 17:48:41 +01:00
cathugger
b111a8fe8d
output/Thread: ensure pending tags are flushed in all cases
...
Fixes hanging playback with soxr resampler.
Closes #139 , #141
2017-11-05 17:42:32 +01:00
Max Kellermann
55e6629fb4
output/Control: catch and log StartThread() exceptions
2017-10-30 08:39:44 +01:00
Max Kellermann
e2a74051dc
lib/alsa/HwSetup: return effective parameters
2017-10-26 12:13:00 +02:00
Max Kellermann
b7e035b6f3
output/alsa: move AlsaSetupHw() to lib/alsa/HwSetup.cxx
2017-10-26 11:15:01 +02:00
Max Kellermann
890f1f5928
lib/alsa/Format: move HAVE_ALSA_DSD* definitions from the Alsa output plugin
2017-10-26 09:39:18 +02:00
Max Kellermann
b30c37eb79
output/alsa: move functions to lib/alsa/Format.hxx
2017-10-26 09:30:45 +02:00
Max Kellermann
b08cb148ae
output/alsa: move class PeriodBuffer to lib/alsa/PeriodBuffer.hxx
2017-10-26 09:27:36 +02:00
Max Kellermann
6657801fb1
output/alsa: pass SampleFormat& to AlsaSetupFormat()
2017-10-26 08:46:28 +02:00
Max Kellermann
a199366157
output/alsa: remove period_time adjust loop
...
This loop was introduced in commit
24c1f46353
, but -EPIPE is not a possible
error condition for snd_pcm_hw_params(). This code does not appear to
make sense. Problems with a wrong period_time should be caught before
that by snd_pcm_hw_params_set_period_time_near().
This commit removes the last "goto" in MPD! Yay!
2017-10-26 08:40:59 +02:00
Max Kellermann
ddabe1a6df
output/alsa: add "noexcept"
2017-10-26 08:18:05 +02:00
Max Kellermann
e7b47ce335
output/alsa: in_frame_size is a debug-only variable
2017-10-26 08:17:21 +02:00
Max Kellermann
5ce93d6fa8
output/sndio: refuse to build with libroarsndio
...
RoarAudio's sndio emulation has been a source for annoyances. First,
their headers turned out to be broken with C++, due to their use of
the "new" keyword. Then they used a preprocessor macro to rename
"sio_hdl" to something else, effectively disallowing the use of
forward declarations. Enough is enough, and I'm removing support for
it.
RoarAudio users should better use the RoarAudio output plugin.
2017-09-19 19:38:43 +02:00
Max Kellermann
735eabb066
output/sndio: move #include below guard
2017-09-19 18:59:04 +02:00
Max Kellermann
412ff762bb
output/sndio: use forward declarations
2017-09-19 18:58:13 +02:00
Max Kellermann
44bbf42a9f
Merge branch 'v0.20.x'
2017-09-19 18:58:02 +02:00
Max Kellermann
75c740fe2b
output/sndio: fix indent
2017-09-19 18:50:35 +02:00
Max Kellermann
6c8d86bb90
output/sndio: rename the "sio_hdl" variable to avoid clash with struct name
2017-09-19 18:49:33 +02:00
Christopher Zimmermann
030f87c90c
Add sndio mixer plugin
2017-09-16 11:58:33 +02:00
Christopher Zimmermann
ae941a7665
SndioOutput: Move class definition to header
...
no change in behaviour.
2017-09-16 09:14:56 +02:00
Max Kellermann
d0f6131ba4
output/Interface: allow Pause() to throw exception
...
Coverity discovered that the Pulse plugin could throw exceptions from
Pause(), but that method was marked "noexcept" because its caller was
not designed to catch exceptions. So instead of avoiding exceptions
(by catching and logging them in each and every implementation), let's
allow them, and do the catch/log game in the MPD core.
2017-09-08 14:45:53 +02:00
Max Kellermann
91438b6540
output/Interface: the default Pause() implementation fails
...
Fixes regression from commit 31bad5f7af
:
if Pause() returns true, the output thread is running a busy loop,
causing 100% CPU usage, instead of just closing the output.
Closes #105
2017-08-31 15:02:15 +02:00
Matthew Leon
aa9c6062b0
Merge branch 'v0.20.x' into master
...
contains OSX mixer
2017-08-22 10:36:37 +01:00
Matthew Leon
5fb39658f1
OSX mixer
2017-08-21 20:05:50 +01:00
Max Kellermann
9d0a71f245
output/Jack: add "noexcept"
2017-08-11 12:41:11 +02:00
Max Kellermann
ff1b435232
output/Jack: reorder methods
2017-08-11 12:39:42 +02:00
Max Kellermann
33b4114534
system/fd_util: remove unused library
2017-08-11 09:20:15 +02:00
Max Kellermann
3c7c0515d8
output/oss: use class FileDescriptor
2017-08-10 19:42:23 +02:00
Max Kellermann
df5cc3f0f6
fs/FileSystem: OpenFile() returns UniqueFileDescriptor
2017-08-10 19:34:52 +02:00
Max Kellermann
9a5bcc6db0
net/ServerSocket: pass UniqueSocketDescriptor&& to OnAccept()
2017-08-10 19:20:14 +02:00
Max Kellermann
492b20a89d
event/SocketMonitor: use class SocketDescriptor
2017-08-10 19:19:58 +02:00
Max Kellermann
fcfc8bacc0
output/httpd: remove obsolete accept() error check
2017-08-10 19:19:53 +02:00
Max Kellermann
54de8b8e77
net/*, ...: use AF_LOCAL instead of AF_UNIX
2017-08-10 13:12:13 +02:00
Max Kellermann
a257504ba4
mixer/Plugin: pass AudioOutput to init()
...
Fix breakage from commit bea5681fd8
2017-08-10 13:07:36 +02:00
Max Kellermann
31bad5f7af
output/Interface: convert to abstract class
...
Yet another C-style vtable replaced with C++.
2017-08-10 09:01:41 +02:00
Max Kellermann
1cf7f3d87c
output/Solaris: use class FileDescriptor
2017-08-10 08:56:56 +02:00
Max Kellermann
9c9a9ccd5c
output/Interface: convert to class, make attributes private
2017-08-09 17:03:07 +02:00
Max Kellermann
7381236de6
output/Interface: remove unused attribute "parent"
2017-08-09 17:03:00 +02:00
Max Kellermann
bea5681fd8
output/Interface: define a new struct AudioOutput
...
Hide struct FilteredAudioOutput from the plugins, preparing for hiding
MPD's core internals.
2017-08-08 18:58:40 +02:00
Max Kellermann
e11229494e
output/Filtered: add method NeedFullyDefinedAudioFormat()
...
Avoid accessing FilteredAudioFormat attributes directly.
2017-08-08 18:57:59 +02:00
Max Kellermann
ccc0fcb5b7
output/Shout: move ConfigureShoutAudioInfo() call to Open()
...
Configure the AudioFormat after opening the encoder, because only now
we know the final format.
2017-08-08 18:56:14 +02:00
Max Kellermann
6e24381962
output/Shout: move code to ShoutSetAudioInfo()
2017-08-08 18:56:12 +02:00
Max Kellermann
3ab905644d
output/Shout: open the encoder first, then open connection
...
This order will be necessary for proper AudioFormat initialization,
because the encoder may change the format.
2017-08-08 18:53:04 +02:00
Max Kellermann
f46d545307
output/Shout: pass shout_t* to shout_connect()
2017-08-08 18:52:03 +02:00
Max Kellermann
8134b0073b
output/Shout: move write_page() into the struct
2017-08-08 18:47:37 +02:00
Max Kellermann
6ab19c7ef2
output/Shout: pass shout_t* to handle_shout_error()
2017-08-08 18:47:30 +02:00
Max Kellermann
d22361f7c7
output/Shout: remove unnecessary nullptr check
2017-08-08 18:47:02 +02:00
Max Kellermann
06c7e55188
output/Filtered: add methods SupportsEnableDisable(), SupportsPause()
2017-08-08 15:54:49 +02:00
Max Kellermann
b3eb8489f3
output/Filtered: add a few OutputPlugin method wrappers
2017-08-08 14:27:19 +02:00
Max Kellermann
5431fca99b
output/Filtered: add attribute "log_name"
2017-08-08 14:02:58 +02:00
Max Kellermann
47c9d6ac64
output/Internal: rename source to Filtered.cxx
2017-08-07 21:50:13 +02:00
Max Kellermann
d0157af13e
filter/Internal: rename struct AudioOutput to FilteredAudioOutput
...
Prepare to add an abstract class AudioOutput, to be implemented by
plugins, to get rid of the C-style vtable.
2017-08-07 18:47:39 +02:00
Max Kellermann
fc04620519
output/Internal: move code to ConfigureConvertFilter()
2017-08-07 18:42:10 +02:00
Max Kellermann
d4ee165253
output/Thread: move OpenSoftwareMixer() to the end
...
This call cannot fail, but needs cleanup if others fail. By moving it
to the end, we eliminate some cleanup.
2017-08-07 18:42:09 +02:00
Max Kellermann
4f7f577a57
output/Internal: add OpenSoftwareMixer()
...
Moved code from AudioOutputControl::InternalOpen2().
2017-08-07 18:33:07 +02:00
Max Kellermann
612def5c11
output/Internal: rename CloseFilter() to CloseSoftwareMixer()
2017-08-07 18:32:43 +02:00
Max Kellermann
b8be7ec90e
filter/Normalize: add normalize_filter_prepare()
2017-08-07 18:28:52 +02:00
Max Kellermann
a3d71f4b91
filter/Convert: add convert_filter_prepare()
2017-08-07 18:27:00 +02:00
Max Kellermann
9250819b75
filter/Volume: add volume_filter_prepare()
...
Circumvent filter_new() with a fake ConfigBlock.
2017-08-07 18:23:13 +02:00
Max Kellermann
04738636ca
output/Finish: fold internal function into FinishDestroy()
2017-08-07 18:15:15 +02:00
Max Kellermann
07d1b3780d
output/Control: move two AudioOutput methods to Finish.cxx
2017-08-07 18:13:57 +02:00
Max Kellermann
27d68d8fdd
output/Internal: move the Mutex to struct AudioOutputControl
...
struct AudioOutput should not know or care about multi-threading.
2017-08-07 17:44:46 +02:00
Max Kellermann
546b773b21
output/Internal: remove mutex code from Close()
2017-08-07 17:43:58 +02:00
Max Kellermann
15dcaeda0f
output/Internal: remove mutex code from BeginPause(), IteratePause()
2017-08-07 17:40:40 +02:00
Max Kellermann
8f42ba13ef
output/Internal: simplify "return" statements in IteratePause()
2017-08-07 17:40:13 +02:00
Max Kellermann
5990017d51
output/Internal: remove mutex code from Enable() and Disable()
2017-08-07 17:39:20 +02:00
Max Kellermann
3197c0fd7d
output/Thread: move code to InternalCloseOutput()
2017-08-07 17:35:43 +02:00
Max Kellermann
4580c685f1
output/Thread: unlock the mutex for several AudioOutput calls
2017-08-07 17:08:49 +02:00
Max Kellermann
67232453d4
output/Control: more locking information in API docs
2017-08-07 16:56:41 +02:00
Max Kellermann
b4cce80727
output/Thread: move code to InternalClose()
2017-08-07 16:34:29 +02:00
Max Kellermann
89a2e5ded3
output/Thread: rename InternalClose() to InternalCheckClose()
2017-08-07 16:33:20 +02:00
Max Kellermann
9d6b4f46d4
output/Thread: move AudioOutput methods to Internal.cxx
2017-08-07 16:26:50 +02:00
Max Kellermann
dad7d7e798
util/TruncateString: rename CopyString() to CopyTruncateString()
2017-07-05 17:15:58 +02:00
Max Kellermann
4b94ae8040
util/StringUtil: move CopyString() to TruncateString.cxx
2017-07-05 17:11:34 +02:00
Max Kellermann
6e2b348758
output/Internal: move the "open" flag to struct AudioOutputControl
2017-06-15 22:52:46 +02:00
Max Kellermann
613dd67784
output/Internal: move the AudioOutputSource to struct AudioOutputControl
2017-06-08 22:13:47 +02:00
Max Kellermann
58683f02ec
output/Thread: move the AudioOutputSource::Open() call to InternalOpen()
...
Prepare for moving the AudioOutputSource to class AudioOutputControl.
2017-06-08 22:08:01 +02:00
Max Kellermann
7cb82fe8f3
output/Thread: move code to InternalClose()
2017-06-08 21:59:48 +02:00
Max Kellermann
0494779ecb
output/Thread: move software_mixer_set_filter() out of the "try" block
...
That function is "noexcept".
2017-06-08 21:49:41 +02:00
Max Kellermann
7467b85019
output/Thread: rename audio_format to in_audio_format
2017-06-08 13:20:55 +02:00
Max Kellermann
7dea615f74
output/{Source,Thread}: make the AudioFormat parameter const
2017-06-08 13:19:34 +02:00
Max Kellermann
3010d182fc
output/Internal: move "really_enabled" flag to class AudioOutputControl
2017-06-08 09:55:49 +02:00
Max Kellermann
a72a02f0f2
output/Thread: move Enable() call to InternalEnable()
2017-06-08 09:51:13 +02:00
Max Kellermann
614df96382
output/Thread: move Enable() call out of Open()
2017-06-08 09:50:34 +02:00
Max Kellermann
669d7a6feb
output/Thread: move Close() call out of Disable()
2017-06-08 09:34:24 +02:00
Max Kellermann
d600b937f1
output/Thread: move code to InternalDisable()
2017-06-08 09:32:07 +02:00
Max Kellermann
979f1b6c39
release v0.20.9
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkz5jkQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEubuD/kBXMcV4XawqGNNtSHdrY8CxSL8wJMCMJQl
aMgRkKLPRml8Hj9FNNG9pjXBuT+qUgPX7t9gBEiT7c+sV3fHH40gUf1js5GIsEPm
BAVfvww5EhmQWWVhPTLk1iZ4jp6E96mDmIG1znwo7etSZHXU8RJfR7woBi3SPJ9f
OPcrimskNuWpAWeaEIKi/1Iwzy8d9VK9Ttb73gA3M5zSm7ioXzt3YClpwLRM8JU6
QeUJchy6VwXnygswjUNmbhPc3GsD2FyUZ4OtJ0hodnqqajfldBxhcHUnQk4zZULr
1nLSyOuA9bwLuFohH1T6HiY9z8PFzgqdIHvsjOJgZ4gQa69PVNjal2tUEUav9zFv
aK4LvTVPnIk+hqRbtLpV7/rPKuClrC9BO4oYdBGBDNY4hqVpvRA9obP1s00aOi+K
UhYqLqg7yeIEeTlUxFOhXJCKAEL69BuXT5ihJtDlB/dCUzv37sEch/4WDgs7uc+O
9kJYlElvozw57mbczsee/PCSnSWrLCq/qG/bNEUUQOTueWNuifh3PL62UXGgfbEH
01hJDyLr6ETSmWn7rjTfLJiHThX/EQQvOhs+35fbCyry65z4tFwrilGDmFVUWGPq
/6QEpY1D6q4fkoma/iWOZoTkfKewatAPGMGWoJaGhCnfQFz4VTFtS2bDtuUctQ16
jnXnPFxqBw==
=0SSp
-----END PGP SIGNATURE-----
Merge tag 'v0.20.9'
release v0.20.9
2017-06-04 12:57:05 +02:00
Max Kellermann
a057b4f6d8
*: add lost of "noexcept" specifications
2017-06-04 12:46:48 +02:00
Max Kellermann
1fa1790da5
output/Internal: move the "pause" flag to struct AudioOutputControl
2017-05-23 11:23:10 +02:00
Max Kellermann
dd29e6e475
output/pulse: add "pause" flag
...
Don't access AudioOutput::pause.
2017-05-23 11:17:04 +02:00
Max Kellermann
ae4b30a697
output/httpd: add "pause" flag
...
Don't access AudioOutput::pause.
2017-05-23 11:13:41 +02:00
Max Kellermann
353299168a
output/Thread: skip WaitForDelay() after resuming playback
...
This allows removing the "base.pause" check from the JACK output
plugin, and will allow removing similar accesses from other plugins.
2017-05-23 11:00:28 +02:00
Max Kellermann
a50b2c3b85
output/Thread: rename {Play,Pause}() to Internal{Play,Pause}()
2017-05-23 10:59:17 +02:00
Max Kellermann
ebecee3d85
output/Internal: move "client" to struct AudioOutputControl
2017-05-23 00:32:03 +02:00
Max Kellermann
194f733ca7
output/MultipleOutputs: use LoadOutputControl() in AddNullOutput()
2017-05-23 00:31:31 +02:00
Max Kellermann
3907ddbcc4
output/{Internal,Control}: add "noexcept"
2017-05-23 00:17:23 +02:00
Max Kellermann
e616be0a42
output/Thread: move code to InternalOpen()
2017-05-23 00:08:36 +02:00
Max Kellermann
5eef146871
output/Internal: move several flags to struct AudioOutputControl
2017-05-22 23:40:20 +02:00
Max Kellermann
2e65686fc0
output/Control: add method Configure()
...
Prepare to move some configuration settings from AudioOutput to
AudioOutputControl.
2017-05-22 23:36:45 +02:00
Max Kellermann
e5847f1ddf
output/MultipleOutputs: move code to LoadOutputControl()
2017-05-22 23:35:32 +02:00
Max Kellermann
59e4f1ee0f
*: remove lots of GCC 4.8 fallback code
...
We can remove those C++11 and C++14 kludges because we require GCC 4.9
now.
2017-05-16 11:29:15 +02:00
Max Kellermann
0a3a5a7c65
Merge branch 'v0.20.x'
2017-05-16 10:09:20 +02:00
Max Kellermann
b3c82f8886
output/{osx,haiku,pulse,sles}: add missing "noexcept"
...
Fixes build failure on OS X, closes #44 . With the other plugins,
that's not critical, because those use the AudioOutputWrapper, which
hides this problem.
2017-05-16 07:12:30 +02:00
Max Kellermann
c5996c0593
*: add "noexcept" to many, many function prototypes
...
See commit 71f0ed8b74
2017-05-15 23:05:45 +02:00
Max Kellermann
4faef28cc5
release v0.20.7
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkaFL0QHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEr4ID/9iAQC+7fFv06uLOm48Ufu+PgoD8uJkAwF5
QuLQkc85g9urn+bu9N7Qs7Vypp7aLyGcJKY0jyA8wxkOj24pUC3GYk80daUt561V
5s20FnoS/Uoman3CSJL94IfCUBxejizE6vgIIHTc5bb6U0qIsPub/8JTTE2Ih7uP
nvFZ5uBQ+YTc7at+iIH9123eUMKkitkh8osNblovqQT9v42++Tm4ztAytRHBjwUA
Itew5HhlvahbLKqFs/7vmICh/YX1FcOV7cV+erEWYfkH0KCI2bhSle4u2d0CBOvD
VJlDnBCo9bM7WKcPYqJiFFFXA0CRk06wbkkkAtwF4zjp8xos7aQcq4FyQnYL8KXo
5lijIhRwBURBd+nt8oA9kuEhBt/T75otcemJkzVaYappHTJCLjhxSGcPt8mw+nE9
9WQzsp/MIVzg9l5g3D9S/43xM7uhvn98Tn1Qf2s8YRd2o8CZeOhW+X3RvbCvVPv2
mOlx4sFAv8DOJ3KxMdqiJT+PmylPyJluQdqH+tMc8BdPg/kpSpYIPTuSjjRqK1yh
ld5do0HtAAwiHtvXfk5YVFjJSpO0c8yVn6xci2Cl4k/5ZHj2UE1ln+N5vCea2BRF
2J3HAjROwtcwY3lU1jFnEAogf24KWiFJqhhC0EqBGUdlrM8Dn37P5cEWWjROIMNK
lPEdovokNw==
=CdDy
-----END PGP SIGNATURE-----
Merge tag 'v0.20.7'
release v0.20.7
2017-05-15 23:01:49 +02:00
Max Kellermann
788e3b31e1
*: remove "pure" and "const" attributes from throwing functions
...
The "pure" and "const" attributes are not so well-defined, and a
recent clang version implements an optimization which pushes the
definition's boundary beyond what I believed it was. clang now
assumes that functions declared "pure" cannot throw exceptions, even
if they lack the "noexcept" specification.
When compiled with this new clang version, MPD will crash randomly if
an exception happens to get thrown by such as "pure" function
(https://github.com/MusicPlayerDaemon/MPD/issues/41 ).
This commit removes all such misplaced "pure" and "const" attributes,
closing #41 .
2017-05-08 17:25:06 +02:00
Max Kellermann
71f0ed8b74
*: add "noexcept" to many, many function prototypes
...
This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
2017-05-08 14:44:49 +02:00
Max Kellermann
89b900432e
output/Internal: move thread-specific stuff to AudioOutputControl
...
The AudioOutput struct (which is exposed to all plugins) should not be
aware that it's being controlled by another thread.
2017-04-28 22:04:30 +02:00
Max Kellermann
8bb9d0960b
output/Control: add struct AudioOutputControl
...
Will move attributes from struct AudioOutput that are specific to the
OutputThread. The new struct AudioOutputControl is a holder for the
AudioOutput pointer.
This prepares for making the output list more dynamic, to allow moving
outputs to between partitions.
2017-04-28 22:04:24 +02:00
Max Kellermann
59181ac5fb
output/Thread: move code to BeginPause(), IteratePause()
2017-04-28 22:01:20 +02:00
Max Kellermann
2a831fa547
output/Output*: drop "Output" prefix from source file name
2017-04-28 21:42:24 +02:00
Max Kellermann
f6e428ac22
Merge branch 'v0.20.x'
2017-04-24 11:44:27 +02:00
Max Kellermann
95b62a843a
Merge branch 'add-original-year-tag' of git://github.com/tremby/MPD
2017-04-21 18:55:34 +02:00
Bart Nagel
ccb4f44caf
Add support for the OriginalDate tag
...
See https://picard.musicbrainz.org/docs/mappings/
This tag is useful when the user would like all releases of the same
album to be sorted next to each other.
2017-04-21 09:43:26 -07:00
Max Kellermann
c788c76dc9
output/Internal: add method IsBusy()
2017-04-18 23:15:46 +02:00
Max Kellermann
2e4e1c7f48
output/Control: drop "Output" prefix from file name
2017-04-18 22:36:48 +02:00
Bart Nagel
0a7d612f41
Remove some redundant code
2017-04-18 16:10:38 +02:00
Max Kellermann
f85d4d28d1
output/alsa: work around dmix non-blocking snd_pcm_drain() bug
...
See code comment. Bug was reported against MPD, but it's really an
alsa-lib bug.
https://bugs.musicpd.org/view.php?id=4662
2017-03-29 20:36:04 +02:00
Max Kellermann
dae8b78569
output/httpd: copy the Page reference; fixes use-after-free
2017-03-29 20:17:09 +02:00
François Revol
46aa4d2f91
haiku: fix build
...
Some missing bits when converted to C++ exceptions...
2017-02-20 11:25:00 +01:00
Max Kellermann
512e81c629
output/httpd: use emplace() instead of push()
2017-02-19 20:48:17 +01:00
Max Kellermann
452666f742
output/httpd: wake up the I/O thread only if pages have been read from encoder
2017-02-19 20:46:20 +01:00
Max Kellermann
72008d951b
output/httpd: no mutex lock while reading data from encoder
2017-02-19 20:45:16 +01:00
Max Kellermann
72146e7800
output/httpd: use std::lock_guard
2017-02-19 20:43:45 +01:00
Max Kellermann
f7af1bb8e2
output/httpd: cancel the DeferredMonitor in Close()
2017-02-19 20:41:34 +01:00
Max Kellermann
f88f1fca3f
output/httpd: move Close() lock into the I/O thread
...
Fixes a potential deadlock introduced by commit 945287358b
2017-02-19 20:41:06 +01:00
Max Kellermann
26e4a40cc7
output/httpd/Page: use std::shared_ptr instead of class RefCount
2017-02-19 20:17:57 +01:00
Max Kellermann
8b1931072a
output/httpd/Page: no variable size, use AllocatedArray
...
Using variable-size objects is not worth the trouble here. Let's drop
this and use existing and simpler code.
2017-02-19 20:13:41 +01:00
Max Kellermann
45e15b6cc6
output/httpd/Page: make all attributes private
2017-02-19 20:13:35 +01:00
Max Kellermann
be7e52c882
output/httpd/Page: remove unused method Concat()
2017-02-19 20:13:19 +01:00
Max Kellermann
4162ce0bc5
output/httpd/Page: use uint8_t instead of unsigned char
2017-02-19 19:49:53 +01:00
Max Kellermann
7e46277016
Merge branch 'v0.20.x'
2017-02-19 19:46:18 +01:00
Max Kellermann
4bb83781e8
output/httpd/IcyMetaDataServer: cast length to unsigned
...
Fixes another buffer overflow: if the stream has a very long title or
URL, resulting in a metadata string of more than 2 kB, icy_string[0]
is a negative value, which gets casted to size_t - ouch!
https://bugs.musicpd.org/view.php?id=4652
2017-02-19 19:28:52 +01:00
Max Kellermann
a73195b7cc
output/httpd/IcyMetaDataServer: pad the string with 15 spaces
...
Fixes a buffer overflow due to the bad formula rounding the buffer
size up. At the same time, remove the "+1" from the meta_length
calculation, which takes the padding into account and at the same time
implements proper rounding.
2017-02-19 19:27:37 +01:00
Max Kellermann
1bd00b8a9a
output/httpd/IcyMetaDataServer: remove the int cast
...
Why did this cast exist??
2017-02-19 19:27:37 +01:00
Max Kellermann
1e972174a6
output/MultipleOutputs: add method AddNullOutput()
2017-02-17 23:53:49 +01:00
Max Kellermann
47dffe66aa
output/alsa: fix race condition on early snd_pcm_writei() error
...
During UnlockActivate() while the mutex is unlocked, the IOThread can
set a new error condition, and will never again wake up the
OutputThread. This race condition can cause a deadlock in the
OutputThread.
2017-02-15 11:23:44 +01:00
Max Kellermann
781487c4dd
thread/Thread: use BoundMethod
2017-02-10 22:46:09 +01:00
Max Kellermann
835136dcd3
output/Thread: add assertion on the ao_plugin_play() result
2017-02-10 22:24:36 +01:00
Max Kellermann
4a80e9cb25
output/alsa: copy the PcmExport result to the ring_buffer
...
.. and not the input data.
Regression from commit b1c7649edb
(integer underflow).
https://bugs.musicpd.org/view.php?id=4639
2017-02-10 22:23:00 +01:00
Max Kellermann
cfd056231b
output/alsa: use the EventLoop& parameter instead of io_thread_get()
2017-02-10 21:21:15 +01:00
Max Kellermann
b1c7649edb
output/alsa: non-blocking mode
...
Use SND_PCM_NONBLOCK, and perform all snd_pcm_writei() calls in the
IOThread. Use a lockless queue to copy data from the OutputThread to
the IOThread.
This rather major change aims to improve MPD's internal latency. All
waits are now under MPD's control, instead of blocking inside
libasound2.
As a side effect, an output's filter is now decoupled from the actual
device I/O, which solves a major latency problem with the conversion
filter on slow CPUs and small period buffers. See:
https://bugs.musicpd.org/view.php?id=3900
2017-02-09 21:36:18 +01:00
Max Kellermann
03a97d87ea
tag/Tag*: rename several source files
2017-02-08 08:49:42 +01:00
Max Kellermann
df4af2b550
release v0.20.4
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAliSTDkQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEsIQD/4iNkylzLp8mID2aFT690MFzv4TRXi2XS7v
r3Rlx3hpGyDdzeXZeFc5zxsc9Ei8OfLcdFC/Umj9LjQanXakOxwsdhagrW9cadNX
YLxkyVcREXalmzUvoWeRnya1LjoTdYA8llvG2tAJosXVr0o/GHZi56aHcrYnW2a6
XD8kEk5k9beuEcBLk1rdZCTGPbVLwCFvMcpZ7j5Hd4kDGQjjw2aoEaPWchJdhLQh
p+GRSU+A8hyTo9zy+aNO3cKvq6zqVxDLlHnIqh8XPWQoLPyWuD7ETvwERKmdmiPZ
bSo0MR7azTlhkWbNZxjPHgZuacJDlwKvXPg1ofjn8VVcaVe5ONeX+1WP0ozUYqyU
fmhLxMHKuwZcKo6do/jNhAVp//VBWhSwJHPA8kjBTuZHHc0HvgyTxlAgvzlrSswe
dxc8vnvzgJfUKz5k7mf3amVg6Cu1CmNi59CkyL0NL+8N0inyMfdeQuQEYgbPoI6X
jIRwACfXpMX75VtiDaNpnFLBjL5emE6u2bDoU2c5ezgpthaWjb0PqSmoLBBF8TNm
k0ecXlIwCjT3pDcqmFdqgG3AJiYLTgX0rETC8PInl6toLzr2oVMVlijU3YK5PjMl
nTvgs8TwprTWImgcBnidqRMb39p3AKs12pHfZ4Y5Iu82Bm60acZQMkv6sQh43Wyc
+W2+T3D2IA==
=b2Fz
-----END PGP SIGNATURE-----
Merge tag 'v0.20.4'
release v0.20.4
2017-02-01 22:05:33 +01:00
Max Kellermann
38d263ac19
output/sndio: work around a libroar C++ incompatibility
...
Same as in commit e02d8ad8d2
, but this time for the sndio plugin
which can be emulated by libroar.
2017-02-01 19:53:23 +01:00
Max Kellermann
8fd9d91974
output/Plugin: pass EventLoop& to init()
...
Eliminate dependency on io_thread_get().
2017-01-25 22:54:41 +01:00
Max Kellermann
d3f35dab1e
output/ao: convert to class, make attributes private
2017-01-25 10:46:09 +01:00
Max Kellermann
487e2618cd
output/ao: use AudioOutputWrapper
2017-01-25 10:45:20 +01:00
Max Kellermann
30d5186db4
output/ao: use const_cast instead of the union hack
2017-01-25 10:44:19 +01:00
Max Kellermann
cbe59714d4
output/solaris: convert to class, make attributes private
2017-01-25 10:33:38 +01:00
Max Kellermann
704a28ca17
output/solaris: use AudioOutputWrapper
2017-01-25 10:29:42 +01:00
Max Kellermann
8d70d10aba
output/httpd: use AudioOutputWrapper
2017-01-25 10:05:08 +01:00
Max Kellermann
ddd8b16f2b
output/roar: use AudioOutputWrapper::Init()
2017-01-25 10:05:08 +01:00
Max Kellermann
b79ce77ec5
output/Wrapper: add missing include
2017-01-25 10:05:08 +01:00
Max Kellermann
fead4bbfd9
output/Plugin: convert pointers to references
2017-01-25 09:48:59 +01:00
Max Kellermann
6b968beede
output/alsa: convert to class, make attributes private
2017-01-24 23:08:16 +01:00
Max Kellermann
f68dd1bffb
output/alsa: make AlsaSetup() an AlsaOutput method
2017-01-24 23:06:33 +01:00
Max Kellermann
f92b71ca99
output/alsa: move code from AlsaSetup() to AlsaSetupSw()
2017-01-24 23:05:29 +01:00
Max Kellermann
2b79fe2d6a
output/alsa: move code from AlsaSetup() to AlsaSetupHw()
2017-01-24 22:48:48 +01:00
Max Kellermann
5e93cfdd9e
output/Source: reset the ReplayGain serials ion OpenFilter()
...
Each close/open cycle resets the Filter's state, because a new Filter
instance is being created. That results in the serials
(replay_gain_serial and other_replay_gain_serial) being out of sync
with the internal ReplayGainFilter state.
So instead of initializing those serials once, we need to initialize
them each time we create new ReplayGainFilter instances, i.e. in
OpenFilter().
https://bugs.musicpd.org/view.php?id=4632
2017-01-23 17:55:04 +01:00
Max Kellermann
39114f91a7
AudioFormat: replace struct audio_format_string with class StringBuffer, return it
2017-01-17 22:18:21 +01:00
Max Kellermann
6eea56861b
AUTHORS, ...: update my email address
2017-01-17 11:54:55 +01:00
Max Kellermann
d14ec6aea5
output/Thread: reconfigure ConvertFilter for its new input AudioFormat
...
If the input AudioFormat changes but the out_audio_format doesn't
change (e.g. because there is a fixed "format" setting in this
"audio_output" section), the ConvertFilter needs to be reconfigured.
This didn't happen, resulting in awful static noise after changing
songs.
2017-01-15 01:24:17 +01:00
Max Kellermann
917cedf893
output/Thread: move AudioFormat logging code around
2017-01-15 01:23:49 +01:00
Max Kellermann
193dd71600
output/Thread: remember the original filter audio format in local variable
2017-01-15 01:21:14 +01:00