[MPlayer-dev-eng] Re: OpenAL on Mac OSX: video playing at 2x speed

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Dec 10 13:14:30 CET 2006


Hello,
On Sat, Dec 09, 2006 at 06:54:51PM -0500, Nicolas Plourde wrote:
> -  if cc_check -lopenal ; then
> -    _libs_mplayer="$_libs_mplayer -lopenal"
> -    _openal=yes
> +  if test "$_macosx" = yes ; then
> +    if cc_check -DMACOSX -framework OpenAL ; then
> +      _ld_extra="$_ld_extra -framework OpenAL"
> +      _openal=yes
> +    fi

Why _ld_extra? Any reason why attached patch would not work?

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: configure
===================================================================
--- configure	(revision 21549)
+++ configure	(working copy)
@@ -4929,17 +4955,22 @@
 if test "$_openal" = auto ; then
   _openal=no
 cat > $TMPC << EOF
+#ifdef OPENAL_AL_H
+#include <OpenAL/al.h>
+#else
 #include <AL/al.h>
+#endif
 int main(void) {
   alSourceQueueBuffers(0, 0, 0);
 //  alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
   return 0;
 }
 EOF
-  if cc_check -lopenal ; then
-    _libs_mplayer="$_libs_mplayer -lopenal"
-    _openal=yes
-  fi
+  for I in "-lopenal" "-framework OpenAL" ; do
+    cc_check $I && _openal=yes && break
+    cc_check -DOPENAL_AL_H=1 $I && _def_openal_h='#define OPENAL_AL_H 1' && _openal=yes && break
+  done
+  test "$_openal" = yes && _libs_mplayer="$_libs_mplayer $I"
 fi
 if test "$_openal" = yes ; then
   _def_openal='#define USE_OPENAL 1'
@@ -7916,6 +7962,7 @@
 $_def_polyp
 $_def_jack
 $_def_openal
+$_def_openal_h
 $_def_sys_asoundlib_h
 $_def_alsa_asoundlib_h
 $_def_sunaudio
Index: libao2/ao_openal.c
===================================================================
--- libao2/ao_openal.c	(revision 21566)
+++ libao2/ao_openal.c	(working copy)
@@ -7,13 +7,19 @@
  * Copyleft 2006 by Reimar Döffinger (Reimar.Doeffinger at stud.uni-karlsruhe.de)
  */
 
+#include "config.h"
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <inttypes.h>
+#ifdef OPENAL_AL_H
+#include <OpenAL/alc.h>
+#include <OpenAL/al.h>
+#else
 #include <AL/alc.h>
 #include <AL/al.h>
+#endif
 
-#include "config.h"
 #include "mp_msg.h"
 #include "help_mp.h"
 


More information about the MPlayer-dev-eng mailing list