Ticket #651: libao2_openal_for_darwin.patch

File libao2_openal_for_darwin.patch, 991 bytes (added by sci-fi@…, 20 years ago)

patch for configure & libao2/ao_openal.c to let MPlayer use OpenAL frameworks for Darwin/MacOSX

  • (a) configure_orig vs. (b) configure

    a b  
    48864886echocheck "OpenAL"
    48874887if test "$_openal" = auto ; then
    48884888  _openal=no
     4889  if darwin ; then
     4890    cat > $TMPC << EOF
     4891#include <al.h>
     4892int main(void) {
     4893  alSourceQueueBuffers(0, 0, 0);
     4894//  alGetSourcei(0, AL_SAMPLE_OFFSET, 0);
     4895  return 0;
     4896}
     4897EOF
     4898    if cc_check -framework OpenAL ; then
     4899      _libs_mplayer="$_libs_mplayer -framework OpenAL"
     4900      _openal=yes
     4901    fi
     4902  else
    48894903cat > $TMPC << EOF
    48904904#include <AL/al.h>
    48914905int main(void) {
     
    49064920else
    49074921  _noaomodules="openal $_noaomodules"
    49084922fi
     4923fi
    49094924echores "$_openal"
    49104925
    49114926echocheck "ALSA audio"
  • ao_openal.

    old new  
    1010#include <stdlib.h>
    1111#include <stdio.h>
    1212#include <inttypes.h>
     13#ifdef SYS_DARWIN
     14#include <alc.h>
     15#include <al.h>
     16#else
    1317#include <AL/alc.h>
    1418#include <AL/al.h>
     19#endif
    1520
    1621#include "config.h"
    1722#include "mp_msg.h"