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.
This commit is contained in:
parent
92d74d4a78
commit
5dfad1d5d6
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user