opensles: use 0.25s segments in the sink to lower latency
This commit is contained in:
parent
5612936d1a
commit
1694befac6
@ -435,13 +435,9 @@ _opensles_player_acquire (GstRingBuffer * rb, GstRingBufferSpec * spec)
|
|||||||
_opensles_player_change_mute (rb);
|
_opensles_player_change_mute (rb);
|
||||||
|
|
||||||
/* Define our ringbuffer in terms of number of buffers and buffer size. */
|
/* Define our ringbuffer in terms of number of buffers and buffer size. */
|
||||||
spec->segsize = (spec->rate * spec->bytes_per_sample);
|
spec->segsize = (spec->rate * spec->bytes_per_sample) >> 2;
|
||||||
spec->segtotal = 4;
|
spec->segtotal = 16;
|
||||||
/* In the Nexus7 device where I'm testing seems that I need buffers of
|
thiz->last_clearseg = 1 - spec->segtotal;
|
||||||
* min 1 second of audio.
|
|
||||||
* Then here we created 4 segments of a second and a queue of 2 buffers
|
|
||||||
* in order to properly clear the older segment */
|
|
||||||
thiz->last_clearseg = -3;
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user