mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
wasapi2ringbuffer: Fix for desynced buffer-size and segsize
GstAudioRingBufferSpec::segsize has been configured by using device period but GstWasapi2RingBuffer was referencing the buffer size returned by IAudioClient::GetBufferSize() which is most likely larger than device period. Fixing to sync them. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1533>
This commit is contained in:
parent
e7c9960783
commit
009bc15f33
1 changed files with 6 additions and 0 deletions
|
@ -1053,6 +1053,12 @@ gst_wasapi2_ring_buffer_acquire (GstAudioRingBuffer * buf,
|
|||
|
||||
g_assert (period > 0);
|
||||
|
||||
if (self->buffer_size > period) {
|
||||
GST_INFO_OBJECT (self, "Updating buffer size %d -> %d", self->buffer_size,
|
||||
period);
|
||||
self->buffer_size = period;
|
||||
}
|
||||
|
||||
spec->segsize = period * GST_AUDIO_INFO_BPF (&buf->spec.info);
|
||||
spec->segtotal = 2;
|
||||
|
||||
|
|
Loading…
Reference in a new issue