aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-29 17:08:51 +0100
committerMax Kellermann <max@duempel.org>2009-01-29 18:13:09 +0100
commita73266962fca665dbff4a80d1e1189b484dd948f (patch)
treef4925cc36847a7a3b696590faa6f22474f23cd30
parent1e0ceb3d881a89d360a72b373c0c0ffd6865ed43 (diff)
downloadmpd-a73266962fca665dbff4a80d1e1189b484dd948f.tar.gz
mpd-a73266962fca665dbff4a80d1e1189b484dd948f.tar.xz
mpd-a73266962fca665dbff4a80d1e1189b484dd948f.zip
jack: reduced sleep time to 1ms
When waiting for free space in the ring buffer, the JACK plugin sleeped 10ms until there is enough space. This delay was too large for low-latency setups (<10ms), and created a lot of xruns. Work around that by reducing the sleep time to 1ms. A proper solution for this would be to use an event based approach, and we will do it, just not now.
Diffstat (limited to '')
-rw-r--r--NEWS1
-rw-r--r--src/output/jack_plugin.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 3a38f2a7a..0caa90e96 100644
--- a/NEWS
+++ b/NEWS
@@ -37,6 +37,7 @@ ver 0.14.2 (2009/??/??)
* audio outputs:
- jack: allocate ring buffers before connecting
- jack: clear "shutdown" flag on reconnect
+ - jack: reduced sleep time to 1ms
ver 0.14.1 (2009/01/17)
diff --git a/src/output/jack_plugin.c b/src/output/jack_plugin.c
index 2e5d5d70f..14ce635dc 100644
--- a/src/output/jack_plugin.c
+++ b/src/output/jack_plugin.c
@@ -421,7 +421,7 @@ mpd_jack_play(void *data, const char *buff, size_t size)
} else {
/* XXX do something more intelligent to
synchronize */
- my_usleep(10000);
+ my_usleep(1000);
}
}