@@ -143,56 +143,59 @@
#undef IN_T
#undef SHIFT
+/* NetBSD provides standard types by default as both a typedef and a macro */
+#define concat(x,y,z) glue(glue(x,y),z)
+
t_sample *mixeng_conv[2][2][2][3] = {
{
{
{
- conv_natural_uint8_t_to_mono,
- conv_natural_uint16_t_to_mono,
- conv_natural_uint32_t_to_mono
+ concat(conv_natural_, uint8_t, _to_mono),
+ concat(conv_natural_, uint16_t, _to_mono),
+ concat(conv_natural_, uint32_t, _to_mono),
},
{
- conv_natural_uint8_t_to_mono,
- conv_swap_uint16_t_to_mono,
- conv_swap_uint32_t_to_mono,
+ concat(conv_natural_, uint8_t, _to_mono),
+ concat(conv_swap_, uint16_t, _to_mono),
+ concat(conv_swap_, uint32_t, _to_mono),
}
},
{
{
- conv_natural_int8_t_to_mono,
- conv_natural_int16_t_to_mono,
- conv_natural_int32_t_to_mono
+ concat(conv_natural_, int8_t, _to_mono),
+ concat(conv_natural_, int16_t, _to_mono),
+ concat(conv_natural_, int32_t, _to_mono)
},
{
- conv_natural_int8_t_to_mono,
- conv_swap_int16_t_to_mono,
- conv_swap_int32_t_to_mono
+ concat(conv_natural_, int8_t, _to_mono),
+ concat(conv_swap_, int16_t, _to_mono),
+ concat(conv_swap_, int32_t, _to_mono)
}
}
},
{
{
{
- conv_natural_uint8_t_to_stereo,
- conv_natural_uint16_t_to_stereo,
- conv_natural_uint32_t_to_stereo
+ concat(conv_natural_, uint8_t, _to_stereo),
+ concat(conv_natural_, uint16_t, _to_stereo),
+ concat(conv_natural_, uint32_t, _to_stereo)
},
{
- conv_natural_uint8_t_to_stereo,
- conv_swap_uint16_t_to_stereo,
- conv_swap_uint32_t_to_stereo
+ concat(conv_natural_, uint8_t, _to_stereo),
+ concat(conv_swap_, uint16_t, _to_stereo),
+ concat(conv_swap_, uint32_t, _to_stereo)
}
},
{
{
- conv_natural_int8_t_to_stereo,
- conv_natural_int16_t_to_stereo,
- conv_natural_int32_t_to_stereo
+ concat(conv_natural_, int8_t, _to_stereo),
+ concat(conv_natural_, int16_t, _to_stereo),
+ concat(conv_natural_, int32_t, _to_stereo)
},
{
- conv_natural_int8_t_to_stereo,
- conv_swap_int16_t_to_stereo,
- conv_swap_int32_t_to_stereo,
+ concat(conv_natural_, int8_t, _to_stereo),
+ concat(conv_swap_, int16_t, _to_stereo),
+ concat(conv_swap_, int32_t, _to_stereo),
}
}
}
@@ -202,52 +205,52 @@ f_sample *mixeng_clip[2][2][2][3] = {
{
{
{
- clip_natural_uint8_t_from_mono,
- clip_natural_uint16_t_from_mono,
- clip_natural_uint32_t_from_mono
+ concat(clip_natural_, uint8_t, _from_mono),
+ concat(clip_natural_, uint16_t, _from_mono),
+ concat(clip_natural_, uint32_t, _from_mono)
},
{
- clip_natural_uint8_t_from_mono,
- clip_swap_uint16_t_from_mono,
- clip_swap_uint32_t_from_mono
+ concat(clip_natural_, uint8_t, _from_mono),
+ concat(clip_swap_, uint16_t, _from_mono),
+ concat(clip_swap_, uint32_t, _from_mono)
}
},
{
{
- clip_natural_int8_t_from_mono,
- clip_natural_int16_t_from_mono,
- clip_natural_int32_t_from_mono
+ concat(clip_natural_, int8_t, _from_mono),
+ concat(clip_natural_, int16_t, _from_mono),
+ concat(clip_natural_, int32_t, _from_mono)
},
{
- clip_natural_int8_t_from_mono,
- clip_swap_int16_t_from_mono,
- clip_swap_int32_t_from_mono
+ concat(clip_natural_, int8_t, _from_mono),
+ concat(clip_swap_, int16_t, _from_mono),
+ concat(clip_swap_, int32_t, _from_mono)
}
}
},
{
{
{
- clip_natural_uint8_t_from_stereo,
- clip_natural_uint16_t_from_stereo,
- clip_natural_uint32_t_from_stereo
+ concat(clip_natural_, uint8_t, _from_stereo),
+ concat(clip_natural_, uint16_t, _from_stereo),
+ concat(clip_natural_, uint32_t, _from_stereo)
},
{
- clip_natural_uint8_t_from_stereo,
- clip_swap_uint16_t_from_stereo,
- clip_swap_uint32_t_from_stereo
+ concat(clip_natural_, uint8_t, _from_stereo),
+ concat(clip_swap_, uint16_t, _from_stereo),
+ concat(clip_swap_, uint32_t, _from_stereo)
}
},
{
{
- clip_natural_int8_t_from_stereo,
- clip_natural_int16_t_from_stereo,
- clip_natural_int32_t_from_stereo
+ concat(clip_natural_, int8_t, _from_stereo),
+ concat(clip_natural_, int16_t, _from_stereo),
+ concat(clip_natural_, int32_t, _from_stereo)
},
{
- clip_natural_int8_t_from_stereo,
- clip_swap_int16_t_from_stereo,
- clip_swap_int32_t_from_stereo
+ concat(clip_natural_, int8_t, _from_stereo),
+ concat(clip_swap_, int16_t, _from_stereo),
+ concat(clip_swap_, int32_t, _from_stereo)
}
}
}
Hi! Attached patch fixes the build errors: audio/mixeng.c:150: error: 'conv_natural_uint8_t_to_mono' undeclared here (not in a function) audio/mixeng.c:151: error: 'conv_natural_uint16_t_to_mono' undeclared here (not in a function) audio/mixeng.c:152: error: 'conv_natural_uint32_t_to_mono' undeclared here (not in a function) [...] NetBSD provides standard types by default as both a typedef and a macro hence the fix makes the function use match the function definition. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>