output: one thread per audio output

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.
This commit is contained in:
Max Kellermann
2008-09-24 07:20:26 +02:00
parent 8f4ebf0caf
commit d32f49a90b
6 changed files with 218 additions and 38 deletions

View File

@@ -98,6 +98,10 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param)
} else
audio_format_clear(&ao->reqAudioFormat);
ao->thread = 0;
notify_init(&ao->notify);
ao->command = AO_COMMAND_NONE;
if (plugin->init(ao, param) != 0)
return 0;