summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-02-05 12:24:04 +0100
committerSebastian Dröge <sebastian@centricular.com>2015-02-05 12:28:22 +0100
commit83e5fe2f70e593457d44a3b3a9effbf772b8025b (patch)
treec30501d4d891afd6370bbfdb7ba9963f7f90dd75 /sys
parent141fb455e8d354f268a58472631dec1aad600f86 (diff)
downloadgstreamer-plugins-bad-83e5fe2f70e593457d44a3b3a9effbf772b8025b.tar.gz
openslesringbuffer: Only pre-roll a single buffer
There is no reason to pre-roll more buffers here as we have our own ringbuffer with more segments around it, and we can immediately provide more buffers to OpenSL ES when it requests that from the callback. Pre-rolling a single buffer before starting is necessary though, as otherwise we will only output silence. Lowers latency a bit, depending on latency-time and buffer-time settings.
Diffstat (limited to 'sys')
-rw-r--r--sys/opensles/openslesringbuffer.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/opensles/openslesringbuffer.c b/sys/opensles/openslesringbuffer.c
index a853a1d80..74af26696 100644
--- a/sys/opensles/openslesringbuffer.c
+++ b/sys/opensles/openslesringbuffer.c
@@ -520,7 +520,6 @@ _opensles_player_start (GstAudioRingBuffer * rb)
{
GstOpenSLESRingBuffer *thiz = GST_OPENSLES_RING_BUFFER_CAST (rb);
SLresult result;
- gint i;
/* Register callback on the buffer queue */
if (!thiz->is_queue_callback_registered) {
@@ -534,11 +533,9 @@ _opensles_player_start (GstAudioRingBuffer * rb)
thiz->is_queue_callback_registered = TRUE;
}
- /* Fill the queue by enqueing buffers */
+ /* Fill the queue by enqueing a buffer */
if (!g_atomic_int_get (&thiz->is_prerolled)) {
- for (i = 0; i < thiz->data_segtotal; i++) {
- _opensles_player_cb (NULL, rb);
- }
+ _opensles_player_cb (NULL, rb);
g_atomic_int_set (&thiz->is_prerolled, 1);
}