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

Bohdan Horst nexus at irc.pl
Sat Oct 23 12:30:10 CEST 2004


On Sat, Oct 23, 2004 at 11:11:35AM +0200, Reimar Döffinger wrote:
> 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

> --- 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 */

very similar patch works for me for about a week (without any problems)

regards

-- 
Bohdan 'Nexus' Horst




More information about the MPlayer-dev-eng mailing list