gst/volume/gstvolume.c: Unbreak volume, value remains gint.

Original commit message from CVS:
* gst/volume/gstvolume.c: (volume_process_int16),
(volume_process_int16_clamp), (volume_set_caps):
Unbreak volume, value remains gint.
This commit is contained in:
Stefan Kost 2007-02-21 13:55:54 +00:00
parent b8dfedde6a
commit 1b01b41b69
2 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2007-02-21 Stefan Kost <ensonic@users.sf.net>
* gst/volume/gstvolume.c: (volume_process_int16),
(volume_process_int16_clamp), (volume_set_caps):
Unbreak volume, value remains gint.
2007-02-21 Stefan Kost <ensonic@users.sf.net> 2007-02-21 Stefan Kost <ensonic@users.sf.net>
* gst/volume/gstvolume.c: (volume_choose_func), * gst/volume/gstvolume.c: (volume_choose_func),

View file

@ -412,7 +412,8 @@ static void
volume_process_int16 (GstVolume * this, gpointer bytes, guint n_bytes) volume_process_int16 (GstVolume * this, gpointer bytes, guint n_bytes)
{ {
gint16 *data = (gint16 *) bytes; gint16 *data = (gint16 *) bytes;
guint i, val, num_samples; guint i, num_samples;
gint val;
num_samples = n_bytes / sizeof (gint16); num_samples = n_bytes / sizeof (gint16);
@ -432,7 +433,8 @@ static void
volume_process_int16_clamp (GstVolume * this, gpointer bytes, guint n_bytes) volume_process_int16_clamp (GstVolume * this, gpointer bytes, guint n_bytes)
{ {
gint16 *data = (gint16 *) bytes; gint16 *data = (gint16 *) bytes;
guint i, val, num_samples; guint i, num_samples;
gint val;
num_samples = n_bytes / sizeof (gint16); num_samples = n_bytes / sizeof (gint16);
@ -470,10 +472,10 @@ volume_set_caps (GstBaseTransform * base, GstCaps * incaps, GstCaps * outcaps)
/* based on mimetype, choose the correct volume_process format */ /* based on mimetype, choose the correct volume_process format */
if (strcmp (mimetype, "audio/x-raw-int") == 0) { if (strcmp (mimetype, "audio/x-raw-int") == 0) {
this->format = GST_VOLUME_FORMAT_INT; this->format = GST_VOLUME_FORMAT_INT;
GST_DEBUG_OBJECT (this, "use int"); GST_DEBUG_OBJECT (this, "use int: %u", this->width);
} else if (strcmp (mimetype, "audio/x-raw-float") == 0) { } else if (strcmp (mimetype, "audio/x-raw-float") == 0) {
this->format = GST_VOLUME_FORMAT_FLOAT; this->format = GST_VOLUME_FORMAT_FLOAT;
GST_DEBUG_OBJECT (this, "use float"); GST_DEBUG_OBJECT (this, "use float: %u", this->width);
} else { } else {
this->process = NULL; this->process = NULL;
goto invalid_format; goto invalid_format;