| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
| |
"LOG_H" is a macro which is also used by ffmpeg/log.h. This is
ffmpeg's fault, because short macros should be reserved for
applications, but since it's always a good idea to choose prefixed
macro names, even for applications, we are going to do that in MPD.
|
|
|
|
|
| |
Don't return 0/-1 on success/error, but true/false. Instead of int,
use bool for storing flags.
|
|
|
|
|
| |
When there are standardized headers, use these instead of the bloated
os_compat.h.
|
|
|
|
|
|
|
|
|
|
|
|
| |
pause() puts the audio output into pause mode: if supported, it may
perform a special action, which keeps the device open, but does not
play anything. Output plugins like "shout" might want to play silence
during pause, so their clients won't be disconnected. Plugins which
do not support pausing will simply be closed, and have to be reopened
when unpaused.
This pach includes an implementation for the shout plugin, which
sends silence chunks.
|
|
|
|
|
|
| |
The function audio_output_is_pending() returns whether there is a
pending command. This is useful for output plugins as a break
condition for longer loops.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
The JACK output plugin needs to reset its "opened" flag when the JACK
server fails. To prevent it from accessing the audio_output struct
directly introduce the API function audio_output_closed().
|
|
|
|
|
|
| |
Reduce direct accesses to the audio_output struct from the plugins:
this time, eliminate all accesses to audio_output.name. The name is
required by some plugins for log messages.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Eliminate sameInAndOutFormats and check with audio_format_equals()
each time it this information is needed. Another 4 bytes saved.
|
|
|
|
|
| |
Instead of checking convertAudioFormat, we can simply check if
reqAudioFormat is defined. This saves 4 bytes in the struct.
|
|
|
|
| |
No CamelCase. Also don't declare typedefs for the methods.
|
|
|
|
|
| |
Since the plugin struct is never modified, we should store it in
constant locations.
|
|
|
|
|
| |
Instead of copying all that stuff from the audio output plugin to the
audio output structure, store a pointer to the plugin.
|
|
|
|
|
| |
Also rename AudioOutputPlugin to struct audio_output_plugin, and use
forward declarations to reduce include dependencies.
|
|
Just like decoder_api.h, output_api.h provides the audio output API
which is used by the plugins.
|