aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-10 20:41:27 +0100
committerMax Kellermann <max@duempel.org>2009-03-10 20:41:27 +0100
commit5dfad1d5d6493975a287f2b3c970540c62b97cc8 (patch)
tree2ce28028800aeb9d4e35f8273dfb3531f0ca5b73
parent92d74d4a78783f47c25dbea29bb361deee268cd4 (diff)
downloadmpd-5dfad1d5d6493975a287f2b3c970540c62b97cc8.tar.gz
mpd-5dfad1d5d6493975a287f2b3c970540c62b97cc8.tar.xz
mpd-5dfad1d5d6493975a287f2b3c970540c62b97cc8.zip
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.
-rw-r--r--src/output_thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/output_thread.c b/src/output_thread.c
index 786b04204..846f5e60e 100644
--- a/src/output_thread.c
+++ b/src/output_thread.c
@@ -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,