[MPlayer-dev-eng] [PATCH] fix compilation on FreeBSD (and maybe others?)

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Oct 23 11:11:35 CEST 2004


Hi,
please have a look at this patch (see also bugzilla bug #114). At least
FreeBSD already uses the format values that linux uses for 24bit audio
for 32bit audio. I prefer this way to fix it over a #ifdef __FreeBSD__,
as probably other OSes will have the same soundcard.h header.

Greetings,
Reimar Döffinger
-------------- next part --------------
--- libao2/afmt.h	2004-10-05 16:44:32.000000000 +0200
+++ libao2/afmt.h	2004-10-19 23:00:31.212712516 +0200
@@ -34,10 +34,24 @@
 
 /* 24 bit formats from the linux kernel */
 #ifndef AFMT_S24_LE
+
+// FreeBSD fix...
+#if AFMT_S32_LE == 0x1000
+
+#define AFMT_S24_LE		0x00010000
+#define AFMT_S24_BE		0x00020000
+#define AFMT_U24_LE		0x00040000
+#define AFMT_U24_BE		0x00080000
+
+#else
+
 #define AFMT_S24_LE		0x00000800
 #define AFMT_S24_BE		0x00001000
 #define AFMT_U24_LE		0x00002000
 #define AFMT_U24_BE		0x00004000
+
+#endif
+
 #endif
 
 /* 32 bit formats from the linux kernel */


More information about the MPlayer-dev-eng mailing list