We are currently experiencing downtime impacting viewing & cloning the Mesa repo, and some GitLab pages returning 503. Please see #freedesktop on IRC for more updates.

Commit d3a35870 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵 Committed by Sebastian Dröge

audio: const gpointer is not the same as gconstpointer/const void *

See https://bugzilla.gnome.org/show_bug.cgi?id=664491
parent e466226d
......@@ -112,14 +112,14 @@
#define MAKE_ORC_PACK_UNPACK(fmt,fmt_t) \
static void unpack_ ##fmt (const GstAudioFormatInfo *info, \
GstAudioPackFlags flags, gpointer dest, \
const gpointer data, gint length) { \
gconstpointer data, gint length) { \
if (flags & GST_AUDIO_PACK_FLAG_TRUNCATE_RANGE) \
audio_orc_unpack_ ##fmt_t (dest, data, length); \
else \
audio_orc_unpack_ ##fmt (dest, data, length); \
} \
static void pack_ ##fmt (const GstAudioFormatInfo *info, \
GstAudioPackFlags flags, const gpointer src, \
GstAudioPackFlags flags, gconstpointer src, \
gpointer data, gint length) { \
audio_orc_pack_ ##fmt (data, src, length); \
}
......@@ -161,21 +161,21 @@ MAKE_ORC_PACK_UNPACK (s8, s8_trunc)
#define MAKE_PACK_UNPACK(name, stride, sign, scale, READ_FUNC, WRITE_FUNC) \
static void unpack_ ##name (const GstAudioFormatInfo *info, \
GstAudioPackFlags flags, gpointer dest, \
const gpointer data, gint length) \
gconstpointer data, gint length) \
{ \
guint32 *d = dest; \
guint8 *s = data; \
const guint8 *s = data; \
for (;length; length--) { \
*d++ = (((gint32) READ_FUNC (s)) << scale) ^ (sign); \
s += stride; \
} \
} \
static void pack_ ##name (const GstAudioFormatInfo *info, \
GstAudioPackFlags flags, const gpointer src, \
GstAudioPackFlags flags, gconstpointer src, \
gpointer data, gint length) \
{ \
gint32 tmp; \
guint32 *s = src; \
const guint32 *s = src; \
guint8 *d = data; \
for (;length; length--) { \
tmp = (*s++ ^ (sign)) >> scale; \
......
......@@ -200,7 +200,7 @@ typedef enum
*/
typedef void (*GstAudioFormatUnpack) (const GstAudioFormatInfo *info,
GstAudioPackFlags flags, gpointer dest,
const gpointer data, gint length);
gconstpointer data, gint length);
/**
* GstAudioFormatPack:
* @info: a #GstAudioFormatInfo
......@@ -215,7 +215,7 @@ typedef void (*GstAudioFormatUnpack) (const GstAudioFormatInfo *info,
* and will be packed into @data.
*/
typedef void (*GstAudioFormatPack) (const GstAudioFormatInfo *info,
GstAudioPackFlags flags, const gpointer src,
GstAudioPackFlags flags, gconstpointer src,
gpointer data, gint length);
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment