[MPlayer-users] error compiling: libao2: missing AFMT_U* defines

Walter Haidinger walter.haidinger at gmx.at
Fri Dec 31 16:52:25 CET 2004


On Fri, 31 Dec 2004, Reimar Döffinger wrote:

> Thanks, but we need a unified diff (diff -u ). 

No problem, a new unified diff is attached.

> Also they should be ifdefed separately, with your patch nobody (at least 
> with comercial OSS headers) will be able to use the 24 and 32 bit 
> formats even if the soundcard supports it. I would suggest something 
> like
[--cut--]
> But that might be considered overkill...

Well, I don't think so. It may be more ugly but it is more generic too. 

> If you are subscribed, you can submit the patch directly to the -dev-eng
> list. Other wise I can do that.

Yes, please do! I'm not subscribed to the devel list(s).

Thanks, Walter
-------------- next part --------------
--- libao2/ao_oss.c.orig	2004-12-29 20:26:01.000000000 +0100
+++ libao2/ao_oss.c	2004-12-31 16:35:48.672903263 +0100
@@ -50,16 +50,28 @@
     case AF_FORMAT_U16_BE: return AFMT_U16_BE;
     case AF_FORMAT_S16_LE: return AFMT_S16_LE;
     case AF_FORMAT_S16_BE: return AFMT_S16_BE;
-#ifdef AFMT_S24_LE
+#ifdef AFMT_U24_LE
     case AF_FORMAT_U24_LE: return AFMT_U24_LE;
+#endif
+#ifdef AFMT_U24_BE
     case AF_FORMAT_U24_BE: return AFMT_U24_BE;
+#endif
+#ifdef AFMT_S24_LE
     case AF_FORMAT_S24_LE: return AFMT_S24_LE;
+#endif
+#ifdef AFMT_S24_BE
     case AF_FORMAT_S24_BE: return AFMT_S24_BE;
 #endif
-#ifdef AFMT_S32_LE
+#ifdef AFMT_U32_LE
     case AF_FORMAT_U32_LE: return AFMT_U32_LE;
+#endif
+#ifdef AFMT_U32_BE
     case AF_FORMAT_U32_BE: return AFMT_U32_BE;
+#endif
+#ifdef AFMT_S32_LE
     case AF_FORMAT_S32_LE: return AFMT_S32_LE;
+#endif
+#ifdef AFMT_S32_BE
     case AF_FORMAT_S32_BE: return AFMT_S32_BE;
 #endif
 #ifdef AFMT_FLOAT
@@ -90,16 +102,28 @@
     case AFMT_U16_BE: return AF_FORMAT_U16_BE;
     case AFMT_S16_LE: return AF_FORMAT_S16_LE;
     case AFMT_S16_BE: return AF_FORMAT_S16_BE;
-#ifdef AFMT_S24_LE
+#ifdef AFMT_U24_LE
     case AFMT_U24_LE: return AF_FORMAT_U24_LE;
+#endif
+#ifdef AFMT_U24_BE
     case AFMT_U24_BE: return AF_FORMAT_U24_BE;
+#endif
+#ifdef AFMT_S24_LE
     case AFMT_S24_LE: return AF_FORMAT_S24_LE;
+#endif
+#ifdef AFMT_S24_BE
     case AFMT_S24_BE: return AF_FORMAT_S24_BE;
 #endif
-#ifdef AFMT_S32_LE
+#ifdef AFMT_U32_LE
     case AFMT_U32_LE: return AF_FORMAT_U32_LE;
+#endif
+#ifdef AFMT_U32_BE
     case AFMT_U32_BE: return AF_FORMAT_U32_BE;
+#endif
+#ifdef AFMT_S32_LE
     case AFMT_S32_LE: return AF_FORMAT_S32_LE;
+#endif
+#ifdef AFMT_S32_BE
     case AFMT_S32_BE: return AF_FORMAT_S32_BE;
 #endif
 #ifdef AFMT_FLOAT


More information about the MPlayer-users mailing list