Commit Graph

12474 Commits

Author SHA1 Message Date
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
967d81b782 AudioFormat: add method MatchMask() 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
ec20784046 storage/curl: migrate from DeferredMonitor to DeferEvent 2017-11-10 21:10:54 +01:00
Max Kellermann
42ad753e39 event/MaskMonitor: migrate from DeferredMonitor to DeferEvent 2017-11-10 21:10:46 +01:00
Max Kellermann
1ccd2a7b11 lib/nfs: migrate from DeferredMonitor to DeferEvent 2017-11-10 21:06:40 +01:00
Max Kellermann
4c1d29c86c lib/nfs/FileReader: use C++11 initializers 2017-11-10 21:03:41 +01:00
Max Kellermann
0db7a0c9e2 db/update/Service: migrate from DeferredMonitor to DeferEvent 2017-11-10 20:58:25 +01:00
Max Kellermann
13f6b1b344 db/update/Remove: migrate from DeferredMonitor to DeferEvent 2017-11-10 20:56:21 +01:00
Max Kellermann
593d82c6a9 event/DeferEvent: add "noexcept" 2017-11-10 20:55:24 +01:00
Max Kellermann
43dccbd45d event/SocketMonitor: remove unused method Abandon() 2017-11-10 20:52:37 +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
7e16ac305d event/SocketMonitor: rename Get() to GetSocket() 2017-11-10 20:34:45 +01:00
Max Kellermann
59a8836924 event/SocketMonitor: add "noexcept" 2017-11-10 20:20:07 +01:00
Max Kellermann
9d4020501c event/SocketMonitor: make constructor "explicit" 2017-11-10 20:17:27 +01:00
Max Kellermann
81350d65bc event/SocketMonitor: use C++11 initializers 2017-11-10 20:16:26 +01:00
Max Kellermann
02642a64fd input/Plugin: remove "#undef ERROR"
Maybe this was once a required kludge for Windows, but it's not
anymore.
2017-11-10 19:59:03 +01:00
Max Kellermann
3c41e9f022 evnet/SocketMonitor: move WIN32/ERROR comment to PollGroupWinSelect.hxx 2017-11-10 19:57:54 +01:00
Max Kellermann
2670e13cbd util/{Const,Writable}Buffer: add static_assert to FromVoid() 2017-11-10 19:43:17 +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
Marcin Jurkowski
3b23cf0258 decoder/vorbis: scale and clip tremor-decoded samples to 15 bits
Tremor decoder is unusable since commit 2ee43c4. Sound is distorted to
the point where it's nothing but noise.

The data from vorbis_synthesis_pcmout() needs to be scaled and
clipped for 16 bit sample size. For reference see
http://lists.xiph.org/pipermail/tremor/2010-April/001642.html and
http://lists.xiph.org/pipermail/vorbis/2006-October/026513.html.

Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
2017-11-03 19:45:41 +01:00
Max Kellermann
55e6629fb4 output/Control: catch and log StartThread() exceptions 2017-10-30 08:39:44 +01:00
Max Kellermann
b6251c6968 pcm/Export: add "noexcept" 2017-10-26 12:29:13 +02:00
Max Kellermann
c51fe089ba pcm/Dop: add "noexcept" 2017-10-26 12:28:59 +02:00
Max Kellermann
fee9f1482c pcm/Pack: add "noexcept" 2017-10-26 12:28:21 +02:00
Max Kellermann
ae67f44c6e pcm/Dsd*: add "noexcept" 2017-10-26 12:26:50 +02:00
Max Kellermann
54dd1ad09b pcm/Order: add "noexcept" 2017-10-26 12:25:38 +02: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
034bb13e1c util/HugeAllocator: add missing "static inline"
Fixes the non-Linux build.
2017-10-26 09:01:06 +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
2a6d5583d1 lib/alsa: add "noexcept" 2017-10-26 08:24:14 +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