Hi Kent,
On Wednesday 24 August 2005 08:01, Kent Sandvik wrote:
> There are two case statements with the same label in the code, AFMT_S32, on
> line 520 and 558. I suspect the one on line 520 is the newer one, but I
> don't want to check this in, better let the one who changed the code do it.
It's two #defines and a weird (or just new) Linux soundcard.h that results in
two identical case labels. There was a discussion on this a few weeks back,
and someone posted a fix to include the proper values for AFMT_S24_xE etc.
I'm using that (see attachment); works for me, but I don't know if it's
proper. Not sure why this isn't a common problem, or why my linux doesn't
have those definitions..
Cheers,
Rob
--
Give a man a fish, he owes you one fish.
Teach a man to fish, you give up your monopoly on fisheries.
Index: src/core/core_sound.c
===================================================================
RCS file: /cvs/directfb/FusionSound/src/core/core_sound.c,v
retrieving revision 1.46
diff -u -3 -p -r1.46 core_sound.c
--- src/core/core_sound.c 26 Jul 2005 16:20:08 -0000 1.46
+++ src/core/core_sound.c 23 Aug 2005 08:19:07 -0000
@@ -64,23 +64,40 @@
/******************************************************************************/
+/* in the event we don't have the extended soundcard.h, we still need
+ to compile successfully. Supply definitions */
+
+#ifndef AFMT_S24_LE
+# define AFMT_S24_LE 0x00000800
+#endif
+#ifndef AFMT_S24_BE
+# define AFMT_S24_BE 0x00001000
+#endif
+#ifndef AFMT_U24_LE
+# define AFMT_U24_LE 0x00002000
+#endif
+#ifndef AFMT_U24_BE
+# define AFMT_U24_BE 0x00004000
+#endif
+#ifndef AFMT_S32_LE
+# define AFMT_S32_LE 0x00008000
+#endif
+#ifndef AFMT_S32_BE
+# define AFMT_S32_BE 0x00010000
+#endif
+#ifndef AFMT_U32_LE
+# define AFMT_U32_LE 0x00020000
+#endif
+#ifndef AFMT_U32_BE
+# define AFMT_U32_BE 0x00040000
+#endif
+
+
#ifdef WORDS_BIGENDIAN
-# ifndef AFMT_S24_BE
-# define AFMT_S24_BE AFMT_QUERY
-# endif
-# ifndef AFMT_S32_BE
-# define AFMT_S32_BE AFMT_QUERY
-# endif
# define AFMT_S16 AFMT_S16_BE
# define AFMT_S24 AFMT_S24_BE
# define AFMT_S32 AFMT_S32_BE
#else
-# ifndef AFMT_S24_LE
-# define AFMT_S24_LE AFMT_QUERY
-# endif
-# ifndef AFMT_S32_LE
-# define AFMT_S32_LE AFMT_QUERY
-# endif
# define AFMT_S16 AFMT_S16_LE
# define AFMT_S24 AFMT_S24_LE
# define AFMT_S32 AFMT_S32_LE
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev