IRIX is not supported anymore. :)
authorSam Lantinga <slouken@libsdl.org>
Mon, 28 Feb 2011 09:06:29 -0800
changeset 541012bc832d3fa8
parent 5409 30205e106bba
child 5411 e76c379a80ef
IRIX is not supported anymore. :)
configure
configure.in
include/SDL_config.h.in
src/audio/SDL_audio.c
src/audio/dmedia/SDL_irixaudio.c
src/audio/dmedia/SDL_irixaudio.h
     1.1 --- a/configure	Mon Feb 28 09:06:15 2011 -0800
     1.2 +++ b/configure	Mon Feb 28 09:06:29 2011 -0800
     1.3 @@ -21628,74 +21628,6 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 -CheckDMEDIA()
     1.8 -{
     1.9 -    if test x$enable_audio = xyes; then
    1.10 -        { echo "$as_me:$LINENO: checking for dmedia audio support" >&5
    1.11 -echo $ECHO_N "checking for dmedia audio support... $ECHO_C" >&6; }
    1.12 -        have_dmedia=no
    1.13 -        cat >conftest.$ac_ext <<_ACEOF
    1.14 -/* confdefs.h.  */
    1.15 -_ACEOF
    1.16 -cat confdefs.h >>conftest.$ac_ext
    1.17 -cat >>conftest.$ac_ext <<_ACEOF
    1.18 -/* end confdefs.h.  */
    1.19 -
    1.20 -          #include <dmedia/audio.h>
    1.21 -
    1.22 -int
    1.23 -main ()
    1.24 -{
    1.25 -
    1.26 -          ALport audio_port;
    1.27 -
    1.28 -  ;
    1.29 -  return 0;
    1.30 -}
    1.31 -_ACEOF
    1.32 -rm -f conftest.$ac_objext
    1.33 -if { (ac_try="$ac_compile"
    1.34 -case "(($ac_try" in
    1.35 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    1.36 -  *) ac_try_echo=$ac_try;;
    1.37 -esac
    1.38 -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    1.39 -  (eval "$ac_compile") 2>conftest.er1
    1.40 -  ac_status=$?
    1.41 -  grep -v '^ *+' conftest.er1 >conftest.err
    1.42 -  rm -f conftest.er1
    1.43 -  cat conftest.err >&5
    1.44 -  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    1.45 -  (exit $ac_status); } && {
    1.46 -	 test -z "$ac_c_werror_flag" ||
    1.47 -	 test ! -s conftest.err
    1.48 -       } && test -s conftest.$ac_objext; then
    1.49 -
    1.50 -        have_dmedia=yes
    1.51 -
    1.52 -else
    1.53 -  echo "$as_me: failed program was:" >&5
    1.54 -sed 's/^/| /' conftest.$ac_ext >&5
    1.55 -
    1.56 -
    1.57 -fi
    1.58 -
    1.59 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1.60 -        { echo "$as_me:$LINENO: result: $have_dmedia" >&5
    1.61 -echo "${ECHO_T}$have_dmedia" >&6; }
    1.62 -        # Set up files for the audio library
    1.63 -        if test x$have_dmedia = xyes; then
    1.64 -            cat >>confdefs.h <<\_ACEOF
    1.65 -#define SDL_AUDIO_DRIVER_DMEDIA 1
    1.66 -_ACEOF
    1.67 -
    1.68 -            SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c"
    1.69 -            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laudio"
    1.70 -            have_audio=yes
    1.71 -        fi
    1.72 -    fi
    1.73 -}
    1.74 -
    1.75  CheckMME()
    1.76  {
    1.77          case $ARCH in
    1.78 @@ -22582,10 +22514,6 @@
    1.79              NAS_CFLAGS="-I/usr/X11R6/include/"
    1.80              NAS_LIBS="-L/usr/X11R6/lib -laudio -lXt"
    1.81  
    1.82 -
    1.83 -        elif test -r /usr/freeware/include/nas/audiolib.h; then
    1.84 -            have_nas=yes
    1.85 -            NAS_LIBS="-lnas -lXt"
    1.86          fi
    1.87  
    1.88          { echo "$as_me:$LINENO: result: $have_nas" >&5
    1.89 @@ -24096,10 +24024,6 @@
    1.90                      x11_lib='libX11.so'
    1.91                      x11ext_lib='libXext.so'
    1.92                      ;;
    1.93 -                *-*-irix*) # IRIX 6.5 requires that we use /usr/lib32
    1.94 -                    x11_lib='libX11.so'
    1.95 -                    x11ext_lib='libXext.so'
    1.96 -                    ;;
    1.97                  *)
    1.98                      x11_lib=`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
    1.99                      x11ext_lib=`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
   1.100 @@ -25834,10 +25758,6 @@
   1.101              pthread_cflags="-D_REENTRANT -Kthread"
   1.102              pthread_lib=""
   1.103              ;;
   1.104 -        *-*-irix*)
   1.105 -            pthread_cflags="-D_SGI_MP_SOURCE"
   1.106 -            pthread_lib="-lpthread"
   1.107 -            ;;
   1.108          *-*-aix*)
   1.109              pthread_cflags="-D_REENTRANT -mthreads"
   1.110              pthread_lib="-lpthread"
   1.111 @@ -28322,7 +28242,7 @@
   1.112  }
   1.113  
   1.114  case "$host" in
   1.115 -    *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-irix*|*-*-aix*|*-*-osf*|*-*-minix*)
   1.116 +    *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-osf*|*-*-minix*)
   1.117          case "$host" in
   1.118              *-*-linux*)         ARCH=linux ;;
   1.119              *-*-uclinux*)       ARCH=linux ;;
   1.120 @@ -28338,7 +28258,6 @@
   1.121              *-*-sysv5*)         ARCH=sysv5 ;;
   1.122              *-*-solaris*)       ARCH=solaris ;;
   1.123              *-*-hpux*)          ARCH=hpux ;;
   1.124 -            *-*-irix*)          ARCH=irix ;;
   1.125              *-*-aix*)           ARCH=aix ;;
   1.126              *-*-osf*)           ARCH=osf ;;
   1.127              *-*-minix*)         ARCH=minix ;;
   1.128 @@ -28349,7 +28268,6 @@
   1.129          CheckDummyAudio
   1.130          CheckDLOPEN
   1.131          CheckOSS
   1.132 -        CheckDMEDIA
   1.133          CheckMME
   1.134          CheckALSA
   1.135          CheckPulseAudio
   1.136 @@ -28437,17 +28355,6 @@
   1.137                 ;;
   1.138               esac
   1.139          fi
   1.140 -        # Set up files for the thread library
   1.141 -        if test x$enable_threads = xyes -a x$use_pthreads != xyes -a x$use_pth != xyes -a x$ARCH = xirix; then
   1.142 -            cat >>confdefs.h <<\_ACEOF
   1.143 -#define SDL_THREAD_SPROC 1
   1.144 -_ACEOF
   1.145 -
   1.146 -            SOURCES="$SOURCES $srcdir/src/thread/irix/*.c"
   1.147 -            SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
   1.148 -            SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
   1.149 -            have_threads=yes
   1.150 -        fi
   1.151          # Set up files for the timer library
   1.152          if test x$enable_timers = xyes; then
   1.153              cat >>confdefs.h <<\_ACEOF
   1.154 @@ -28950,7 +28857,7 @@
   1.155  # Set runtime shared library paths as needed
   1.156  
   1.157  if test "x$enable_rpath" = "xyes"; then
   1.158 -  if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = irix -o $ARCH = linux -o $ARCH = netbsd; then
   1.159 +  if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = linux -o $ARCH = netbsd; then
   1.160      SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}"
   1.161    fi
   1.162    if test $ARCH = solaris; then
     2.1 --- a/configure.in	Mon Feb 28 09:06:15 2011 -0800
     2.2 +++ b/configure.in	Mon Feb 28 09:06:29 2011 -0800
     2.3 @@ -758,30 +758,6 @@
     2.4      fi
     2.5  }
     2.6  
     2.7 -dnl Check whether we want to use IRIX 6.5+ native audio or not
     2.8 -CheckDMEDIA()
     2.9 -{
    2.10 -    if test x$enable_audio = xyes; then
    2.11 -        AC_MSG_CHECKING(for dmedia audio support)
    2.12 -        have_dmedia=no
    2.13 -        AC_TRY_COMPILE([
    2.14 -          #include <dmedia/audio.h>
    2.15 -        ],[
    2.16 -          ALport audio_port;
    2.17 -        ],[
    2.18 -        have_dmedia=yes
    2.19 -        ])
    2.20 -        AC_MSG_RESULT($have_dmedia)
    2.21 -        # Set up files for the audio library
    2.22 -        if test x$have_dmedia = xyes; then
    2.23 -            AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA)
    2.24 -            SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c"
    2.25 -            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laudio"
    2.26 -            have_audio=yes
    2.27 -        fi
    2.28 -    fi
    2.29 -}
    2.30 -
    2.31  dnl Check whether we want to use Tru64 UNIX native audio or not
    2.32  CheckMME()
    2.33  {
    2.34 @@ -973,12 +949,6 @@
    2.35              NAS_CFLAGS="-I/usr/X11R6/include/"
    2.36              NAS_LIBS="-L/usr/X11R6/lib -laudio -lXt"
    2.37  
    2.38 -        dnl On IRIX, the NAS includes are in a different directory,
    2.39 -        dnl and libnas must be explicitly linked in
    2.40 -
    2.41 -        elif test -r /usr/freeware/include/nas/audiolib.h; then
    2.42 -            have_nas=yes
    2.43 -            NAS_LIBS="-lnas -lXt"
    2.44          fi
    2.45  
    2.46          AC_MSG_RESULT($have_nas)
    2.47 @@ -1106,10 +1076,6 @@
    2.48                      x11_lib='libX11.so'
    2.49                      x11ext_lib='libXext.so'
    2.50                      ;;
    2.51 -                *-*-irix*) # IRIX 6.5 requires that we use /usr/lib32
    2.52 -                    x11_lib='libX11.so'
    2.53 -                    x11ext_lib='libXext.so'
    2.54 -                    ;;
    2.55                  *)
    2.56                      x11_lib=[`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    2.57                      x11ext_lib=[`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
    2.58 @@ -1645,10 +1611,6 @@
    2.59              pthread_cflags="-D_REENTRANT -Kthread"
    2.60              pthread_lib=""
    2.61              ;;
    2.62 -        *-*-irix*)
    2.63 -            pthread_cflags="-D_SGI_MP_SOURCE"
    2.64 -            pthread_lib="-lpthread"
    2.65 -            ;;
    2.66          *-*-aix*)
    2.67              pthread_cflags="-D_REENTRANT -mthreads"
    2.68              pthread_lib="-lpthread"
    2.69 @@ -2024,7 +1986,7 @@
    2.70  
    2.71  dnl Set up the configuration based on the host platform!
    2.72  case "$host" in
    2.73 -    *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-irix*|*-*-aix*|*-*-osf*|*-*-minix*)
    2.74 +    *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-osf*|*-*-minix*)
    2.75          case "$host" in
    2.76              *-*-linux*)         ARCH=linux ;;
    2.77              *-*-uclinux*)       ARCH=linux ;;
    2.78 @@ -2040,7 +2002,6 @@
    2.79              *-*-sysv5*)         ARCH=sysv5 ;;
    2.80              *-*-solaris*)       ARCH=solaris ;;
    2.81              *-*-hpux*)          ARCH=hpux ;;
    2.82 -            *-*-irix*)          ARCH=irix ;;
    2.83              *-*-aix*)           ARCH=aix ;;
    2.84              *-*-osf*)           ARCH=osf ;;
    2.85              *-*-minix*)         ARCH=minix ;;
    2.86 @@ -2051,7 +2012,6 @@
    2.87          CheckDummyAudio
    2.88          CheckDLOPEN
    2.89          CheckOSS
    2.90 -        CheckDMEDIA
    2.91          CheckMME
    2.92          CheckALSA
    2.93          CheckPulseAudio
    2.94 @@ -2121,14 +2081,6 @@
    2.95                 ;;
    2.96               esac
    2.97          fi
    2.98 -        # Set up files for the thread library
    2.99 -        if test x$enable_threads = xyes -a x$use_pthreads != xyes -a x$use_pth != xyes -a x$ARCH = xirix; then
   2.100 -            AC_DEFINE(SDL_THREAD_SPROC)
   2.101 -            SOURCES="$SOURCES $srcdir/src/thread/irix/*.c"
   2.102 -            SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
   2.103 -            SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
   2.104 -            have_threads=yes
   2.105 -        fi
   2.106          # Set up files for the timer library
   2.107          if test x$enable_timers = xyes; then
   2.108              AC_DEFINE(SDL_TIMER_UNIX)
   2.109 @@ -2508,7 +2460,7 @@
   2.110  # Set runtime shared library paths as needed
   2.111  
   2.112  if test "x$enable_rpath" = "xyes"; then
   2.113 -  if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = irix -o $ARCH = linux -o $ARCH = netbsd; then
   2.114 +  if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = linux -o $ARCH = netbsd; then
   2.115      SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}"
   2.116    fi
   2.117    if test $ARCH = solaris; then
     3.1 --- a/include/SDL_config.h.in	Mon Feb 28 09:06:15 2011 -0800
     3.2 +++ b/include/SDL_config.h.in	Mon Feb 28 09:06:29 2011 -0800
     3.3 @@ -197,7 +197,6 @@
     3.4  #undef SDL_AUDIO_DRIVER_COREAUDIO
     3.5  #undef SDL_AUDIO_DRIVER_DISK
     3.6  #undef SDL_AUDIO_DRIVER_DUMMY
     3.7 -#undef SDL_AUDIO_DRIVER_DMEDIA
     3.8  #undef SDL_AUDIO_DRIVER_DSOUND
     3.9  #undef SDL_AUDIO_DRIVER_ESD
    3.10  #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC
     4.1 --- a/src/audio/SDL_audio.c	Mon Feb 28 09:06:15 2011 -0800
     4.2 +++ b/src/audio/SDL_audio.c	Mon Feb 28 09:06:29 2011 -0800
     4.3 @@ -51,7 +51,6 @@
     4.4  extern AudioBootStrap PULSEAUDIO_bootstrap;
     4.5  extern AudioBootStrap QSAAUDIO_bootstrap;
     4.6  extern AudioBootStrap SUNAUDIO_bootstrap;
     4.7 -extern AudioBootStrap DMEDIA_bootstrap;
     4.8  extern AudioBootStrap ARTS_bootstrap;
     4.9  extern AudioBootStrap ESD_bootstrap;
    4.10  extern AudioBootStrap NAS_bootstrap;
    4.11 @@ -93,9 +92,6 @@
    4.12  #if SDL_AUDIO_DRIVER_SUNAUDIO
    4.13      &SUNAUDIO_bootstrap,
    4.14  #endif
    4.15 -#if SDL_AUDIO_DRIVER_DMEDIA
    4.16 -    &DMEDIA_bootstrap,
    4.17 -#endif
    4.18  #if SDL_AUDIO_DRIVER_ARTS
    4.19      &ARTS_bootstrap,
    4.20  #endif
     5.1 --- a/src/audio/dmedia/SDL_irixaudio.c	Mon Feb 28 09:06:15 2011 -0800
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,238 +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 <errno.h>
    5.26 -#include "SDL_config.h"
    5.27 -
    5.28 -/* Allow access to a raw mixing buffer (For IRIX 6.5 and higher) */
    5.29 -/* patch for IRIX 5 by Georg Schwarz 18/07/2004 */
    5.30 -
    5.31 -#include "SDL_timer.h"
    5.32 -#include "SDL_audio.h"
    5.33 -#include "../SDL_audiomem.h"
    5.34 -#include "../SDL_audio_c.h"
    5.35 -#include "SDL_irixaudio.h"
    5.36 -
    5.37 -
    5.38 -#ifndef AL_RESOURCE             /* as a test whether we use the old IRIX audio libraries */
    5.39 -#define OLD_IRIX_AUDIO
    5.40 -#define alClosePort(x) ALcloseport(x)
    5.41 -#define alFreeConfig(x) ALfreeconfig(x)
    5.42 -#define alGetFillable(x) ALgetfillable(x)
    5.43 -#define alNewConfig() ALnewconfig()
    5.44 -#define alOpenPort(x,y,z) ALopenport(x,y,z)
    5.45 -#define alSetChannels(x,y) ALsetchannels(x,y)
    5.46 -#define alSetQueueSize(x,y) ALsetqueuesize(x,y)
    5.47 -#define alSetSampFmt(x,y) ALsetsampfmt(x,y)
    5.48 -#define alSetWidth(x,y) ALsetwidth(x,y)
    5.49 -#endif
    5.50 -
    5.51 -void static
    5.52 -IRIXAUDIO_WaitDevice(_THIS)
    5.53 -{
    5.54 -    Sint32 timeleft;
    5.55 -
    5.56 -    timeleft = this->spec.samples - alGetFillable(this->hidden->audio_port);
    5.57 -    if (timeleft > 0) {
    5.58 -        timeleft /= (this->spec.freq / 1000);
    5.59 -        SDL_Delay((Uint32) timeleft);
    5.60 -    }
    5.61 -}
    5.62 -
    5.63 -static void
    5.64 -IRIXAUDIO_PlayDevice(_THIS)
    5.65 -{
    5.66 -    /* Write the audio data out */
    5.67 -    ALport port = this->hidden->audio_port;
    5.68 -    Uint8 *mixbuf = this->hidden->mixbuf;
    5.69 -    if (alWriteFrames(port, mixbuf, this->spec.samples) < 0) {
    5.70 -        /* Assume fatal error, for now */
    5.71 -        this->enabled = 0;
    5.72 -    }
    5.73 -}
    5.74 -
    5.75 -static Uint8 *
    5.76 -IRIXAUDIO_GetDeviceBuf(_THIS)
    5.77 -{
    5.78 -    return (this->hidden->mixbuf);
    5.79 -}
    5.80 -
    5.81 -static void
    5.82 -IRIXAUDIO_CloseDevice(_THIS)
    5.83 -{
    5.84 -    if (this->hidden != NULL) {
    5.85 -        if (this->hidden->mixbuf != NULL) {
    5.86 -            SDL_FreeAudioMem(this->hidden->mixbuf);
    5.87 -            this->hidden->mixbuf = NULL;
    5.88 -        }
    5.89 -        if (this->hidden->audio_port != NULL) {
    5.90 -            alClosePort(this->hidden->audio_port);
    5.91 -            this->hidden->audio_port = NULL;
    5.92 -        }
    5.93 -        SDL_free(this->hidden);
    5.94 -        this->hidden = NULL;
    5.95 -    }
    5.96 -}
    5.97 -
    5.98 -static int
    5.99 -IRIXAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
   5.100 -{
   5.101 -    SDL_AudioFormat test_format = SDL_FirstAudioFormat(this->spec.format);
   5.102 -    long width = 0;
   5.103 -    long fmt = 0;
   5.104 -    int valid = 0;
   5.105 -
   5.106 -    /* !!! FIXME: Handle multiple devices and capture? */
   5.107 -
   5.108 -    /* Initialize all variables that we clean on shutdown */
   5.109 -    this->hidden = (struct SDL_PrivateAudioData *)
   5.110 -        SDL_malloc((sizeof *this->hidden));
   5.111 -    if (this->hidden == NULL) {
   5.112 -        SDL_OutOfMemory();
   5.113 -        return 0;
   5.114 -    }
   5.115 -    SDL_memset(this->hidden, 0, (sizeof *this->hidden));
   5.116 -
   5.117 -#ifdef OLD_IRIX_AUDIO
   5.118 -    {
   5.119 -        long audio_param[2];
   5.120 -        audio_param[0] = AL_OUTPUT_RATE;
   5.121 -        audio_param[1] = this->spec.freq;
   5.122 -        valid = (ALsetparams(AL_DEFAULT_DEVICE, audio_param, 2) < 0);
   5.123 -    }
   5.124 -#else
   5.125 -    {
   5.126 -        ALpv audio_param;
   5.127 -        audio_param.param = AL_RATE;
   5.128 -        audio_param.value.i = this->spec.freq;
   5.129 -        valid = (alSetParams(AL_DEFAULT_OUTPUT, &audio_param, 1) < 0);
   5.130 -    }
   5.131 -#endif
   5.132 -
   5.133 -    while ((!valid) && (test_format)) {
   5.134 -        valid = 1;
   5.135 -        this->spec.format = test_format;
   5.136 -
   5.137 -        switch (test_format) {
   5.138 -        case AUDIO_S8:
   5.139 -            width = AL_SAMPLE_8;
   5.140 -            fmt = AL_SAMPFMT_TWOSCOMP;
   5.141 -            break;
   5.142 -
   5.143 -        case AUDIO_S16SYS:
   5.144 -            width = AL_SAMPLE_16;
   5.145 -            fmt = AL_SAMPFMT_TWOSCOMP;
   5.146 -            break;
   5.147 -
   5.148 -        case AUDIO_F32SYS:
   5.149 -            width = 0;          /* not used here... */
   5.150 -            fmt = AL_SAMPFMT_FLOAT;
   5.151 -            break;
   5.152 -
   5.153 -            /* Docs say there is int24, but not int32.... */
   5.154 -
   5.155 -        default:
   5.156 -            valid = 0;
   5.157 -            test_format = SDL_NextAudioFormat();
   5.158 -            break;
   5.159 -        }
   5.160 -
   5.161 -        if (valid) {
   5.162 -            ALconfig audio_config = alNewConfig();
   5.163 -            valid = 0;
   5.164 -            if (audio_config) {
   5.165 -                if (alSetChannels(audio_config, this->spec.channels) < 0) {
   5.166 -                    if (this->spec.channels > 2) {      /* can't handle > stereo? */
   5.167 -                        this->spec.channels = 2;        /* try again below. */
   5.168 -                    }
   5.169 -                }
   5.170 -
   5.171 -                if ((alSetSampFmt(audio_config, fmt) >= 0) &&
   5.172 -                    ((!width) || (alSetWidth(audio_config, width) >= 0)) &&
   5.173 -                    (alSetQueueSize(audio_config, this->spec.samples * 2) >=
   5.174 -                     0)
   5.175 -                    && (alSetChannels(audio_config, this->spec.channels) >=
   5.176 -                        0)) {
   5.177 -
   5.178 -                    this->hidden->audio_port = alOpenPort("SDL audio", "w",
   5.179 -                                                          audio_config);
   5.180 -                    if (this->hidden->audio_port == NULL) {
   5.181 -                        /* docs say AL_BAD_CHANNELS happens here, too. */
   5.182 -                        int err = oserror();
   5.183 -                        if (err == AL_BAD_CHANNELS) {
   5.184 -                            this->spec.channels = 2;
   5.185 -                            alSetChannels(audio_config, this->spec.channels);
   5.186 -                            this->hidden->audio_port =
   5.187 -                                alOpenPort("SDL audio", "w", audio_config);
   5.188 -                        }
   5.189 -                    }
   5.190 -
   5.191 -                    if (this->hidden->audio_port != NULL) {
   5.192 -                        valid = 1;
   5.193 -                    }
   5.194 -                }
   5.195 -
   5.196 -                alFreeConfig(audio_config);
   5.197 -            }
   5.198 -        }
   5.199 -    }
   5.200 -
   5.201 -    if (!valid) {
   5.202 -        IRIXAUDIO_CloseDevice(this);
   5.203 -        SDL_SetError("Unsupported audio format");
   5.204 -        return 0;
   5.205 -    }
   5.206 -
   5.207 -    /* Update the fragment size as size in bytes */
   5.208 -    SDL_CalculateAudioSpec(&this->spec);
   5.209 -
   5.210 -    /* Allocate mixing buffer */
   5.211 -    this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(this->spec.size);
   5.212 -    if (this->hidden->mixbuf == NULL) {
   5.213 -        IRIXAUDIO_CloseDevice(this);
   5.214 -        SDL_OutOfMemory();
   5.215 -        return 0;
   5.216 -    }
   5.217 -    SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
   5.218 -
   5.219 -    /* We're ready to rock and roll. :-) */
   5.220 -    return 1;
   5.221 -}
   5.222 -
   5.223 -static int
   5.224 -IRIXAUDIO_Init(SDL_AudioDriverImpl * impl)
   5.225 -{
   5.226 -    /* Set the function pointers */
   5.227 -    impl->OpenDevice = DSP_OpenDevice;
   5.228 -    impl->PlayDevice = DSP_PlayDevice;
   5.229 -    impl->WaitDevice = DSP_WaitDevice;
   5.230 -    impl->GetDeviceBuf = DSP_GetDeviceBuf;
   5.231 -    impl->CloseDevice = DSP_CloseDevice;
   5.232 -    impl->OnlyHasDefaultOutputDevice = 1;       /* !!! FIXME: not true, I think. */
   5.233 -
   5.234 -    return 1;   /* this audio target is available. */
   5.235 -}
   5.236 -
   5.237 -AudioBootStrap IRIXAUDIO_bootstrap = {
   5.238 -    "AL", "IRIX DMedia audio", IRIXAUDIO_Init, 0
   5.239 -};
   5.240 -
   5.241 -/* vi: set ts=4 sw=4 expandtab: */
     6.1 --- a/src/audio/dmedia/SDL_irixaudio.h	Mon Feb 28 09:06:15 2011 -0800
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,42 +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 -#ifndef _SDL_irixaudio_h
    6.28 -#define _SDL_irixaudio_h
    6.29 -
    6.30 -#include <dmedia/audio.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 -
    6.37 -struct SDL_PrivateAudioData
    6.38 -{
    6.39 -    ALport audio_port;          /* The handle for the audio device */
    6.40 -    Uint8 *mixbuf;              /* The app mixing buffer */
    6.41 -};
    6.42 -
    6.43 -#endif /* _SDL_irixaudio_h */
    6.44 -
    6.45 -/* vi: set ts=4 sw=4 expandtab: */