OSF isn't supported anymore.
authorSam Lantinga <slouken@libsdl.org>
Mon, 28 Feb 2011 09:09:13 -0800
changeset 5411e76c379a80ef
parent 5410 12bc832d3fa8
child 5412 279f6853c459
OSF isn't supported anymore.
configure
configure.in
include/SDL_config.h.in
src/audio/SDL_audio.c
src/audio/mme/SDL_mmeaudio.c
src/audio/mme/SDL_mmeaudio.h
     1.1 --- a/configure	Mon Feb 28 09:06:29 2011 -0800
     1.2 +++ b/configure	Mon Feb 28 09:09:13 2011 -0800
     1.3 @@ -21628,87 +21628,6 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 -CheckMME()
     1.8 -{
     1.9 -        case $ARCH in
    1.10 -        osf)
    1.11 -            ;;
    1.12 -        *)
    1.13 -            return
    1.14 -            ;;
    1.15 -    esac
    1.16 -    if test x$enable_audio = xyes; then
    1.17 -        { echo "$as_me:$LINENO: checking for MME audio support" >&5
    1.18 -echo $ECHO_N "checking for MME audio support... $ECHO_C" >&6; }
    1.19 -        MME_CFLAGS="-I/usr/include/mme"
    1.20 -        MME_LIBS="-lmme"
    1.21 -        have_mme=no
    1.22 -        save_CFLAGS="$CFLAGS"
    1.23 -        CFLAGS="$CFLAGS $MME_CFLAGS"
    1.24 -        cat >conftest.$ac_ext <<_ACEOF
    1.25 -/* confdefs.h.  */
    1.26 -_ACEOF
    1.27 -cat confdefs.h >>conftest.$ac_ext
    1.28 -cat >>conftest.$ac_ext <<_ACEOF
    1.29 -/* end confdefs.h.  */
    1.30 -
    1.31 -          #include <mme_api.h>
    1.32 -
    1.33 -int
    1.34 -main ()
    1.35 -{
    1.36 -
    1.37 -          HWAVEOUT sound;
    1.38 -
    1.39 -  ;
    1.40 -  return 0;
    1.41 -}
    1.42 -_ACEOF
    1.43 -rm -f conftest.$ac_objext
    1.44 -if { (ac_try="$ac_compile"
    1.45 -case "(($ac_try" in
    1.46 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    1.47 -  *) ac_try_echo=$ac_try;;
    1.48 -esac
    1.49 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    1.50 -  (eval "$ac_compile") 2>conftest.er1
    1.51 -  ac_status=$?
    1.52 -  grep -v '^ *+' conftest.er1 >conftest.err
    1.53 -  rm -f conftest.er1
    1.54 -  cat conftest.err >&5
    1.55 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    1.56 -  (exit $ac_status); } && {
    1.57 -	 test -z "$ac_c_werror_flag" ||
    1.58 -	 test ! -s conftest.err
    1.59 -       } && test -s conftest.$ac_objext; then
    1.60 -
    1.61 -        have_mme=yes
    1.62 -
    1.63 -else
    1.64 -  echo "$as_me: failed program was:" >&5
    1.65 -sed 's/^/| /' conftest.$ac_ext >&5
    1.66 -
    1.67 -
    1.68 -fi
    1.69 -
    1.70 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1.71 -        CFLAGS="$save_CFLAGS"
    1.72 -        { echo "$as_me:$LINENO: result: $have_mme" >&5
    1.73 -echo "${ECHO_T}$have_mme" >&6; }
    1.74 -        # Set up files for the audio library
    1.75 -        if test x$have_mme = xyes; then
    1.76 -            cat >>confdefs.h <<\_ACEOF
    1.77 -#define SDL_AUDIO_DRIVER_MMEAUDIO 1
    1.78 -_ACEOF
    1.79 -
    1.80 -            SOURCES="$SOURCES $srcdir/src/audio/mme/*.c"
    1.81 -            EXTRA_CFLAGS="$EXTRA_CFLAGS $MME_CFLAGS"
    1.82 -            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MME_LIBS"
    1.83 -            have_audio=yes
    1.84 -        fi
    1.85 -    fi
    1.86 -}
    1.87 -
    1.88  CheckESD()
    1.89  {
    1.90      # Check whether --enable-esd was given.
    1.91 @@ -24020,10 +23939,6 @@
    1.92                      xss_lib='/usr/X11R6/lib/libXss.1.dylib'
    1.93                      xvidmode_lib='/usr/X11R6/lib/libXxf86vm.1.dylib'
    1.94                      ;;
    1.95 -                *-*-osf*)
    1.96 -                    x11_lib='libX11.so'
    1.97 -                    x11ext_lib='libXext.so'
    1.98 -                    ;;
    1.99                  *)
   1.100                      x11_lib=`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.101                      x11ext_lib=`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.102 @@ -25766,14 +25681,6 @@
   1.103              pthread_cflags="-D_REENTRANT"
   1.104              pthread_lib="-L/usr/lib -lpthread"
   1.105              ;;
   1.106 -        *-*-osf*)
   1.107 -            pthread_cflags="-D_REENTRANT"
   1.108 -            if test x$ac_cv_c_compiler_gnu = xyes; then
   1.109 -                pthread_lib="-lpthread -lrt"
   1.110 -            else
   1.111 -                pthread_lib="-lpthread -lexc -lrt"
   1.112 -            fi
   1.113 -            ;;
   1.114          *)
   1.115              pthread_cflags="-D_REENTRANT"
   1.116              pthread_lib="-lpthread"
   1.117 @@ -28242,7 +28149,7 @@
   1.118  }
   1.119  
   1.120  case "$host" in
   1.121 -    *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-osf*|*-*-minix*)
   1.122 +    *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*)
   1.123          case "$host" in
   1.124              *-*-linux*)         ARCH=linux ;;
   1.125              *-*-uclinux*)       ARCH=linux ;;
   1.126 @@ -28259,7 +28166,6 @@
   1.127              *-*-solaris*)       ARCH=solaris ;;
   1.128              *-*-hpux*)          ARCH=hpux ;;
   1.129              *-*-aix*)           ARCH=aix ;;
   1.130 -            *-*-osf*)           ARCH=osf ;;
   1.131              *-*-minix*)         ARCH=minix ;;
   1.132          esac
   1.133          CheckVisibilityHidden
   1.134 @@ -28268,7 +28174,6 @@
   1.135          CheckDummyAudio
   1.136          CheckDLOPEN
   1.137          CheckOSS
   1.138 -        CheckMME
   1.139          CheckALSA
   1.140          CheckPulseAudio
   1.141          CheckARTSC
     2.1 --- a/configure.in	Mon Feb 28 09:06:29 2011 -0800
     2.2 +++ b/configure.in	Mon Feb 28 09:09:13 2011 -0800
     2.3 @@ -758,44 +758,6 @@
     2.4      fi
     2.5  }
     2.6  
     2.7 -dnl Check whether we want to use Tru64 UNIX native audio or not
     2.8 -CheckMME()
     2.9 -{
    2.10 -    dnl Make sure we are running on an Tru64 UNIX
    2.11 -    case $ARCH in
    2.12 -        osf)
    2.13 -            ;;
    2.14 -        *)
    2.15 -            return
    2.16 -            ;;
    2.17 -    esac
    2.18 -    if test x$enable_audio = xyes; then
    2.19 -        AC_MSG_CHECKING(for MME audio support)
    2.20 -        MME_CFLAGS="-I/usr/include/mme"
    2.21 -        MME_LIBS="-lmme"
    2.22 -        have_mme=no
    2.23 -        save_CFLAGS="$CFLAGS"
    2.24 -        CFLAGS="$CFLAGS $MME_CFLAGS"
    2.25 -        AC_TRY_COMPILE([
    2.26 -          #include <mme_api.h>
    2.27 -        ],[
    2.28 -          HWAVEOUT sound;
    2.29 -        ],[
    2.30 -        have_mme=yes
    2.31 -        ])
    2.32 -        CFLAGS="$save_CFLAGS"
    2.33 -        AC_MSG_RESULT($have_mme)
    2.34 -        # Set up files for the audio library
    2.35 -        if test x$have_mme = xyes; then
    2.36 -            AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO)
    2.37 -            SOURCES="$SOURCES $srcdir/src/audio/mme/*.c"
    2.38 -            EXTRA_CFLAGS="$EXTRA_CFLAGS $MME_CFLAGS"
    2.39 -            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MME_LIBS"
    2.40 -            have_audio=yes
    2.41 -        fi
    2.42 -    fi
    2.43 -}
    2.44 -
    2.45  dnl Find the ESD includes and libraries
    2.46  CheckESD()
    2.47  {
    2.48 @@ -1072,10 +1034,6 @@
    2.49                      xss_lib='/usr/X11R6/lib/libXss.1.dylib'
    2.50                      xvidmode_lib='/usr/X11R6/lib/libXxf86vm.1.dylib'
    2.51                      ;;
    2.52 -                *-*-osf*)
    2.53 -                    x11_lib='libX11.so'
    2.54 -                    x11ext_lib='libXext.so'
    2.55 -                    ;;
    2.56                  *)
    2.57                      x11_lib=[`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    2.58                      x11ext_lib=[`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    2.59 @@ -1619,14 +1577,6 @@
    2.60              pthread_cflags="-D_REENTRANT"
    2.61              pthread_lib="-L/usr/lib -lpthread"
    2.62              ;;
    2.63 -        *-*-osf*)
    2.64 -            pthread_cflags="-D_REENTRANT"
    2.65 -            if test x$ac_cv_prog_gcc = xyes; then
    2.66 -                pthread_lib="-lpthread -lrt"
    2.67 -            else
    2.68 -                pthread_lib="-lpthread -lexc -lrt"
    2.69 -            fi
    2.70 -            ;;
    2.71          *)
    2.72              pthread_cflags="-D_REENTRANT"
    2.73              pthread_lib="-lpthread"
    2.74 @@ -1986,7 +1936,7 @@
    2.75  
    2.76  dnl Set up the configuration based on the host platform!
    2.77  case "$host" in
    2.78 -    *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-osf*|*-*-minix*)
    2.79 +    *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*)
    2.80          case "$host" in
    2.81              *-*-linux*)         ARCH=linux ;;
    2.82              *-*-uclinux*)       ARCH=linux ;;
    2.83 @@ -2003,7 +1953,6 @@
    2.84              *-*-solaris*)       ARCH=solaris ;;
    2.85              *-*-hpux*)          ARCH=hpux ;;
    2.86              *-*-aix*)           ARCH=aix ;;
    2.87 -            *-*-osf*)           ARCH=osf ;;
    2.88              *-*-minix*)         ARCH=minix ;;
    2.89          esac
    2.90          CheckVisibilityHidden
    2.91 @@ -2012,7 +1961,6 @@
    2.92          CheckDummyAudio
    2.93          CheckDLOPEN
    2.94          CheckOSS
    2.95 -        CheckMME
    2.96          CheckALSA
    2.97          CheckPulseAudio
    2.98          CheckARTSC
     3.1 --- a/include/SDL_config.h.in	Mon Feb 28 09:06:29 2011 -0800
     3.2 +++ b/include/SDL_config.h.in	Mon Feb 28 09:09:13 2011 -0800
     3.3 @@ -200,7 +200,6 @@
     3.4  #undef SDL_AUDIO_DRIVER_DSOUND
     3.5  #undef SDL_AUDIO_DRIVER_ESD
     3.6  #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC
     3.7 -#undef SDL_AUDIO_DRIVER_MMEAUDIO
     3.8  #undef SDL_AUDIO_DRIVER_NAS
     3.9  #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC
    3.10  #undef SDL_AUDIO_DRIVER_NDS
     4.1 --- a/src/audio/SDL_audio.c	Mon Feb 28 09:06:29 2011 -0800
     4.2 +++ b/src/audio/SDL_audio.c	Mon Feb 28 09:09:13 2011 -0800
     4.3 @@ -64,7 +64,6 @@
     4.4  extern AudioBootStrap DISKAUD_bootstrap;
     4.5  extern AudioBootStrap DUMMYAUD_bootstrap;
     4.6  extern AudioBootStrap DCAUD_bootstrap;
     4.7 -extern AudioBootStrap MMEAUDIO_bootstrap;
     4.8  extern AudioBootStrap DART_bootstrap;
     4.9  extern AudioBootStrap NDSAUD_bootstrap;
    4.10  extern AudioBootStrap FUSIONSOUND_bootstrap;
    4.11 @@ -125,9 +124,6 @@
    4.12  #if SDL_AUDIO_DRIVER_DUMMY
    4.13      &DUMMYAUD_bootstrap,
    4.14  #endif
    4.15 -#if SDL_AUDIO_DRIVER_MMEAUDIO
    4.16 -    &MMEAUDIO_bootstrap,
    4.17 -#endif
    4.18  #if SDL_AUDIO_DRIVER_NDS
    4.19      &NDSAUD_bootstrap,
    4.20  #endif
     5.1 --- a/src/audio/mme/SDL_mmeaudio.c	Mon Feb 28 09:06:29 2011 -0800
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,260 +0,0 @@
     5.4 -/*
     5.5 -    SDL - Simple DirectMedia Layer
     5.6 -    Copyright (C) 1997-2011 Sam Lantinga
     5.7 -
     5.8 -    This library is free software; you can redistribute it and/or
     5.9 -    modify it under the terms of the GNU Lesser General Public
    5.10 -    License as published by the Free Software Foundation; either
    5.11 -    version 2.1 of the License, or (at your option) any later version.
    5.12 -
    5.13 -    This library is distributed in the hope that it will be useful,
    5.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    5.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    5.16 -    Lesser General Public License for more details.
    5.17 -
    5.18 -    You should have received a copy of the GNU Lesser General Public
    5.19 -    License along with this library; if not, write to the Free Software
    5.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    5.21 -
    5.22 -    Sam Lantinga
    5.23 -    slouken@libsdl.org
    5.24 -*/
    5.25 -#include "SDL_config.h"
    5.26 -
    5.27 -/* Tru64 UNIX MME support */
    5.28 -#include <mme_api.h>
    5.29 -
    5.30 -#include "SDL_timer.h"
    5.31 -#include "SDL_audio.h"
    5.32 -#include "../SDL_audio_c.h"
    5.33 -#include "SDL_mmeaudio.h"
    5.34 -
    5.35 -static BOOL inUse[NUM_BUFFERS];
    5.36 -
    5.37 -static void
    5.38 -SetMMerror(char *function, MMRESULT code)
    5.39 -{
    5.40 -    int len;
    5.41 -    char errbuf[MAXERRORLENGTH];
    5.42 -
    5.43 -    SDL_snprintf(errbuf, SDL_arraysize(errbuf), "%s: ", function);
    5.44 -    len = SDL_strlen(errbuf);
    5.45 -    waveOutGetErrorText(code, errbuf + len, MAXERRORLENGTH - len);
    5.46 -    SDL_SetError("%s", errbuf);
    5.47 -}
    5.48 -
    5.49 -static void CALLBACK
    5.50 -MME_Callback(HWAVEOUT hwo,
    5.51 -             UINT uMsg, DWORD dwInstance, LPARAM dwParam1, LPARAM dwParam2)
    5.52 -{
    5.53 -    WAVEHDR *wp = (WAVEHDR *) dwParam1;
    5.54 -
    5.55 -    if (uMsg == WOM_DONE)
    5.56 -        inUse[wp->dwUser] = FALSE;
    5.57 -}
    5.58 -
    5.59 -static int
    5.60 -MME_OpenDevice(_THIS, const char *devname, int iscapture)
    5.61 -{
    5.62 -    int valid_format = 0;
    5.63 -    MMRESULT result;
    5.64 -    Uint8 *mixbuf = NULL;
    5.65 -    int i;
    5.66 -
    5.67 -    /* Initialize all variables that we clean on shutdown */
    5.68 -    this->hidden = (struct SDL_PrivateAudioData *)
    5.69 -        SDL_malloc((sizeof *this->hidden));
    5.70 -    if (this->hidden == NULL) {
    5.71 -        SDL_OutOfMemory();
    5.72 -        return 0;
    5.73 -    }
    5.74 -    SDL_memset(this->hidden, 0, (sizeof *this->hidden));
    5.75 -
    5.76 -    /* Set basic WAVE format parameters */
    5.77 -    this->hidden->shm = mmeAllocMem(sizeof(*this->hidden->shm));
    5.78 -    if (this->hidden->shm == NULL) {
    5.79 -        MME_CloseDevice(this);
    5.80 -        SDL_OutOfMemory();
    5.81 -        return 0;
    5.82 -    }
    5.83 -
    5.84 -    SDL_memset(this->hidden->shm, '\0', sizeof(*this->hidden->shm));
    5.85 -    this->hidden->shm->sound = 0;
    5.86 -    this->hidden->shm->wFmt.wf.wFormatTag = WAVE_FORMAT_PCM;
    5.87 -
    5.88 -    /* Determine the audio parameters from the AudioSpec */
    5.89 -    /* Try for a closest match on audio format */
    5.90 -    for (test_format = SDL_FirstAudioFormat(this->spec.format);
    5.91 -         !valid_format && test_format;) {
    5.92 -        valid_format = 1;
    5.93 -        switch (test_format) {
    5.94 -        case AUDIO_U8:
    5.95 -        case AUDIO_S16:
    5.96 -        case AUDIO_S32:
    5.97 -            break;
    5.98 -        default:
    5.99 -            valid_format = 0;
   5.100 -            test_format = SDL_NextAudioFormat();
   5.101 -        }
   5.102 -    }
   5.103 -
   5.104 -    if (!valid_format) {
   5.105 -        MME_CloseDevice(this);
   5.106 -        SDL_SetError("Unsupported audio format");
   5.107 -        return 0;
   5.108 -    }
   5.109 -
   5.110 -    this->spec.format = test_format;
   5.111 -    this->hidden->shm->wFmt.wBitsPerSample = SDL_AUDIO_BITSIZE(test_format);
   5.112 -
   5.113 -    /* !!! FIXME: Can this handle more than stereo? */
   5.114 -    this->hidden->shm->wFmt.wf.nChannels = this->spec.channels;
   5.115 -    this->hidden->shm->wFmt.wf.nSamplesPerSec = this->spec.freq;
   5.116 -    this->hidden->shm->wFmt.wf.nBlockAlign =
   5.117 -        this->hidden->shm->wFmt.wf.nChannels *
   5.118 -        this->hidden->shm->wFmt.wBitsPerSample / 8;
   5.119 -    this->hidden->shm->wFmt.wf.nAvgBytesPerSec =
   5.120 -        this->hidden->shm->wFmt.wf.nSamplesPerSec *
   5.121 -        this->hidden->shm->wFmt.wf.nBlockAlign;
   5.122 -
   5.123 -    /* Check the buffer size -- minimum of 1/4 second (word aligned) */
   5.124 -    if (this->spec.samples < (this->spec.freq / 4))
   5.125 -        this->spec.samples = ((this->spec.freq / 4) + 3) & ~3;
   5.126 -
   5.127 -    /* Update the fragment size as size in bytes */
   5.128 -    SDL_CalculateAudioSpec(&this->spec);
   5.129 -
   5.130 -    /* Open the audio device */
   5.131 -    result = waveOutOpen(&(this->hidden->shm->sound),
   5.132 -                         WAVE_MAPPER,
   5.133 -                         &(this->hidden->shm->wFmt.wf),
   5.134 -                         MME_Callback,
   5.135 -                         NULL, (CALLBACK_FUNCTION | WAVE_OPEN_SHAREABLE));
   5.136 -    if (result != MMSYSERR_NOERROR) {
   5.137 -        MME_CloseDevice(this);
   5.138 -        SetMMerror("waveOutOpen()", result);
   5.139 -        return 0;
   5.140 -    }
   5.141 -
   5.142 -    /* Create the sound buffers */
   5.143 -    mixbuf = (Uint8 *) mmeAllocBuffer(NUM_BUFFERS * (this->spec.size));
   5.144 -    if (mixbuf == NULL) {
   5.145 -        MME_CloseDevice(this);
   5.146 -        SDL_OutOfMemory();
   5.147 -        return 0;
   5.148 -    }
   5.149 -    this->hidden->mixbuf = mixbuf;
   5.150 -
   5.151 -    for (i = 0; i < NUM_BUFFERS; i++) {
   5.152 -        this->hidden->shm->wHdr[i].lpData = &mixbuf[i * (this->spec.size)];
   5.153 -        this->hidden->shm->wHdr[i].dwBufferLength = this->spec.size;
   5.154 -        this->hidden->shm->wHdr[i].dwFlags = 0;
   5.155 -        this->hidden->shm->wHdr[i].dwUser = i;
   5.156 -        this->hidden->shm->wHdr[i].dwLoops = 0; /* loop control counter */
   5.157 -        this->hidden->shm->wHdr[i].lpNext = NULL;       /* reserved for driver */
   5.158 -        this->hidden->shm->wHdr[i].reserved = 0;
   5.159 -        inUse[i] = FALSE;
   5.160 -    }
   5.161 -    this->hidden->next_buffer = 0;
   5.162 -
   5.163 -    return 1;
   5.164 -}
   5.165 -
   5.166 -static void
   5.167 -MME_WaitDevice(_THIS)
   5.168 -{
   5.169 -    while (inUse[this->hidden->next_buffer]) {
   5.170 -        mmeWaitForCallbacks();
   5.171 -        mmeProcessCallbacks();
   5.172 -    }
   5.173 -}
   5.174 -
   5.175 -static Uint8 *
   5.176 -MME_GetDeviceBuf(_THIS)
   5.177 -{
   5.178 -    void *retval = this->hidden->shm->wHdr[this->hidden->next_buffer].lpData;
   5.179 -    inUse[this->hidden->next_buffer] = TRUE;
   5.180 -    return (Uint8 *) retval;
   5.181 -}
   5.182 -
   5.183 -static void
   5.184 -MME_PlayDevice(_THIS)
   5.185 -{
   5.186 -    /* Queue it up */
   5.187 -    waveOutWrite(this->hidden->shm->sound,
   5.188 -                 &(this->hidden->shm->wHdr[this->hidden->next_buffer]),
   5.189 -                 sizeof(WAVEHDR));
   5.190 -    this->hidden->next_buffer = (this->hidden->next_buffer + 1) % NUM_BUFFERS;
   5.191 -}
   5.192 -
   5.193 -static void
   5.194 -MME_WaitDone(_THIS)
   5.195 -{
   5.196 -    MMRESULT result;
   5.197 -    int i;
   5.198 -
   5.199 -    if (this->hidden->shm->sound) {
   5.200 -        for (i = 0; i < NUM_BUFFERS; i++)
   5.201 -            while (inUse[i]) {
   5.202 -                mmeWaitForCallbacks();
   5.203 -                mmeProcessCallbacks();
   5.204 -            }
   5.205 -        result = waveOutReset(this->hidden->shm->sound);
   5.206 -        if (result != MMSYSERR_NOERROR)
   5.207 -            SetMMerror("waveOutReset()", result);
   5.208 -        mmeProcessCallbacks();
   5.209 -    }
   5.210 -}
   5.211 -
   5.212 -static void
   5.213 -MME_CloseDevice(_THIS)
   5.214 -{
   5.215 -    if (this->hidden != NULL) {
   5.216 -        MMRESULT result;
   5.217 -
   5.218 -        if (this->hidden->mixbuf) {
   5.219 -            result = mmeFreeBuffer(this->hidden->mixbuf);
   5.220 -            if (result != MMSYSERR_NOERROR)
   5.221 -                SetMMerror("mmeFreeBuffer", result);
   5.222 -            this->hidden->mixbuf = NULL;
   5.223 -        }
   5.224 -
   5.225 -        if (this->hidden->shm) {
   5.226 -            if (this->hidden->shm->sound) {
   5.227 -                result = waveOutClose(this->hidden->shm->sound);
   5.228 -                if (result != MMSYSERR_NOERROR)
   5.229 -                    SetMMerror("waveOutClose()", result);
   5.230 -                mmeProcessCallbacks();
   5.231 -            }
   5.232 -            result = mmeFreeMem(this->hidden->shm);
   5.233 -            if (result != MMSYSERR_NOERROR)
   5.234 -                SetMMerror("mmeFreeMem()", result);
   5.235 -            this->hidden->shm = NULL;
   5.236 -        }
   5.237 -
   5.238 -        SDL_free(this->hidden);
   5.239 -        this->hidden = NULL;
   5.240 -    }
   5.241 -}
   5.242 -
   5.243 -static int
   5.244 -MME_Init(SDL_AudioDriverImpl * impl)
   5.245 -{
   5.246 -    /* Set the function pointers */
   5.247 -    impl->OpenDevice = MME_OpenDevice;
   5.248 -    impl->WaitDevice = MME_WaitDevice;
   5.249 -    impl->WaitDone = MME_WaitDone;
   5.250 -    impl->PlayDevice = MME_PlayDevice;
   5.251 -    impl->GetDeviceBuf = MME_GetDeviceBuf;
   5.252 -    impl->CloseDevice = MME_CloseDevice;
   5.253 -    impl->OnlyHasDefaultOutputDevice = 1;
   5.254 -
   5.255 -    return 1;   /* this audio target is available. */
   5.256 -}
   5.257 -
   5.258 -/* !!! FIXME: Windows "windib" driver is called waveout, too */
   5.259 -AudioBootStrap MMEAUDIO_bootstrap = {
   5.260 -    "waveout", "Tru64 MME WaveOut", MME_Init, 0
   5.261 -};
   5.262 -
   5.263 -/* vi: set ts=4 sw=4 expandtab: */
     6.1 --- a/src/audio/mme/SDL_mmeaudio.h	Mon Feb 28 09:06:29 2011 -0800
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,51 +0,0 @@
     6.4 -/*
     6.5 -    SDL - Simple DirectMedia Layer
     6.6 -    Copyright (C) 1997-2011 Sam Lantinga
     6.7 -
     6.8 -    This library is free software; you can redistribute it and/or
     6.9 -    modify it under the terms of the GNU Lesser General Public
    6.10 -    License as published by the Free Software Foundation; either
    6.11 -    version 2.1 of the License, or (at your option) any later version.
    6.12 -
    6.13 -    This library is distributed in the hope that it will be useful,
    6.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    6.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    6.16 -    Lesser General Public License for more details.
    6.17 -
    6.18 -    You should have received a copy of the GNU Lesser General Public
    6.19 -    License along with this library; if not, write to the Free Software
    6.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    6.21 -
    6.22 -    Sam Lantinga
    6.23 -    slouken@libsdl.org
    6.24 -*/
    6.25 -#include "SDL_config.h"
    6.26 -
    6.27 -/* Allow access to a raw mixing buffer */
    6.28 -
    6.29 -#ifndef _SDL_mmeaudio_h
    6.30 -#define _SDL_mmeaudio_h
    6.31 -
    6.32 -#include "../SDL_sysaudio.h"
    6.33 -
    6.34 -/* Hidden "this" pointer for the audio functions */
    6.35 -#define _THIS	SDL_AudioDevice *this
    6.36 -#define NUM_BUFFERS 2
    6.37 -
    6.38 -struct SharedMem
    6.39 -{
    6.40 -    HWAVEOUT sound;
    6.41 -    WAVEHDR wHdr[NUM_BUFFERS];
    6.42 -    PCMWAVEFORMAT wFmt;
    6.43 -};
    6.44 -
    6.45 -struct SDL_PrivateAudioData
    6.46 -{
    6.47 -    Uint8 *mixbuf;              /* The raw allocated mixing buffer */
    6.48 -    struct SharedMem *shm;
    6.49 -    int next_buffer;
    6.50 -};
    6.51 -
    6.52 -#endif /* _SDL_mmeaudio_h */
    6.53 -
    6.54 -/* vi: set ts=4 sw=4 expandtab: */