Commit Graph

7048 Commits

Author SHA1 Message Date
Max Kellermann df4db50904 DecoderList: add function decoder_plugins_supports_suffix()
Replaces decoder_plugin_from_suffix().
2013-12-29 16:59:57 +01:00
Max Kellermann decc4002a0 DecoderThread: use decoder_plugins_try()
.. instead of decoder_plugin_from_suffix().  This reduces overhead by
walking the array only once.
2013-12-29 16:51:18 +01:00
Max Kellermann 5bb563e3bc UpdateContainer: pass suffix instead of DecoderPlugin
Instead of using the first DecoderPlugin that supports the suffix, use
the first one that actually implements the "container_scan" method.
2013-12-29 16:46:02 +01:00
Max Kellermann 9be82891b0 TagFile: pass reference instead of pointer 2013-12-29 16:24:04 +01:00
Max Kellermann c97685fe6c TagFile: use decoder_plugins_try()
.. instead of decoder_plugin_from_suffix().  This reduces overhead by
walking the array only once.
2013-12-29 16:13:11 +01:00
Max Kellermann 358b671033 DecoderList: remove unused function decoder_plugin_from_mime_type() 2013-12-29 15:53:55 +01:00
Max Kellermann 92a4bf4441 Merge branch 'v0.18.x' 2013-12-29 14:18:19 +01:00
Max Kellermann e30b356eb0 daemon: no initgroups() when already running as the configured user
We can assume that initgroups() would be a no-op in that case, however
initgroups() is not allowed for unprivileged users anyway.
2013-12-29 13:59:05 +01:00
Max Kellermann 09a0803116 Daemon: fix typo in comment 2013-12-29 13:59:05 +01:00
Max Kellermann 20ffedc745 Daemon: simplify nested "if" 2013-12-29 13:57:12 +01:00
Max Kellermann 0b1ad27ba8 Daemon: fix typo in cast 2013-12-29 13:47:29 +01:00
Max Kellermann 5465647c2e input/smbclient: new input plugin 2013-12-29 01:25:27 +01:00
Max Kellermann a2baeed329 ls: add "pure" attribute 2013-12-29 01:25:27 +01:00
Max Kellermann 92aa464edb pcm/Volume: remove unused function pcm_volume_dither() 2013-12-28 18:39:26 +01:00
Max Kellermann da29298d4d pcm/PcmMix: improved dithering
Use the existing PcmDither library.
2013-12-28 18:30:27 +01:00
Max Kellermann afcf0795c4 pcm/Volume: improved dithering
Instead of just adding a rectangular random value before shifting back
to the normal scale, use the existing PcmDither library.
2013-12-28 18:30:24 +01:00
Max Kellermann 394e2815db pcm/PcmDither: inline Dither24To16() and Dither32To16() 2013-12-28 18:30:13 +01:00
Max Kellermann f3bbe4bb1f pcm/Volume: remove optimized i386 assembly
This code is unable to dither.  Until we implement that, let's remove
the code for now.  i386 isn't relevant anymore anyway.
2013-12-28 17:24:54 +01:00
Max Kellermann 2a3a18a283 pcm/Traits: use 32 bit integer for S8 long_type
16 bit is not enough for volume calculations.
2013-12-25 12:28:18 +01:00
Max Kellermann 431c80f4f0 pcm/Dither: add API documentation 2013-12-24 23:45:38 +01:00
Max Kellermann 9ac18c39a1 pcm/Dither: move shift from DitherConvert() to Dither()
All callers need this shift, so let's move it to the basic method.
2013-12-24 23:39:29 +01:00
Max Kellermann d1b7473418 pcm/Dither: rename DitherShift() to DitherConvert() 2013-12-24 23:38:11 +01:00
Max Kellermann 64e898f6db Merge tag 'release-0.18.6' 2013-12-24 12:20:24 +01:00
Max Kellermann 91fed47648 PlayerThread: log the last song that was played 2013-12-24 11:58:10 +01:00
Max Kellermann c05691b546 OutputControl: update both ReplayGainFilters
The "mode" of the second ReplayGainFilter was never set, and thus
replay gain was never applied to the new song during cross-fade.
2013-12-24 11:53:21 +01:00
Max Kellermann 1732166328 OutputThread: handle failing ReplayGainFilter::Open()
Since opening the PcmVolume object can now fail, this case must be
handled.
2013-12-24 10:52:33 +01:00
Max Kellermann 8edde7a4b3 pcm/Volume: convert to class
Prepare for adding state.
2013-12-23 10:58:37 +01:00
Max Kellermann d11a0c9f14 pcm/Volume: apply volume into destination buffer 2013-12-23 10:55:29 +01:00
Max Kellermann 7be2abe6b5 pcm/Volume: convert i386 code to template specialization 2013-12-23 10:35:35 +01:00
Max Kellermann 4a62cd4ad8 pcm/Volume: move code to template pcm_volume_sample() 2013-12-23 10:35:23 +01:00
Max Kellermann 6d21b9448a pcm/PcmVolume: rename to Volume.cxx 2013-12-23 10:35:21 +01:00
Max Kellermann 2d1a3073f6 pcm/PcmConvert: move the Domain instance to Domain.cxx
Rename pcm_convert_domain to pcm_domain.  Move it out so we can use it
without depending on the whole PcmConvert library.
2013-12-23 10:35:19 +01:00
Max Kellermann d7b9886387 ConfigData: initialise "used" in second constructor 2013-12-23 10:31:29 +01:00
Max Kellermann 1543e529f1 pcm/Dither: convert remaining methods to templates
Use the SampleTraits template and let the compiler generate a special
case for S32 instead of reusing S24_P32.
2013-12-22 22:18:06 +01:00
Max Kellermann 4043f320fe pcm/Dither: generic sample dithering using template 2013-12-22 22:06:25 +01:00
Max Kellermann 32b834aa04 pcm/Traits: include stddef.h for size_t 2013-12-22 22:06:25 +01:00
Max Kellermann b43ec3d6f0 pcm/Traits: add MIN and MAX
Move from PcmClamp().
2013-12-22 21:32:25 +01:00
Max Kellermann 316a25dead pcm/Volume: add constant PCM_VOLUME_BITS 2013-12-22 21:31:17 +01:00
Max Kellermann bfe020e06c pcm/Volume: make PCM_VOLUME_1 a "constexpr" 2013-12-22 21:20:40 +01:00
Max Kellermann 5aae560683 pcm/Prng: make pcm_prng() inline 2013-12-22 21:20:38 +01:00
Max Kellermann 86e72ffefb util/Clamp: generic Clamp() function 2013-12-22 21:08:06 +01:00
Max Kellermann 6416198e9f event/PollGroupPoll: include stddef.h instead of string.h 2013-12-21 21:21:25 +01:00
Max Kellermann 3c4cd9d08b input/alsa: fix build with gcc 4.6 2013-12-21 21:21:25 +01:00
Steven O'Brien 6b3b8c6f2e fix FfmpegDecoderPlugin to use relative timestamps 2013-12-20 22:28:33 +01:00
Steven O'Brien 35f85ddd86 add draft ALSA input plugin
I've created an elementary input plugin that plays sound from the
soundcard, so you can use MPD to listen to anything connected to the
line-in jack, or to Video4Linux FM radio cards that send audio through
the soundcard.  There has been a small number of posts here in the
past requesting line-in input, so here is a first, simplistic stab at
it.

The patch adds a new sheme, alsa://, which causes mpd to play data
read directly from a souncdard.  It defaults to hw:0,0, but you can
pass any ALSA device name in the URI.  So, using mpc for example:

 mpc add alsa://
 mpc play

will play from device hw:0,0.

To use a diffferent device:

 mpc add alsa://hw:1,0
2013-12-19 23:25:50 +01:00
Max Kellermann 45ad7696fe output/osx: fix typo 2013-12-19 12:46:21 +01:00
Max Kellermann d86cd4e4b4 util/fifo_buffer: remove obsolete library 2013-12-19 12:17:09 +01:00
Max Kellermann 0e84d71559 output/osx: use DynamicFifoBuffer instead of struct fifo_buffer 2013-12-19 12:16:29 +01:00
Max Kellermann a191db84f2 util/Error: add missing <algorithm> include
For std::move().
2013-12-19 10:58:20 +01:00
Max Kellermann 52dca859c7 util/PeakBuffer: use IsEmpty() instead of IsNull()
The DynamicFifoBuffer methods never return nullptr when the buffer is
empty or full; instead, they return an empty buffer.  This bug caused
an endless loop.
2013-12-19 10:30:26 +01:00