Commit 5dfad1d5 authored by Max Kellermann's avatar Max Kellermann

output_thread: check commands while playing

Check audio_output.command after each sub-chunk has been played. It discards the rest of the chunk, but since all commands make the device stop anyway, this is not a problem, but part of the improvement. This improves the latency of audio output commands.
parent 92d74d4a
......@@ -87,7 +87,7 @@ ao_play_chunk(struct audio_output *ao, const struct music_chunk *chunk)
return true;
}
while (size > 0) {
while (size > 0 && ao->command == AO_COMMAND_NONE) {
size_t nbytes;
nbytes = ao_plugin_play(ao->plugin, ao->data, data, size,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment