mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
audiobuffersplit: Calculate the correct size for fixed size buffers
Fix the output-buffer-size property to do what it says by calculating the correct audio buffer size for that target size, rounded down to the nearest whole number of samples. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1887>
This commit is contained in:
parent
c123b79900
commit
1b3ba87d13
1 changed files with 3 additions and 2 deletions
|
@ -230,8 +230,9 @@ gst_audio_buffer_split_update_samples_per_buffer (GstAudioBufferSplit * self)
|
|||
}
|
||||
|
||||
if (self->output_buffer_size) {
|
||||
self->output_buffer_duration_n = GST_AUDIO_INFO_BPF (&self->info);
|
||||
self->output_buffer_duration_d = self->output_buffer_size;
|
||||
self->output_buffer_duration_n =
|
||||
self->output_buffer_size / GST_AUDIO_INFO_BPF (&self->info);
|
||||
self->output_buffer_duration_d = GST_AUDIO_INFO_RATE (&self->info);
|
||||
}
|
||||
|
||||
self->samples_per_buffer =
|
||||
|
|
Loading…
Reference in a new issue