channelmix: fix up API a little
authorWim Taymans <wtaymans@redhat.com>
Fri, 30 Oct 2015 16:33:32 +0000 (17:33 +0100)
committerWim Taymans <wtaymans@redhat.com>
Fri, 30 Oct 2015 16:51:47 +0000 (17:51 +0100)
don't use gpointer * for something that should be gpointer.

gst/audioconvert/gstchannelmix.c
gst/audioconvert/gstchannelmix.h

index 4051aaa..34304df 100644 (file)
@@ -739,7 +739,7 @@ gst_channel_mix_is_passthrough (GstChannelMix * mix)
  * you might need later on! */
 static void
 gst_channel_mix_mix_int (GstChannelMix * mix,
-    gint32 * in_data, gint32 * out_data, gint samples)
+    const gint32 * in_data, gint32 * out_data, gint samples)
 {
   gint in, out, n;
   gint64 res;
@@ -780,7 +780,7 @@ gst_channel_mix_mix_int (GstChannelMix * mix,
 
 static void
 gst_channel_mix_mix_double (GstChannelMix * mix,
-    gdouble * in_data, gdouble * out_data, gint samples)
+    const gdouble * in_data, gdouble * out_data, gint samples)
 {
   gint in, out, n;
   gdouble res;
@@ -829,7 +829,7 @@ gst_channel_mix_mix_double (GstChannelMix * mix,
  */
 void
 gst_channel_mix_mix (GstChannelMix * mix, GstAudioFormat format,
-    GstAudioLayout layout, gpointer * in_data, gpointer * out_data,
+    GstAudioLayout layout, const gpointer in_data, gpointer out_data,
     gint samples)
 {
   g_return_if_fail (mix != NULL);
@@ -838,11 +838,11 @@ gst_channel_mix_mix (GstChannelMix * mix, GstAudioFormat format,
 
   switch (format) {
     case GST_AUDIO_FORMAT_S32:
-      gst_channel_mix_mix_int (mix, (gint32 *) in_data, (gint32 *) out_data,
-          samples);
+      gst_channel_mix_mix_int (mix, (const gint32 *) in_data,
+          (gint32 *) out_data, samples);
       break;
     case GST_AUDIO_FORMAT_F64:
-      gst_channel_mix_mix_double (mix, (gdouble *) in_data,
+      gst_channel_mix_mix_double (mix, (const gdouble *) in_data,
           (gdouble *) out_data, samples);
       break;
     default:
index 6db4f2e..97dd0de 100644 (file)
@@ -59,8 +59,8 @@ gboolean        gst_channel_mix_is_passthrough     (GstChannelMix *mix);
 void            gst_channel_mix_mix             (GstChannelMix   * mix,
                                                  GstAudioFormat    format,
                                                  GstAudioLayout    layout,
-                                                 gpointer        * in_data,
-                                                 gpointer        * out_data,
+                                                 const gpointer    in_data,
+                                                 gpointer          out_data,
                                                  gint              samples);
 
 #endif /* __GST_CHANNEL_MIX_H__ */