| Commit message (Collapse) | Author | Files | Lines |
|
|
|
Make it in_frame_size and out_frame_size, to account for packing.
|
|
For simplicity, the MPD core should not have to deal with packing. It
is rarely used, and those plugins that need it should use the
pcm_export library instead.
|
|
|
|
Converts padded 24 bit samples to packed 24 bit samples. Will replace
the packed S24 sample format, which is not used internally.
|
|
|
|
Let the caller configure the audio_format object.
|
|
Merge three functions into one and call get_bitformat() only once.
|
|
|
|
Eliminate support for reverse endian samples from the MPD core. This
moves a lot of complexity to the plugins that really need it (only
ALSA and CDIO currently).
|
|
Don't use audio_format.reverse_endian.
|
|
|
|
This format is unused since the DSDIFF decoder plugin now reverses the
bit order.
|
|
|
|
Basic support for Direct Stream Digital. No conversion yet, and no
decoder/output plugin support.
|
|
Support for conversion from float to 16, 24 and 32 bit integer
samples.
|
|
Pass audio_output objects around instead of void pointers. This will
give some more control to the plugin, and prepares for non-blocking
audio outputs.
|
|
Consistent naming.
|
|
Move the "extern" declarations from output_list.c, for more type
safety.
|
|
|
|
|
|
|
|
|
|
|
|
More code simplification. Probe all formats, no matter which input
format.
|
|
Remove the debug log messages, because they are duplicate (see
ao_open() in output_thread.c).
|
|
|
|
|
|
|
|
This patch prepares support for floating point samples (and probably
other formats). It changes the meaning of the "bits" attribute from a
bit count to a symbolic value.
|
|
After we've been hit by Large File Support problems several times in
the past week (which only occur on 32 bit platforms, which I don't
have), this is yet another attempt to fix the issue.
|
|
ALSA passes full period buffers to the hardware. If an application
doesn't finish writing a period, libasound will nonetheless send the
partial buffer (with undefined trailing data). This causes noise at
the end of playback. This patch attempts to track the current
position within the period buffer, and generates silence at the end,
before calling snd_pcm_drain().
|
|
Reintroduce a fix from commit 52a0653 (Warren Dukes): "don't call
snd_pcm_drain unless we're already in the RUNNING state". This prevents
ALSA with dmix from sometimes hanging when snd_pcm_drain is called, e.g.
when moving from one song to the next (as in mantis issue 2634).
|
|
drain() is the opposite of cancel(): it waits until all data in the
buffer has finished playing. Instead of implicitly draining in the
close() method like the ALSA plugin has been doing it forever, let the
output thread decide whether to drain or to cancel.
|
|
The recovery is for nothing if we get CLOSE afterwards. Let's not
recover in the cancel() method, and let the next play() call sort it
out.
|
|
|
|
|
|
Call snd_config_update_free_global() manually in our finish() method,
don't use atexit().
|
|
The mixer core library is now responsible for creating and managing
the mixer object. This removes duplicated code from the output
plugins.
|
|
This patch allows the output plugins to import only mixer_list.h,
instead of the full mixer_api.h (which would expose internal
structures).
|
|
mixer_control.h should provide the functions needed to manipulate a
mixer, without exposing the internal mixer API (which is provided by
mixer_api.h).
|
|
This updates the copyright header to all be the same, which is
pretty much an update of where to mail request for a copy of the GPL
and the years of the MPD project. This also puts all committers under
'The Music Player Project' umbrella. These entries should go
individually in the AUTHORS file, for consistancy.
|
|
snd_pcm_writei() returns the type snd_pcm_sframes_t, not int. Use the
correct variable type.
|
|
If the PCM handle gets disconnected, don't close and clear it in
alsa_recover(). The MPD core will call alsa_close() anyway. This
way, we can always assume that alsa_data.pcm is always valid.
|
|
This patch fixes a theoretical (but practically impossible) flaw: the
variable "buffer_time" may be uninitialized when it is used.
Initialize the variable with snd_pcm_hw_params_get_buffer_time().
|
|
The default values for buffer_time and period_time were both capped by
the hardware limits on practically all chips. The result was a
period_time which was half as big as the buffer_time. On some chips,
this led to lots of underruns when using a high sample rate (192 kHz),
because MPD had very little time to send new samples to ALSA.
A period time which is one fourth of the buffer time turned out to be
much better. If no period_time is configured, see how much
buffer_time the hardware accepts, and try to configure one fourth of
it as period_time, instead of hard-coding the default period_time
value.
This is yet another attempt to provide a solution which is valid for
all sound chips. Using the SND_PCM_NONBLOCK flag also seemed to solve
the underruns, but put a lot more CPU load to MPD.
|
|
Log the real period and buffer size. This might be useful when
debugging xruns. Note that the same information is available in
/proc/asound/card*/pcm*p/sub*/hw_params
|
|
There are a few high-end devices (e.g. ICE1724) which cannot even play
16 bit audio. Try the 32 bit fallback, which we already implemented
for 24 bit.
|
|
Some sound chips/drivers (e.g. Intel HDA) don't support 24 bit
samples, they want to get 32 bit instead. Now that MPD's PCM library
supports 32 bit, add a 32 bit fallback when 24 bit is not supported.
|
|
The MPD core logs the audio format of all audio outputs. Remove the
duplicate message from the plugins.
|