Audio bootstraps can now specify that a driver is only to be used if SDL-ryan-multiple-audio-device
authorRyan C. Gordon <icculus@icculus.org>
Wed, 04 Oct 2006 21:27:53 +0000
branchSDL-ryan-multiple-audio-device
changeset 3798c8b3d3d13ed1
parent 3797 9dc81c6acaf5
child 3799 f424927138ff
Audio bootstraps can now specify that a driver is only to be used if
explicitly requested (for things like the "disk" driver that is always
available but you would never want to default to using).

Trimmed out code that can be handled by stubs in the core. The "dummy" driver
is pretty damned small now. :)
src/audio/SDL_audio.c
src/audio/SDL_sysaudio.h
src/audio/alsa/SDL_alsa_audio.c
src/audio/arts/SDL_artsaudio.c
src/audio/bsd/SDL_bsdaudio.c
src/audio/dart/SDL_dart.c
src/audio/dc/SDL_dcaudio.c
src/audio/disk/SDL_diskaudio.c
src/audio/dma/SDL_dmaaudio.c
src/audio/dmedia/SDL_irixaudio.c
src/audio/dsp/SDL_dspaudio.c
src/audio/dummy/SDL_dummyaudio.c
src/audio/esd/SDL_esdaudio.c
src/audio/macosx/SDL_coreaudio.c
src/audio/macrom/SDL_romaudio.c
src/audio/mint/SDL_mintaudio_dma8.c
src/audio/mint/SDL_mintaudio_gsxb.c
src/audio/mint/SDL_mintaudio_mcsn.c
src/audio/mint/SDL_mintaudio_stfa.c
src/audio/mint/SDL_mintaudio_xbios.c
src/audio/mme/SDL_mmeaudio.c
src/audio/nas/SDL_nasaudio.c
src/audio/nto/SDL_nto_audio.c
src/audio/paudio/SDL_paudio.c
src/audio/sun/SDL_sunaudio.c
src/audio/ums/SDL_umsaudio.c
src/audio/windib/SDL_dibaudio.c
src/audio/windx5/SDL_dx5audio.c
     1.1 --- a/src/audio/SDL_audio.c	Wed Oct 04 20:42:39 2006 +0000
     1.2 +++ b/src/audio/SDL_audio.c	Wed Oct 04 21:27:53 2006 +0000
     1.3 @@ -480,7 +480,7 @@
     1.4              }
     1.5          } else {
     1.6              for (i = 0; (!initialized) && (bootstrap[i]); ++i) {
     1.7 -                if (bootstrap[i]->available()) {
     1.8 +                if ((!bootstrap[i]->demand) && (bootstrap[i]->available())) {
     1.9                      SDL_memset(&current_audio, 0, sizeof (current_audio));
    1.10                      current_audio.name = bootstrap[i]->name;
    1.11                      current_audio.desc = bootstrap[i]->desc;
     2.1 --- a/src/audio/SDL_sysaudio.h	Wed Oct 04 20:42:39 2006 +0000
     2.2 +++ b/src/audio/SDL_sysaudio.h	Wed Oct 04 21:27:53 2006 +0000
     2.3 @@ -109,6 +109,7 @@
     2.4      const char *desc;
     2.5      int (*available) (void);
     2.6      int (*init) (SDL_AudioDriverImpl *impl);
     2.7 +    int demand:1;  /* 1==must request explicitly, or it won't be available. */
     2.8  } AudioBootStrap;
     2.9  
    2.10  #endif /* _SDL_sysaudio_h */
     3.1 --- a/src/audio/alsa/SDL_alsa_audio.c	Wed Oct 04 20:42:39 2006 +0000
     3.2 +++ b/src/audio/alsa/SDL_alsa_audio.c	Wed Oct 04 21:27:53 2006 +0000
     3.3 @@ -330,7 +330,7 @@
     3.4  
     3.5  AudioBootStrap ALSA_bootstrap = {
     3.6      DRIVER_NAME, "ALSA 0.9 PCM audio",
     3.7 -    Audio_Available, Audio_CreateDevice
     3.8 +    Audio_Available, Audio_CreateDevice, 0
     3.9  };
    3.10  
    3.11  /* This function waits until it is possible to write a full sound buffer */
     4.1 --- a/src/audio/arts/SDL_artsaudio.c	Wed Oct 04 20:42:39 2006 +0000
     4.2 +++ b/src/audio/arts/SDL_artsaudio.c	Wed Oct 04 21:27:53 2006 +0000
     4.3 @@ -199,7 +199,7 @@
     4.4  
     4.5  AudioBootStrap ARTS_bootstrap = {
     4.6      ARTS_DRIVER_NAME, "Analog Realtime Synthesizer",
     4.7 -    Audio_Available, Audio_CreateDevice
     4.8 +    Audio_Available, Audio_CreateDevice, 0
     4.9  };
    4.10  
    4.11  /* This function waits until it is possible to write a full sound buffer */
     5.1 --- a/src/audio/bsd/SDL_bsdaudio.c	Wed Oct 04 20:42:39 2006 +0000
     5.2 +++ b/src/audio/bsd/SDL_bsdaudio.c	Wed Oct 04 21:27:53 2006 +0000
     5.3 @@ -136,7 +136,7 @@
     5.4  
     5.5  AudioBootStrap BSD_AUDIO_bootstrap = {
     5.6      BSD_AUDIO_DRIVER_NAME, BSD_AUDIO_DRIVER_DESC,
     5.7 -    Audio_Available, Audio_CreateDevice
     5.8 +    Audio_Available, Audio_CreateDevice, 0
     5.9  };
    5.10  
    5.11  /* This function waits until it is possible to write a full sound buffer */
     6.1 --- a/src/audio/dart/SDL_dart.c	Wed Oct 04 20:42:39 2006 +0000
     6.2 +++ b/src/audio/dart/SDL_dart.c	Wed Oct 04 21:27:53 2006 +0000
     6.3 @@ -484,7 +484,7 @@
     6.4  
     6.5  AudioBootStrap DART_bootstrap = {
     6.6      "dart", "OS/2 Direct Audio RouTines (DART)",
     6.7 -    Audio_Available, Audio_CreateDevice
     6.8 +    Audio_Available, Audio_CreateDevice, 0
     6.9  };
    6.10  
    6.11  /* vi: set ts=4 sw=4 expandtab: */
     7.1 --- a/src/audio/dc/SDL_dcaudio.c	Wed Oct 04 20:42:39 2006 +0000
     7.2 +++ b/src/audio/dc/SDL_dcaudio.c	Wed Oct 04 21:27:53 2006 +0000
     7.3 @@ -92,7 +92,7 @@
     7.4  
     7.5  AudioBootStrap DCAUD_bootstrap = {
     7.6      "dcaudio", "Dreamcast AICA audio",
     7.7 -    DCAUD_Available, DCAUD_CreateDevice
     7.8 +    DCAUD_Available, DCAUD_CreateDevice, 0
     7.9  };
    7.10  
    7.11  /* This function waits until it is possible to write a full sound buffer */
     8.1 --- a/src/audio/disk/SDL_diskaudio.c	Wed Oct 04 20:42:39 2006 +0000
     8.2 +++ b/src/audio/disk/SDL_diskaudio.c	Wed Oct 04 21:27:53 2006 +0000
     8.3 @@ -64,13 +64,7 @@
     8.4  static int
     8.5  DISKAUD_Available(void)
     8.6  {
     8.7 -    /* !!! FIXME: check this at a higher level... */
     8.8 -    /* only ever use this driver if explicitly requested. */
     8.9 -    const char *envr = SDL_getenv("SDL_AUDIODRIVER");
    8.10 -    if (envr && (SDL_strcasecmp(envr, DISKAUD_DRIVER_NAME) == 0)) {
    8.11 -        return (1);
    8.12 -    }
    8.13 -    return (0);
    8.14 +    return 1;  /* always available. */
    8.15  }
    8.16  
    8.17  static int
    8.18 @@ -91,7 +85,7 @@
    8.19  
    8.20  AudioBootStrap DISKAUD_bootstrap = {
    8.21      DISKAUD_DRIVER_NAME, "direct-to-disk audio",
    8.22 -    DISKAUD_Available, DISKAUD_Init
    8.23 +    DISKAUD_Available, DISKAUD_Init, 1
    8.24  };
    8.25  
    8.26  /* This function waits until it is possible to write a full sound buffer */
     9.1 --- a/src/audio/dma/SDL_dmaaudio.c	Wed Oct 04 20:42:39 2006 +0000
     9.2 +++ b/src/audio/dma/SDL_dmaaudio.c	Wed Oct 04 21:27:53 2006 +0000
     9.3 @@ -117,7 +117,7 @@
     9.4  
     9.5  AudioBootStrap DMA_bootstrap = {
     9.6      DMA_DRIVER_NAME, "OSS /dev/dsp DMA audio",
     9.7 -    DMA_Available, DMA_Init
     9.8 +    DMA_Available, DMA_Init, 0
     9.9  };
    9.10  
    9.11  
    10.1 --- a/src/audio/dmedia/SDL_irixaudio.c	Wed Oct 04 20:42:39 2006 +0000
    10.2 +++ b/src/audio/dmedia/SDL_irixaudio.c	Wed Oct 04 21:27:53 2006 +0000
    10.3 @@ -102,7 +102,7 @@
    10.4  
    10.5  AudioBootStrap DMEDIA_bootstrap = {
    10.6      "AL", "IRIX DMedia audio",
    10.7 -    Audio_Available, Audio_CreateDevice
    10.8 +    Audio_Available, Audio_CreateDevice, 0
    10.9  };
   10.10  
   10.11  
    11.1 --- a/src/audio/dsp/SDL_dspaudio.c	Wed Oct 04 20:42:39 2006 +0000
    11.2 +++ b/src/audio/dsp/SDL_dspaudio.c	Wed Oct 04 21:27:53 2006 +0000
    11.3 @@ -103,7 +103,7 @@
    11.4  
    11.5  AudioBootStrap DSP_bootstrap = {
    11.6      DSP_DRIVER_NAME, "OSS /dev/dsp standard audio",
    11.7 -    DSP_Available, DSP_Init
    11.8 +    DSP_Available, DSP_Init, 0
    11.9  };
   11.10  
   11.11  
    12.1 --- a/src/audio/dummy/SDL_dummyaudio.c	Wed Oct 04 20:42:39 2006 +0000
    12.2 +++ b/src/audio/dummy/SDL_dummyaudio.c	Wed Oct 04 21:27:53 2006 +0000
    12.3 @@ -47,13 +47,7 @@
    12.4  static int
    12.5  DUMMYAUD_Available(void)
    12.6  {
    12.7 -    /* !!! FIXME: check this at a higher level... */
    12.8 -    /* only ever use this driver if explicitly requested. */
    12.9 -    const char *envr = SDL_getenv("SDL_AUDIODRIVER");
   12.10 -    if (envr && (SDL_strcmp(envr, DUMMYAUD_DRIVER_NAME) == 0)) {
   12.11 -        return (1);
   12.12 -    }
   12.13 -    return (0);
   12.14 +    return 1;  /* always available. */
   12.15  }
   12.16  
   12.17  static int
   12.18 @@ -61,10 +55,6 @@
   12.19  {
   12.20      /* Set the function pointers */
   12.21      impl->OpenDevice = DUMMYAUD_OpenDevice;
   12.22 -    impl->WaitDevice = DUMMYAUD_WaitDevice;
   12.23 -    impl->PlayDevice = DUMMYAUD_PlayDevice;
   12.24 -    impl->GetDeviceBuf = DUMMYAUD_GetDeviceBuf;
   12.25 -    impl->CloseDevice = DUMMYAUD_CloseDevice;
   12.26      impl->OnlyHasDefaultOutputDevice = 1;
   12.27  
   12.28      return 1;
   12.29 @@ -72,82 +62,13 @@
   12.30  
   12.31  AudioBootStrap DUMMYAUD_bootstrap = {
   12.32      DUMMYAUD_DRIVER_NAME, "SDL dummy audio driver",
   12.33 -    DUMMYAUD_Available, DUMMYAUD_Init
   12.34 +    DUMMYAUD_Available, DUMMYAUD_Init, 1
   12.35  };
   12.36  
   12.37 -/* This function waits until it is possible to write a full sound buffer */
   12.38 -static void
   12.39 -DUMMYAUD_WaitDevice(_THIS)
   12.40 -{
   12.41 -    /* Don't block on first calls to simulate initial fragment filling. */
   12.42 -    if (this->hidden->initial_calls)
   12.43 -        this->hidden->initial_calls--;
   12.44 -    else
   12.45 -        SDL_Delay(this->hidden->write_delay);
   12.46 -}
   12.47 -
   12.48 -static void
   12.49 -DUMMYAUD_PlayDevice(_THIS)
   12.50 -{
   12.51 -    /* no-op...this is a null driver. */
   12.52 -}
   12.53 -
   12.54 -static Uint8 *
   12.55 -DUMMYAUD_GetDeviceBuf(_THIS)
   12.56 -{
   12.57 -    return (this->hidden->mixbuf);
   12.58 -}
   12.59 -
   12.60 -static void
   12.61 -DUMMYAUD_CloseDevice(_THIS)
   12.62 -{
   12.63 -    if (this->hidden->mixbuf != NULL) {
   12.64 -        SDL_FreeAudioMem(this->hidden->mixbuf);
   12.65 -        this->hidden->mixbuf = NULL;
   12.66 -    }
   12.67 -    SDL_free(this->hidden);
   12.68 -    this->hidden = NULL;
   12.69 -}
   12.70 -
   12.71  static int
   12.72  DUMMYAUD_OpenDevice(_THIS, const char *devname, int iscapture)
   12.73  {
   12.74 -    float bytes_per_sec = 0.0f;
   12.75 -
   12.76 -    /* Initialize all variables that we clean on shutdown */
   12.77 -    this->hidden = (struct SDL_PrivateAudioData *)
   12.78 -                    SDL_malloc((sizeof *this->hidden));
   12.79 -    if (this->hidden == NULL) {
   12.80 -        SDL_OutOfMemory();
   12.81 -        return 0;
   12.82 -    }
   12.83 -    SDL_memset(this->hidden, 0, (sizeof *this->hidden));
   12.84 -
   12.85 -    /* Allocate mixing buffer */
   12.86 -    this->hidden->mixlen = this->spec.size;
   12.87 -    this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(this->hidden->mixlen);
   12.88 -    if (this->hidden->mixbuf == NULL) {
   12.89 -        DUMMYAUD_CloseDevice(this);
   12.90 -        return 0;
   12.91 -    }
   12.92 -    SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
   12.93 -
   12.94 -    bytes_per_sec = (float) (SDL_AUDIO_BITSIZE(this->spec.format) / 8) *
   12.95 -                             this->spec.channels * this->spec.freq;
   12.96 -
   12.97 -    /*
   12.98 -     * We try to make this request more audio at the correct rate for
   12.99 -     *  a given audio spec, so timing stays fairly faithful.
  12.100 -     * Also, we have it not block at all for the first two calls, so
  12.101 -     *  it seems like we're filling two audio fragments right out of the
  12.102 -     *  gate, like other SDL drivers tend to do.
  12.103 -     */
  12.104 -    this->hidden->initial_calls = 2;
  12.105 -    this->hidden->write_delay =
  12.106 -        (Uint32) ((((float) this->spec.size) / bytes_per_sec) * 1000.0f);
  12.107 -
  12.108 -    /* We're ready to rock and roll. :-) */
  12.109 -    return 1;
  12.110 +    return 1;   /* always succeeds. */
  12.111  }
  12.112  
  12.113  /* vi: set ts=4 sw=4 expandtab: */
    13.1 --- a/src/audio/esd/SDL_esdaudio.c	Wed Oct 04 20:42:39 2006 +0000
    13.2 +++ b/src/audio/esd/SDL_esdaudio.c	Wed Oct 04 21:27:53 2006 +0000
    13.3 @@ -187,7 +187,7 @@
    13.4  
    13.5  AudioBootStrap ESD_bootstrap = {
    13.6      ESD_DRIVER_NAME, "Enlightened Sound Daemon",
    13.7 -    Audio_Available, Audio_CreateDevice
    13.8 +    Audio_Available, Audio_CreateDevice, 0
    13.9  };
   13.10  
   13.11  /* This function waits until it is possible to write a full sound buffer */
    14.1 --- a/src/audio/macosx/SDL_coreaudio.c	Wed Oct 04 20:42:39 2006 +0000
    14.2 +++ b/src/audio/macosx/SDL_coreaudio.c	Wed Oct 04 21:27:53 2006 +0000
    14.3 @@ -218,7 +218,7 @@
    14.4  static int
    14.5  COREAUDIO_Available(void)
    14.6  {
    14.7 -    return (1);
    14.8 +    return 1;  /* always available on Mac OS X. */
    14.9  }
   14.10  
   14.11  static int
   14.12 @@ -228,9 +228,6 @@
   14.13      impl->DetectDevices = COREAUDIO_DetectDevices;
   14.14      impl->GetDeviceName = COREAUDIO_GetDeviceName;
   14.15      impl->OpenDevice = COREAUDIO_OpenDevice;
   14.16 -    impl->WaitDevice = COREAUDIO_WaitDevice;
   14.17 -    impl->PlayDevice = COREAUDIO_PlayDevice;
   14.18 -    impl->GetDeviceBuf = COREAUDIO_GetDeviceBuf;
   14.19      impl->CloseDevice = COREAUDIO_CloseDevice;
   14.20      impl->Deinitialize = COREAUDIO_Deinitialize;
   14.21      impl->ProvidesOwnCallbackThread = 1;
   14.22 @@ -239,7 +236,7 @@
   14.23  
   14.24  AudioBootStrap COREAUDIO_bootstrap = {
   14.25      "coreaudio", "Mac OS X CoreAudio",
   14.26 -    COREAUDIO_Available, COREAUDIO_Init
   14.27 +    COREAUDIO_Available, COREAUDIO_Init, 0
   14.28  };
   14.29  
   14.30  
   14.31 @@ -355,25 +352,6 @@
   14.32  }
   14.33  
   14.34  
   14.35 -/* Dummy functions -- we don't use thread-based audio */
   14.36 -static void
   14.37 -COREAUDIO_WaitDevice(_THIS)
   14.38 -{
   14.39 -    return;
   14.40 -}
   14.41 -
   14.42 -static void
   14.43 -COREAUDIO_PlayDevice(_THIS)
   14.44 -{
   14.45 -    return;
   14.46 -}
   14.47 -
   14.48 -static Uint8 *
   14.49 -COREAUDIO_GetDeviceBuf(_THIS)
   14.50 -{
   14.51 -    return (NULL);
   14.52 -}
   14.53 -
   14.54  static void
   14.55  COREAUDIO_CloseDevice(_THIS)
   14.56  {
    15.1 --- a/src/audio/macrom/SDL_romaudio.c	Wed Oct 04 20:42:39 2006 +0000
    15.2 +++ b/src/audio/macrom/SDL_romaudio.c	Wed Oct 04 21:27:53 2006 +0000
    15.3 @@ -70,8 +70,6 @@
    15.4  SNDMGR_Init(SDL_AudioDriverImpl *impl)
    15.5  {
    15.6      /* Set the function pointers */
    15.7 -    impl->DetectDevices = SNDMGR_DetectDevices;
    15.8 -    impl->GetDeviceName = SNDMGR_GetDeviceName;
    15.9      impl->OpenDevice = SNDMGR_OpenDevice;
   15.10      impl->CloseDevice = SNDMGR_CloseDevice;
   15.11      impl->ProvidesOwnCallbackThread = 1;
   15.12 @@ -87,7 +85,7 @@
   15.13  
   15.14  AudioBootStrap SNDMGR_bootstrap = {
   15.15      "sndmgr", SDL_MACOS_NAME " SoundManager",
   15.16 -    SNDMGR_Available, SNDMGR_Init
   15.17 +    SNDMGR_Available, SNDMGR_Init, 0
   15.18  };
   15.19  
   15.20  #pragma options align=power
    16.1 --- a/src/audio/mint/SDL_mintaudio_dma8.c	Wed Oct 04 20:42:39 2006 +0000
    16.2 +++ b/src/audio/mint/SDL_mintaudio_dma8.c	Wed Oct 04 21:27:53 2006 +0000
    16.3 @@ -160,7 +160,7 @@
    16.4  
    16.5  AudioBootStrap MINTAUDIO_DMA8_bootstrap = {
    16.6      MINT_AUDIO_DRIVER_NAME, "MiNT DMA 8 bits audio driver",
    16.7 -    Audio_Available, Audio_CreateDevice
    16.8 +    Audio_Available, Audio_CreateDevice, 0
    16.9  };
   16.10  
   16.11  static void
    17.1 --- a/src/audio/mint/SDL_mintaudio_gsxb.c	Wed Oct 04 20:42:39 2006 +0000
    17.2 +++ b/src/audio/mint/SDL_mintaudio_gsxb.c	Wed Oct 04 21:27:53 2006 +0000
    17.3 @@ -166,7 +166,7 @@
    17.4  
    17.5  AudioBootStrap MINTAUDIO_GSXB_bootstrap = {
    17.6      MINT_AUDIO_DRIVER_NAME, "MiNT GSXB audio driver",
    17.7 -    Audio_Available, Audio_CreateDevice
    17.8 +    Audio_Available, Audio_CreateDevice, 0
    17.9  };
   17.10  
   17.11  static void
    18.1 --- a/src/audio/mint/SDL_mintaudio_mcsn.c	Wed Oct 04 20:42:39 2006 +0000
    18.2 +++ b/src/audio/mint/SDL_mintaudio_mcsn.c	Wed Oct 04 21:27:53 2006 +0000
    18.3 @@ -181,7 +181,7 @@
    18.4  
    18.5  AudioBootStrap MINTAUDIO_MCSN_bootstrap = {
    18.6      MINT_AUDIO_DRIVER_NAME, "MiNT MCSN audio driver",
    18.7 -    Audio_Available, Audio_CreateDevice
    18.8 +    Audio_Available, Audio_CreateDevice, 0
    18.9  };
   18.10  
   18.11  static void
    19.1 --- a/src/audio/mint/SDL_mintaudio_stfa.c	Wed Oct 04 20:42:39 2006 +0000
    19.2 +++ b/src/audio/mint/SDL_mintaudio_stfa.c	Wed Oct 04 21:27:53 2006 +0000
    19.3 @@ -160,7 +160,7 @@
    19.4  
    19.5  AudioBootStrap MINTAUDIO_STFA_bootstrap = {
    19.6      MINT_AUDIO_DRIVER_NAME, "MiNT STFA audio driver",
    19.7 -    Audio_Available, Audio_CreateDevice
    19.8 +    Audio_Available, Audio_CreateDevice, 0
    19.9  };
   19.10  
   19.11  static void
    20.1 --- a/src/audio/mint/SDL_mintaudio_xbios.c	Wed Oct 04 20:42:39 2006 +0000
    20.2 +++ b/src/audio/mint/SDL_mintaudio_xbios.c	Wed Oct 04 21:27:53 2006 +0000
    20.3 @@ -165,7 +165,7 @@
    20.4  
    20.5  AudioBootStrap MINTAUDIO_XBIOS_bootstrap = {
    20.6      MINT_AUDIO_DRIVER_NAME, "MiNT XBIOS audio driver",
    20.7 -    Audio_Available, Audio_CreateDevice
    20.8 +    Audio_Available, Audio_CreateDevice, 0
    20.9  };
   20.10  
   20.11  static void
    21.1 --- a/src/audio/mme/SDL_mmeaudio.c	Wed Oct 04 20:42:39 2006 +0000
    21.2 +++ b/src/audio/mme/SDL_mmeaudio.c	Wed Oct 04 21:27:53 2006 +0000
    21.3 @@ -92,7 +92,7 @@
    21.4  
    21.5  AudioBootStrap MMEAUDIO_bootstrap = {
    21.6      "waveout", "Tru64 MME WaveOut",
    21.7 -    Audio_Available, Audio_CreateDevice
    21.8 +    Audio_Available, Audio_CreateDevice, 0
    21.9  };
   21.10  
   21.11  static void
    22.1 --- a/src/audio/nas/SDL_nasaudio.c	Wed Oct 04 20:42:39 2006 +0000
    22.2 +++ b/src/audio/nas/SDL_nasaudio.c	Wed Oct 04 21:27:53 2006 +0000
    22.3 @@ -104,7 +104,7 @@
    22.4  
    22.5  AudioBootStrap NAS_bootstrap = {
    22.6      NAS_DRIVER_NAME, "Network Audio System",
    22.7 -    Audio_Available, Audio_CreateDevice
    22.8 +    Audio_Available, Audio_CreateDevice, 0
    22.9  };
   22.10  
   22.11  /* This function waits until it is possible to write a full sound buffer */
    23.1 --- a/src/audio/nto/SDL_nto_audio.c	Wed Oct 04 20:42:39 2006 +0000
    23.2 +++ b/src/audio/nto/SDL_nto_audio.c	Wed Oct 04 21:27:53 2006 +0000
    23.3 @@ -212,7 +212,8 @@
    23.4  AudioBootStrap QNXNTOAUDIO_bootstrap = {
    23.5      DRIVER_NAME, "QNX6 QSA-NTO Audio",
    23.6      NTO_AudioAvailable,
    23.7 -    NTO_CreateAudioDevice
    23.8 +    NTO_CreateAudioDevice,
    23.9 +    0
   23.10  };
   23.11  
   23.12  /* This function waits until it is possible to write a full sound buffer */
    24.1 --- a/src/audio/paudio/SDL_paudio.c	Wed Oct 04 20:42:39 2006 +0000
    24.2 +++ b/src/audio/paudio/SDL_paudio.c	Wed Oct 04 21:27:53 2006 +0000
    24.3 @@ -121,7 +121,7 @@
    24.4  
    24.5  AudioBootStrap Paud_bootstrap = {
    24.6      Paud_DRIVER_NAME, "AIX Paudio",
    24.7 -    Audio_Available, Audio_CreateDevice
    24.8 +    Audio_Available, Audio_CreateDevice, 0
    24.9  };
   24.10  
   24.11  /* This function waits until it is possible to write a full sound buffer */
    25.1 --- a/src/audio/sun/SDL_sunaudio.c	Wed Oct 04 20:42:39 2006 +0000
    25.2 +++ b/src/audio/sun/SDL_sunaudio.c	Wed Oct 04 21:27:53 2006 +0000
    25.3 @@ -116,7 +116,7 @@
    25.4  
    25.5  AudioBootStrap SUNAUDIO_bootstrap = {
    25.6      "audio", "UNIX /dev/audio interface",
    25.7 -    Audio_Available, Audio_CreateDevice
    25.8 +    Audio_Available, Audio_CreateDevice, 0
    25.9  };
   25.10  
   25.11  #ifdef DEBUG_AUDIO
    26.1 --- a/src/audio/ums/SDL_umsaudio.c	Wed Oct 04 20:42:39 2006 +0000
    26.2 +++ b/src/audio/ums/SDL_umsaudio.c	Wed Oct 04 21:27:53 2006 +0000
    26.3 @@ -152,7 +152,7 @@
    26.4  
    26.5  AudioBootStrap UMS_bootstrap = {
    26.6      UMS_DRIVER_NAME, "AIX UMS audio",
    26.7 -    Audio_Available, Audio_CreateDevice
    26.8 +    Audio_Available, Audio_CreateDevice, 0
    26.9  };
   26.10  
   26.11  static Uint8 *
    27.1 --- a/src/audio/windib/SDL_dibaudio.c	Wed Oct 04 20:42:39 2006 +0000
    27.2 +++ b/src/audio/windib/SDL_dibaudio.c	Wed Oct 04 21:27:53 2006 +0000
    27.3 @@ -97,7 +97,7 @@
    27.4  
    27.5  AudioBootStrap WAVEOUT_bootstrap = {
    27.6      "waveout", "Win95/98/NT/2000 WaveOut",
    27.7 -    Audio_Available, Audio_CreateDevice
    27.8 +    Audio_Available, Audio_CreateDevice, 0
    27.9  };
   27.10  
   27.11  
    28.1 --- a/src/audio/windx5/SDL_dx5audio.c	Wed Oct 04 20:42:39 2006 +0000
    28.2 +++ b/src/audio/windx5/SDL_dx5audio.c	Wed Oct 04 21:27:53 2006 +0000
    28.3 @@ -180,7 +180,7 @@
    28.4  
    28.5  AudioBootStrap DSOUND_bootstrap = {
    28.6      "dsound", "Win95/98/2000 DirectSound",
    28.7 -    Audio_Available, Audio_CreateDevice
    28.8 +    Audio_Available, Audio_CreateDevice, 0
    28.9  };
   28.10  
   28.11  static void