diff options
author | Tanu Kaskinen <tanu.kaskinen@intel.com> | 2013-05-07 18:00:34 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanu.kaskinen@linux.intel.com> | 2013-06-11 13:46:44 +0300 |
commit | 1e42a289d40af1c656bb606ec6d7152e212c284b (patch) | |
tree | f0c84ea3fd738fb2be92512d1be5d40ae8927949 | |
parent | ecf3ab2b5788c85c237eeb6429bd1d525b9ac0cc (diff) |
native: Don't enable prebuffering when draining
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=64284
-rw-r--r-- | src/pulsecore/protocol-native.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index 96b6850b3..708878ed1 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -1555,7 +1555,13 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int windex = pa_memblockq_get_write_index(s->memblockq); - pa_memblockq_prebuf_force(s->memblockq); + /* We enable prebuffering so that after CORKED -> RUNNING + * transitions we don't have trouble with underruns in case the + * buffer has too little data. This must not be done when draining + * has been requested, however, otherwise the buffered audio would + * never play. */ + if (!s->drain_request) + pa_memblockq_prebuf_force(s->memblockq); handle_seek(s, windex); |