aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_thread.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* output: make "struct audio_output" opaque for output pluginsMax Kellermann2008-09-241-5/+7
| | | | | | | | | | | 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.
* output: set audio_output->open=1 in audio_output_task()Max Kellermann2008-09-241-1/+7
| | | | | Since the output plugin returns a value indicating success or error, we can have the output core code assign the "open" flag.
* output: pass audio_format to plugin.init() and plugin.open()Max Kellermann2008-09-241-1/+1
| | | | | | | 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.
* output: one thread per audio outputMax Kellermann2008-09-241-0/+121
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.