spectrum: pull format to temp var to improve readability of lines using it

This commit is contained in:
Stefan Kost 2011-03-09 12:38:52 +02:00
parent b60675acaf
commit 5b9028c52c

View file

@ -596,13 +596,12 @@ gst_spectrum_transform_ip (GstBaseTransform * trans, GstBuffer * buffer)
{ {
GstSpectrum *spectrum = GST_SPECTRUM (trans); GstSpectrum *spectrum = GST_SPECTRUM (trans);
guint i; guint i;
guint rate = GST_AUDIO_FILTER (spectrum)->format.rate; GstRingBufferSpec *format = &GST_AUDIO_FILTER (spectrum)->format;
guint channels = GST_AUDIO_FILTER (spectrum)->format.channels; guint rate = format->rate;
gfloat max_value = guint channels = format->channels;
(1UL << (GST_AUDIO_FILTER (spectrum)->format.depth - 1)) - 1; guint width = format->width / 8;
guint width = GST_AUDIO_FILTER (spectrum)->format.width / 8; gboolean is_float = (format->type == GST_BUFTYPE_FLOAT);
gboolean is_float = gfloat max_value = (1UL << (format->depth - 1)) - 1;
(GST_AUDIO_FILTER (spectrum)->format.type == GST_BUFTYPE_FLOAT);
guint bands = spectrum->bands; guint bands = spectrum->bands;
guint nfft = 2 * bands - 2; guint nfft = 2 * bands - 2;
guint input_pos; guint input_pos;