| Commit message (Collapse) | Author | Files | Lines |
|
|
|
Use the plugin instead of the glue code in normalize.c. This is used
wrapped inside a "autoconv" filter, to enable normalization for all
input file formats.
|
|
|
|
|
|
|
|
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.
|
|
Always keep the audio_output object locked within the output thread,
unless a plugin method is called. This fixes several race conditions.
|
|
With these methods, an output plugin can allocate some global
resources only if it is actually enabled. The method enable() is
called after daemonization, which allows for more sophisticated
resource allocation during that method.
|
|
An asterisk means that this attribute should not be enforced, and
stays whatever it used to be. This way, some configuration values
work like masks.
|
|
This allows more sophisticated audio format selection.
|
|
This allows the mixer object to access its associated audio output
object.
|
|
|
|
It's a double pointer.
|
|
Fix stuttering due to uninitialized variable.
|
|
Do all the software volume stuff inside each output thread, not in the
player thread. This allows one software mixer per output device, and
also allows the user to configure the mixer type (hardware or
software) for each audio output.
This moves the global "mixer_type" setting into the "audio_output"
section, deprecating the "mixer_enabled" flag.
|
|
The "convert" filter must be the last filter in the chain. Ensure
that by doing its initialization at the very end of
audio_output_init().
|
|
|
|
|
|
This patch adds initial filter support for audio outputs. Each audio
output gets a "filter" attribute, which is used by ao_play_chunk().
The PCM conversion is now performed by convert_filter_plugin.
audio_output.convert_state has been removed.
|
|
|
|
Added the per-device option "mixer_enabled" which allows users to
disable the hardware mixer of an audio output.
|
|
The mixer core library is now responsible for creating and managing
the mixer object. This removes duplicated code from the output
plugins.
|
|
The config_audio_format used to contain the configured audio format,
which is copied to out_audio_format. Let's convert the former to a
boolean, which indicates whether out_audio_format was already set.
This simplifies some code and saves a few bytes.
|
|
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.
|
|
Instead of passing individual buffers to audio_output_all_play(), pass
music_chunk objects. Append all those chunks asynchronously to a
music_pipe instance. All output threads may then read chunks from
this pipe. This reduces MPD's internal latency by an order of
magnitude.
|
|
Use config_get_block_string() and manual GError handling instead.
|
|
Do error handling with GError instead of aborting with g_error().
|
|
|
|
time() is not a monotonic timer, and MPD might get confused by clock
skews. clock_gettime() provides a monotonic clock, but is not
portable to non-POSIX systems (i.e. Windows). This patch uses GLib's
GTimer API, which aims to be portable.
|
|
The option "enabled" is on by default. If you specify "enabled no" in
an audio_output section, then this device is disabled by default.
|
|
Use GLib's GError library for reporting output device failures.
Note that some init() methods don't clean up properly after a failure,
but that's ok for now, because the MPD core will abort anyway.
|
|
Return true/false instead of 1/0.
|
|
|
|
audio_output_get_name() has been removed, which was the only function
left in output_api.h. The output plugin doesn't need the audio_output
object at all, remove the parameter from the init() method.
|
|
Similar to the decoder plugin API: added wrapper functions to increase
code readability.
|
|
Added audio_format_parse() in a separate library, with a modern
interface: return a GError instead of logging errors. This allows the
caller to deal with the error.
|
|
Renamed audio_output struct members.
|
|
All config_get_block_*() functions should accept constant config_param
pointers.
|
|
Renamed functions, types, variables.
|
|
Removed yet another superfluous buffer layer: return the PCM buffer
from pcm_convert() instead of copying PCM data into the
caller-supplied buffer.
|
|
|
|
|
|
When one of several output devices failed, MPD tried to reopen it
quite often, wasting a lot of resources. This patch adds a delay:
wait 10 seconds before retrying. This might be changed to exponential
delays later, but for now, it makes the problem go away.
|
|
|
|
Don't return 0/-1 on success/error, but true/false. Instead of int,
use bool for storing flags.
|
|
Instead of manually calling memset(0) on the pcm_convert_state struct,
client code should use a library function from pcm_utils.c. This way,
we can change the semantics of the struct easily.
|
|
No CamelCase, and a struct instead of a typedef.
|
|
We have eliminated direct accesses to the audio_output struct from
the all output plugins. Make it opaque for them, and move its real
declaration to output_internal.h, similar to decoder_internal.h.
Pass the opaque structure to plugin.init() only, which will return the
plugin's data pointer on success, and NULL on failure. This data
pointer will be passed to all other methods instead of the
audio_output struct.
|
|
Pass the globally configured audio_format as a const pointer to
plugin.init(). plugin.open() gets a writable pointer which contains
the audio_format requested by the plugin. Its initial value is either
the configured audio_format or the input file's audio_format.
|
|
To keep I/O nastiness and latencies away from the core, move the audio
output code to a separate thread, one per output. The thread is
created on demand, and currently runs until mpd exits.
|