/* Must be called with transform lock! */
static void
-alloc_history (GstIirEqualizer * equ)
+alloc_history (GstIirEqualizer * equ, const GstAudioInfo * info)
{
/* free + alloc = no memcpy */
g_free (equ->history);
equ->history =
- g_malloc0 (equ->history_size * GST_AUDIO_FILTER_CHANNELS (equ) *
+ g_malloc0 (equ->history_size * GST_AUDIO_INFO_CHANNELS (info) *
equ->freq_band_count);
}
}
}
- alloc_history (equ);
+ alloc_history (equ, GST_AUDIO_FILTER_INFO (equ));
/* set center frequencies and name band objects
* FIXME: arg! we can't change the name of parented objects :(
}
BANDS_UNLOCK (equ);
- gst_buffer_map (buf, &map, GST_MAP_WRITE);
+ gst_buffer_map (buf, &map, GST_MAP_READWRITE);
equ->process (equ, map.data, map.size, channels);
gst_buffer_unmap (buf, &map);
return FALSE;
}
- alloc_history (equ);
+ alloc_history (equ, info);
return TRUE;
}
#define EQUALIZER_CAPS_STRING \
"audio/x-raw, " \
"format = (string) "GST_AUDIO_NE (F64) ", " \
+ "layout = (string) interleaved, " \
"channels = (int) 1, " \
"rate = (int) 48000"
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw, "
"format = (string) " GST_AUDIO_NE (F64) ", "
+ "layout = (string) interleaved, "
"channels = (int) 1, " "rate = (int) 48000")
);
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw, "
"format = (string) " GST_AUDIO_NE (F64) ", "
+ "layout = (string) interleaved, "
"channels = (int) 1, " "rate = (int) 48000")
);