mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
audiofxbasefirfilter: Fix time-domain convolution with >1 channels
input_samples is the number of frames, but we used it as the number of samples. https://bugzilla.gnome.org/show_bug.cgi?id=747204
This commit is contained in:
parent
a0b69c8dac
commit
e11a537b65
1 changed files with 2 additions and 1 deletions
|
@ -116,6 +116,7 @@ process_##channels##_##width (GstAudioFXBaseFIRFilter * self, const g##ctype * s
|
|||
self->buffer = buffer = g_new0 (gdouble, self->buffer_length); \
|
||||
} \
|
||||
\
|
||||
input_samples *= channels; \
|
||||
/* convolution */ \
|
||||
for (i = 0; i < input_samples; i++) { \
|
||||
dst[i] = 0.0; \
|
||||
|
@ -155,7 +156,7 @@ process_##channels##_##width (GstAudioFXBaseFIRFilter * self, const g##ctype * s
|
|||
if (self->buffer_fill > kernel_length) \
|
||||
self->buffer_fill = kernel_length; \
|
||||
\
|
||||
return input_samples; \
|
||||
return input_samples / channels; \
|
||||
} G_STMT_END
|
||||
|
||||
DEFINE_PROCESS_FUNC (32, float);
|
||||
|
|
Loading…
Reference in a new issue