Changed some 1.3 audio symbol names. SDL-ryan-multiple-audio-device
authorRyan C. Gordon <icculus@icculus.org>
Tue, 03 Oct 2006 22:17:59 +0000
branchSDL-ryan-multiple-audio-device
changeset 3792866c310e2cb5
parent 3791 be33495e4d97
child 3793 2b4795e92b62
Changed some 1.3 audio symbol names.
include/SDL_audio.h
src/audio/SDL_audio.c
src/audio/SDL_sysaudio.h
src/audio/disk/SDL_diskaudio.c
src/audio/dummy/SDL_dummyaudio.c
src/audio/macosx/SDL_coreaudio.c
src/audio/macrom/SDL_romaudio.c
test/testaudioinfo.c
     1.1 --- a/include/SDL_audio.h	Tue Oct 03 20:48:42 2006 +0000
     1.2 +++ b/include/SDL_audio.h	Tue Oct 03 22:17:59 2006 +0000
     1.3 @@ -251,8 +251,8 @@
     1.4   *  string for any length of time, you should make your own copy of it, as it
     1.5   *  will be invalid next time any of several other SDL functions is called.
     1.6   */
     1.7 -extern DECLSPEC const char *SDLCALL SDL_GetAudioDevice(int index,
     1.8 -                                                       int iscapture);
     1.9 +extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index,
    1.10 +                                                           int iscapture);
    1.11  
    1.12  
    1.13  /*
     2.1 --- a/src/audio/SDL_audio.c	Tue Oct 03 20:48:42 2006 +0000
     2.2 +++ b/src/audio/SDL_audio.c	Tue Oct 03 22:17:59 2006 +0000
     2.3 @@ -230,7 +230,7 @@
     2.4                  continue;
     2.5              }
     2.6          } else {
     2.7 -            stream = current_audio.impl.GetAudioBuf(device);
     2.8 +            stream = current_audio.impl.GetDeviceBuf(device);
     2.9              if (stream == NULL) {
    2.10                  stream = device->fake_stream;
    2.11              }
    2.12 @@ -250,7 +250,7 @@
    2.13          /* Convert the audio if necessary */
    2.14          if (device->convert.needed) {
    2.15              SDL_ConvertAudio(&device->convert);
    2.16 -            stream = current_audio.impl.GetAudioBuf(device);
    2.17 +            stream = current_audio.impl.GetDeviceBuf(device);
    2.18              if (stream == NULL) {
    2.19                  stream = device->fake_stream;
    2.20              }
    2.21 @@ -259,14 +259,14 @@
    2.22  
    2.23          /* Ready current buffer for play and change current buffer */
    2.24          if (stream != device->fake_stream) {
    2.25 -            current_audio.impl.PlayAudio(device);
    2.26 +            current_audio.impl.PlayDevice(device);
    2.27          }
    2.28  
    2.29          /* Wait for an audio buffer to become available */
    2.30          if (stream == device->fake_stream) {
    2.31              SDL_Delay((device->spec.samples * 1000) / device->spec.freq);
    2.32          } else {
    2.33 -            current_audio.impl.WaitAudio(device);
    2.34 +            current_audio.impl.WaitDevice(device);
    2.35          }
    2.36      }
    2.37  
    2.38 @@ -275,11 +275,11 @@
    2.39          current_audio.impl.WaitDone(device);
    2.40      }
    2.41  #if SDL_AUDIO_DRIVER_AHI
    2.42 -    D(bug("WaitAudio...Done\n"));
    2.43 +    D(bug("WaitDevice...Done\n"));
    2.44  
    2.45 -    audio->CloseAudio(audio);
    2.46 +    audio->CloseDevice(audio);
    2.47  
    2.48 -    D(bug("CloseAudio..Done, subtask exiting...\n"));
    2.49 +    D(bug("CloseDevice..Done, subtask exiting...\n"));
    2.50      audio_configured = 0;
    2.51  #endif
    2.52  #ifdef __OS2__
    2.53 @@ -291,7 +291,7 @@
    2.54  }
    2.55  
    2.56  static void
    2.57 -SDL_LockAudio_Default(SDL_AudioDevice * audio)
    2.58 +SDL_LockDevice_Default(SDL_AudioDevice * audio)
    2.59  {
    2.60      if (audio->thread && (SDL_ThreadID() == audio->threadid)) {
    2.61          return;
    2.62 @@ -300,7 +300,7 @@
    2.63  }
    2.64  
    2.65  static void
    2.66 -SDL_UnlockAudio_Default(SDL_AudioDevice * audio)
    2.67 +SDL_UnlockDevice_Default(SDL_AudioDevice * audio)
    2.68  {
    2.69      if (audio->thread && (SDL_ThreadID() == audio->threadid)) {
    2.70          return;
    2.71 @@ -438,9 +438,9 @@
    2.72          }
    2.73      }
    2.74  
    2.75 -    if (!current_audio.impl.LockAudio && !current_audio.impl.UnlockAudio) {
    2.76 -        current_audio.impl.LockAudio = SDL_LockAudio_Default;
    2.77 -        current_audio.impl.UnlockAudio = SDL_UnlockAudio_Default;
    2.78 +    if (!current_audio.impl.LockDevice && !current_audio.impl.UnlockDevice) {
    2.79 +        current_audio.impl.LockDevice = SDL_LockDevice_Default;
    2.80 +        current_audio.impl.UnlockDevice = SDL_UnlockDevice_Default;
    2.81      }
    2.82  
    2.83      return (0);
    2.84 @@ -467,19 +467,19 @@
    2.85  
    2.86  
    2.87  const char *
    2.88 -SDL_GetAudioDevice(int index, int iscapture)
    2.89 +SDL_GetAudioDeviceName(int index, int iscapture)
    2.90  {
    2.91      if (!SDL_WasInit(SDL_INIT_AUDIO)) {
    2.92          SDL_SetError("Audio subsystem is not initialized");
    2.93          return NULL;
    2.94      }
    2.95  
    2.96 -    if ((index < 0) && (!current_audio.impl.GetAudioDevice)) {
    2.97 +    if ((index < 0) && (!current_audio.impl.GetDeviceName)) {
    2.98          SDL_SetError("No such device");
    2.99          return NULL;
   2.100      }
   2.101  
   2.102 -    return current_audio.impl.GetAudioDevice(index, iscapture);
   2.103 +    return current_audio.impl.GetDeviceName(index, iscapture);
   2.104  }
   2.105  
   2.106  
   2.107 @@ -501,7 +501,7 @@
   2.108      }
   2.109  #if !SDL_AUDIO_DRIVER_AHI   /* !!! FIXME: get rid of this #if. */
   2.110      if (device->opened) {
   2.111 -        current_audio.impl.CloseAudio(device);
   2.112 +        current_audio.impl.CloseDevice(device);
   2.113          device->opened = 0;
   2.114      }
   2.115  #endif
   2.116 @@ -632,7 +632,7 @@
   2.117  /* !!! FIXME: Get this #if out of the core. */
   2.118  /* AmigaOS opens audio inside the main loop */
   2.119  #if !SDL_AUDIO_DRIVER_AHI
   2.120 -    if (!current_audio.impl.OpenAudio(device, devname, iscapture)) {
   2.121 +    if (!current_audio.impl.OpenDevice(device, devname, iscapture)) {
   2.122          close_audio_device(device);
   2.123          return 0;
   2.124      }
   2.125 @@ -824,11 +824,11 @@
   2.126  void
   2.127  SDL_LockAudioDevice(SDL_AudioDeviceID devid)
   2.128  {
   2.129 -    if (current_audio.impl.LockAudio != NULL) {
   2.130 +    if (current_audio.impl.LockDevice != NULL) {
   2.131          SDL_AudioDevice *device = get_audio_device(devid);
   2.132          /* Obtain a lock on the mixing buffers */
   2.133          if (device) {
   2.134 -            current_audio.impl.LockAudio(device);
   2.135 +            current_audio.impl.LockDevice(device);
   2.136          }
   2.137      }
   2.138  }
   2.139 @@ -842,11 +842,11 @@
   2.140  void
   2.141  SDL_UnlockAudioDevice(SDL_AudioDeviceID devid)
   2.142  {
   2.143 -    if (current_audio.impl.UnlockAudio != NULL) {
   2.144 +    if (current_audio.impl.UnlockDevice != NULL) {
   2.145          SDL_AudioDevice *device = get_audio_device(devid);
   2.146          /* Obtain a lock on the mixing buffers */
   2.147          if (device) {
   2.148 -            current_audio.impl.UnlockAudio(device);
   2.149 +            current_audio.impl.UnlockDevice(device);
   2.150          }
   2.151      }
   2.152  }
     3.1 --- a/src/audio/SDL_sysaudio.h	Tue Oct 03 20:48:42 2006 +0000
     3.2 +++ b/src/audio/SDL_sysaudio.h	Tue Oct 03 22:17:59 2006 +0000
     3.3 @@ -35,16 +35,16 @@
     3.4  typedef struct SDL_AudioDriverImpl
     3.5  {
     3.6      int (*DetectDevices)(int iscapture);
     3.7 -    const char *(*GetAudioDevice)(int index, int iscapture);
     3.8 -    int (*OpenAudio) (_THIS, const char *devname, int iscapture);
     3.9 +    const char *(*GetDeviceName)(int index, int iscapture);
    3.10 +    int (*OpenDevice) (_THIS, const char *devname, int iscapture);
    3.11      void (*ThreadInit) (_THIS); /* Called by audio thread at start */
    3.12 -    void (*WaitAudio) (_THIS);
    3.13 -    void (*PlayAudio) (_THIS);
    3.14 -    Uint8 *(*GetAudioBuf) (_THIS);
    3.15 +    void (*WaitDevice) (_THIS);
    3.16 +    void (*PlayDevice) (_THIS);
    3.17 +    Uint8 *(*GetDeviceBuf) (_THIS);
    3.18      void (*WaitDone) (_THIS);
    3.19 -    void (*CloseAudio) (_THIS);
    3.20 -    void (*LockAudio) (_THIS);
    3.21 -    void (*UnlockAudio) (_THIS);
    3.22 +    void (*CloseDevice) (_THIS);
    3.23 +    void (*LockDevice) (_THIS);
    3.24 +    void (*UnlockDevice) (_THIS);
    3.25      void (*Deinitialize) (void);
    3.26  } SDL_AudioDriverImpl;
    3.27  
     4.1 --- a/src/audio/disk/SDL_diskaudio.c	Tue Oct 03 20:48:42 2006 +0000
     4.2 +++ b/src/audio/disk/SDL_diskaudio.c	Tue Oct 03 22:17:59 2006 +0000
     4.3 @@ -47,11 +47,11 @@
     4.4  #define DISKDEFAULT_WRITEDELAY   150
     4.5  
     4.6  /* Audio driver functions */
     4.7 -static int DISKAUD_OpenAudio(_THIS, const char *devname, int iscapture);
     4.8 -static void DISKAUD_WaitAudio(_THIS);
     4.9 -static void DISKAUD_PlayAudio(_THIS);
    4.10 -static Uint8 *DISKAUD_GetAudioBuf(_THIS);
    4.11 -static void DISKAUD_CloseAudio(_THIS);
    4.12 +static int DISKAUD_OpenDevice(_THIS, const char *devname, int iscapture);
    4.13 +static void DISKAUD_WaitDevice(_THIS);
    4.14 +static void DISKAUD_PlayDevice(_THIS);
    4.15 +static Uint8 *DISKAUD_GetDeviceBuf(_THIS);
    4.16 +static void DISKAUD_CloseDevice(_THIS);
    4.17  
    4.18  static const char *
    4.19  DISKAUD_GetOutputFilename(void)
    4.20 @@ -80,11 +80,11 @@
    4.21      SDL_memset(impl, '\0', sizeof (SDL_AudioDriverImpl));
    4.22  
    4.23      /* Set the function pointers */
    4.24 -    impl->OpenAudio = DISKAUD_OpenAudio;
    4.25 -    impl->WaitAudio = DISKAUD_WaitAudio;
    4.26 -    impl->PlayAudio = DISKAUD_PlayAudio;
    4.27 -    impl->GetAudioBuf = DISKAUD_GetAudioBuf;
    4.28 -    impl->CloseAudio = DISKAUD_CloseAudio;
    4.29 +    impl->OpenDevice = DISKAUD_OpenDevice;
    4.30 +    impl->WaitDevice = DISKAUD_WaitDevice;
    4.31 +    impl->PlayDevice = DISKAUD_PlayDevice;
    4.32 +    impl->GetDeviceBuf = DISKAUD_GetDeviceBuf;
    4.33 +    impl->CloseDevice = DISKAUD_CloseDevice;
    4.34  
    4.35      return 1;
    4.36  }
    4.37 @@ -96,13 +96,13 @@
    4.38  
    4.39  /* This function waits until it is possible to write a full sound buffer */
    4.40  static void
    4.41 -DISKAUD_WaitAudio(_THIS)
    4.42 +DISKAUD_WaitDevice(_THIS)
    4.43  {
    4.44      SDL_Delay(this->hidden->write_delay);
    4.45  }
    4.46  
    4.47  static void
    4.48 -DISKAUD_PlayAudio(_THIS)
    4.49 +DISKAUD_PlayDevice(_THIS)
    4.50  {
    4.51      int written;
    4.52  
    4.53 @@ -120,13 +120,13 @@
    4.54  }
    4.55  
    4.56  static Uint8 *
    4.57 -DISKAUD_GetAudioBuf(_THIS)
    4.58 +DISKAUD_GetDeviceBuf(_THIS)
    4.59  {
    4.60      return (this->hidden->mixbuf);
    4.61  }
    4.62  
    4.63  static void
    4.64 -DISKAUD_CloseAudio(_THIS)
    4.65 +DISKAUD_CloseDevice(_THIS)
    4.66  {
    4.67      if (this->hidden->mixbuf != NULL) {
    4.68          SDL_FreeAudioMem(this->hidden->mixbuf);
    4.69 @@ -141,7 +141,7 @@
    4.70  }
    4.71  
    4.72  static int
    4.73 -DISKAUD_OpenAudio(_THIS, const char *devname, int iscapture)
    4.74 +DISKAUD_OpenDevice(_THIS, const char *devname, int iscapture)
    4.75  {
    4.76      const char *envr = SDL_getenv(DISKENVR_WRITEDELAY);
    4.77      const char *fname = DISKAUD_GetOutputFilename();
    4.78 @@ -163,14 +163,14 @@
    4.79      /* Open the audio device */
    4.80      this->hidden->output = SDL_RWFromFile(fname, "wb");
    4.81      if (this->hidden->output == NULL) {
    4.82 -        DISKAUD_CloseAudio(this);
    4.83 +        DISKAUD_CloseDevice(this);
    4.84          return 0;
    4.85      }
    4.86  
    4.87      /* Allocate mixing buffer */
    4.88      this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(this->hidden->mixlen);
    4.89      if (this->hidden->mixbuf == NULL) {
    4.90 -        DISKAUD_CloseAudio(this);
    4.91 +        DISKAUD_CloseDevice(this);
    4.92          return 0;
    4.93      }
    4.94      SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
     5.1 --- a/src/audio/dummy/SDL_dummyaudio.c	Tue Oct 03 20:48:42 2006 +0000
     5.2 +++ b/src/audio/dummy/SDL_dummyaudio.c	Tue Oct 03 22:17:59 2006 +0000
     5.3 @@ -37,11 +37,11 @@
     5.4  #define DUMMYAUD_DRIVER_NAME         "dummy"
     5.5  
     5.6  /* Audio driver functions */
     5.7 -static int DUMMYAUD_OpenAudio(_THIS, const char *devname, int iscapture);
     5.8 -static void DUMMYAUD_WaitAudio(_THIS);
     5.9 -static void DUMMYAUD_PlayAudio(_THIS);
    5.10 -static Uint8 *DUMMYAUD_GetAudioBuf(_THIS);
    5.11 -static void DUMMYAUD_CloseAudio(_THIS);
    5.12 +static int DUMMYAUD_OpenDevice(_THIS, const char *devname, int iscapture);
    5.13 +static void DUMMYAUD_WaitDevice(_THIS);
    5.14 +static void DUMMYAUD_PlayDevice(_THIS);
    5.15 +static Uint8 *DUMMYAUD_GetDeviceBuf(_THIS);
    5.16 +static void DUMMYAUD_CloseDevice(_THIS);
    5.17  
    5.18  /* Audio driver bootstrap functions */
    5.19  static int
    5.20 @@ -60,11 +60,11 @@
    5.21  DUMMYAUD_Init(SDL_AudioDriverImpl *impl)
    5.22  {
    5.23      /* Set the function pointers */
    5.24 -    impl->OpenAudio = DUMMYAUD_OpenAudio;
    5.25 -    impl->WaitAudio = DUMMYAUD_WaitAudio;
    5.26 -    impl->PlayAudio = DUMMYAUD_PlayAudio;
    5.27 -    impl->GetAudioBuf = DUMMYAUD_GetAudioBuf;
    5.28 -    impl->CloseAudio = DUMMYAUD_CloseAudio;
    5.29 +    impl->OpenDevice = DUMMYAUD_OpenDevice;
    5.30 +    impl->WaitDevice = DUMMYAUD_WaitDevice;
    5.31 +    impl->PlayDevice = DUMMYAUD_PlayDevice;
    5.32 +    impl->GetDeviceBuf = DUMMYAUD_GetDeviceBuf;
    5.33 +    impl->CloseDevice = DUMMYAUD_CloseDevice;
    5.34  
    5.35      return 1;
    5.36  }
    5.37 @@ -76,7 +76,7 @@
    5.38  
    5.39  /* This function waits until it is possible to write a full sound buffer */
    5.40  static void
    5.41 -DUMMYAUD_WaitAudio(_THIS)
    5.42 +DUMMYAUD_WaitDevice(_THIS)
    5.43  {
    5.44      /* Don't block on first calls to simulate initial fragment filling. */
    5.45      if (this->hidden->initial_calls)
    5.46 @@ -86,19 +86,19 @@
    5.47  }
    5.48  
    5.49  static void
    5.50 -DUMMYAUD_PlayAudio(_THIS)
    5.51 +DUMMYAUD_PlayDevice(_THIS)
    5.52  {
    5.53      /* no-op...this is a null driver. */
    5.54  }
    5.55  
    5.56  static Uint8 *
    5.57 -DUMMYAUD_GetAudioBuf(_THIS)
    5.58 +DUMMYAUD_GetDeviceBuf(_THIS)
    5.59  {
    5.60      return (this->hidden->mixbuf);
    5.61  }
    5.62  
    5.63  static void
    5.64 -DUMMYAUD_CloseAudio(_THIS)
    5.65 +DUMMYAUD_CloseDevice(_THIS)
    5.66  {
    5.67      if (this->hidden->mixbuf != NULL) {
    5.68          SDL_FreeAudioMem(this->hidden->mixbuf);
    5.69 @@ -109,7 +109,7 @@
    5.70  }
    5.71  
    5.72  static int
    5.73 -DUMMYAUD_OpenAudio(_THIS, const char *devname, int iscapture)
    5.74 +DUMMYAUD_OpenDevice(_THIS, const char *devname, int iscapture)
    5.75  {
    5.76      float bytes_per_sec = 0.0f;
    5.77  
    5.78 @@ -126,7 +126,7 @@
    5.79      this->hidden->mixlen = this->spec.size;
    5.80      this->hidden->mixbuf = (Uint8 *) SDL_AllocAudioMem(this->hidden->mixlen);
    5.81      if (this->hidden->mixbuf == NULL) {
    5.82 -        DUMMYAUD_CloseAudio(this);
    5.83 +        DUMMYAUD_CloseDevice(this);
    5.84          return 0;
    5.85      }
    5.86      SDL_memset(this->hidden->mixbuf, this->spec.silence, this->spec.size);
     6.1 --- a/src/audio/macosx/SDL_coreaudio.c	Tue Oct 03 20:48:42 2006 +0000
     6.2 +++ b/src/audio/macosx/SDL_coreaudio.c	Tue Oct 03 22:17:59 2006 +0000
     6.3 @@ -205,12 +205,12 @@
     6.4  /* Audio driver functions */
     6.5  
     6.6  static int COREAUDIO_DetectDevices(int iscapture);
     6.7 -static const char *COREAUDIO_GetAudioDevice(int index, int iscapture);
     6.8 -static int COREAUDIO_OpenAudio(_THIS, const char *devname, int iscapture);
     6.9 -static void COREAUDIO_WaitAudio(_THIS);
    6.10 -static void COREAUDIO_PlayAudio(_THIS);
    6.11 -static Uint8 *COREAUDIO_GetAudioBuf(_THIS);
    6.12 -static void COREAUDIO_CloseAudio(_THIS);
    6.13 +static const char *COREAUDIO_GetDeviceName(int index, int iscapture);
    6.14 +static int COREAUDIO_OpenDevice(_THIS, const char *devname, int iscapture);
    6.15 +static void COREAUDIO_WaitDevice(_THIS);
    6.16 +static void COREAUDIO_PlayDevice(_THIS);
    6.17 +static Uint8 *COREAUDIO_GetDeviceBuf(_THIS);
    6.18 +static void COREAUDIO_CloseDevice(_THIS);
    6.19  static void COREAUDIO_Deinitialize(void);
    6.20  
    6.21  /* Audio driver bootstrap functions */
    6.22 @@ -226,12 +226,12 @@
    6.23  {
    6.24      /* Set the function pointers */
    6.25      impl->DetectDevices = COREAUDIO_DetectDevices;
    6.26 -    impl->GetAudioDevice = COREAUDIO_GetAudioDevice;
    6.27 -    impl->OpenAudio = COREAUDIO_OpenAudio;
    6.28 -    impl->WaitAudio = COREAUDIO_WaitAudio;
    6.29 -    impl->PlayAudio = COREAUDIO_PlayAudio;
    6.30 -    impl->GetAudioBuf = COREAUDIO_GetAudioBuf;
    6.31 -    impl->CloseAudio = COREAUDIO_CloseAudio;
    6.32 +    impl->GetDeviceName = COREAUDIO_GetDeviceName;
    6.33 +    impl->OpenDevice = COREAUDIO_OpenDevice;
    6.34 +    impl->WaitDevice = COREAUDIO_WaitDevice;
    6.35 +    impl->PlayDevice = COREAUDIO_PlayDevice;
    6.36 +    impl->GetDeviceBuf = COREAUDIO_GetDeviceBuf;
    6.37 +    impl->CloseDevice = COREAUDIO_CloseDevice;
    6.38      impl->Deinitialize = COREAUDIO_Deinitialize;
    6.39  
    6.40      return 1;
    6.41 @@ -259,7 +259,7 @@
    6.42  
    6.43  
    6.44  static const char *
    6.45 -COREAUDIO_GetAudioDevice(int index, int iscapture)
    6.46 +COREAUDIO_GetDeviceName(int index, int iscapture)
    6.47  {
    6.48      if ((iscapture) && (index < inputDeviceCount)) {
    6.49          return inputDevices[index].name;
    6.50 @@ -357,25 +357,25 @@
    6.51  
    6.52  /* Dummy functions -- we don't use thread-based audio */
    6.53  void
    6.54 -COREAUDIO_WaitAudio(_THIS)
    6.55 +COREAUDIO_WaitDevice(_THIS)
    6.56  {
    6.57      return;
    6.58  }
    6.59  
    6.60  void
    6.61 -COREAUDIO_PlayAudio(_THIS)
    6.62 +COREAUDIO_PlayDevice(_THIS)
    6.63  {
    6.64      return;
    6.65  }
    6.66  
    6.67  Uint8 *
    6.68 -COREAUDIO_GetAudioBuf(_THIS)
    6.69 +COREAUDIO_GetDeviceBuf(_THIS)
    6.70  {
    6.71      return (NULL);
    6.72  }
    6.73  
    6.74  void
    6.75 -COREAUDIO_CloseAudio(_THIS)
    6.76 +COREAUDIO_CloseDevice(_THIS)
    6.77  {
    6.78      if (this->hidden != NULL) {
    6.79          OSStatus result = noErr;
    6.80 @@ -407,7 +407,7 @@
    6.81  
    6.82  #define CHECK_RESULT(msg) \
    6.83      if (result != noErr) { \
    6.84 -        COREAUDIO_CloseAudio(this); \
    6.85 +        COREAUDIO_CloseDevice(this); \
    6.86          SDL_SetError("CoreAudio error (%s): %d", msg, (int) result); \
    6.87          return 0; \
    6.88      }
    6.89 @@ -556,7 +556,7 @@
    6.90  
    6.91  
    6.92  int
    6.93 -COREAUDIO_OpenAudio(_THIS, const char *devname, int iscapture)
    6.94 +COREAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
    6.95  {
    6.96      AudioStreamBasicDescription strdesc;
    6.97      SDL_AudioFormat test_format = SDL_FirstAudioFormat(this->spec.format);
     7.1 --- a/src/audio/macrom/SDL_romaudio.c	Tue Oct 03 20:48:42 2006 +0000
     7.2 +++ b/src/audio/macrom/SDL_romaudio.c	Tue Oct 03 22:17:59 2006 +0000
     7.3 @@ -52,14 +52,13 @@
     7.4  
     7.5  /* Audio driver functions */
     7.6  
     7.7 -static void SNDMGR_CloseAudio(_THIS);
     7.8 -static int SNDMGR_OpenAudio(_THIS, const char *devname, int iscapture);
     7.9 -static void SNDMGR_LockAudio(_THIS);
    7.10 -static void SNDMGR_UnlockAudio(_THIS);
    7.11 +static void SNDMGR_CloseDevice(_THIS);
    7.12 +static int SNDMGR_OpenDevice(_THIS, const char *devname, int iscapture);
    7.13 +static void SNDMGR_LockDevice(_THIS);
    7.14 +static void SNDMGR_UnlockDevice(_THIS);
    7.15  
    7.16  /* Audio driver bootstrap functions */
    7.17  
    7.18 -
    7.19  static int
    7.20  SNDMGR_Available(void)
    7.21  {
    7.22 @@ -71,14 +70,14 @@
    7.23  SNDMGR_Init(SDL_AudioDriverImpl *impl)
    7.24  {
    7.25      /* Set the function pointers */
    7.26 -    impl->OpenAudio = SNDMGR_OpenAudio;
    7.27 -    impl->CloseAudio = SNDMGR_CloseAudio;
    7.28 -    impl->LockAudio = SNDMGR_LockAudio;
    7.29 -    impl->UnlockAudio = SNDMGR_UnlockAudio;
    7.30 +    impl->OpenDevice = SNDMGR_OpenDevice;
    7.31 +    impl->CloseDevice = SNDMGR_CloseDevice;
    7.32 +    impl->LockDevice = SNDMGR_LockDevice;
    7.33 +    impl->UnlockDevice = SNDMGR_UnlockDevice;
    7.34  
    7.35  #ifdef __MACOSX__               /* Mac OS X uses threaded audio, so normal thread code is okay */
    7.36 -    impl->LockAudio = NULL;
    7.37 -    impl->UnlockAudio = NULL;
    7.38 +    impl->LockDevice = NULL;
    7.39 +    impl->UnlockDevice = NULL;
    7.40  #endif
    7.41  
    7.42      return 1;
    7.43 @@ -129,13 +128,13 @@
    7.44  }
    7.45  
    7.46  static void
    7.47 -SNDMGR_LockAudio(_THIS)
    7.48 +SNDMGR_LockDevice(_THIS)
    7.49  {
    7.50      IncrementAtomic((SInt32 *) & audio_is_locked);
    7.51  }
    7.52  
    7.53  static void
    7.54 -SNDMGR_UnlockAudio(_THIS)
    7.55 +SNDMGR_UnlockDevice(_THIS)
    7.56  {
    7.57      SInt32 oldval;
    7.58  
    7.59 @@ -198,7 +197,7 @@
    7.60  }
    7.61  
    7.62  static int
    7.63 -SNDMGR_OpenAudio(_THIS, const char *devname, int iscapture)
    7.64 +SNDMGR_OpenDevice(_THIS, const char *devname, int iscapture)
    7.65  {
    7.66      SDL_AudioSpec *spec = &this->spec;
    7.67      SndChannelPtr channel = NULL;
    7.68 @@ -284,7 +283,7 @@
    7.69      for (i = 0; i < 2; i++) {
    7.70          buffer[i] = (UInt8 *) malloc(sizeof(UInt8) * spec->size);
    7.71          if (buffer[i] == NULL) {
    7.72 -            SNDMGR_CloseAudio(this);
    7.73 +            SNDMGR_CloseDevice(this);
    7.74              SDL_OutOfMemory();
    7.75              return 0;
    7.76          }
    7.77 @@ -294,7 +293,7 @@
    7.78      /* Create the sound manager channel */
    7.79      channel = (SndChannelPtr) SDL_malloc(sizeof(*channel));
    7.80      if (channel == NULL) {
    7.81 -        SNDMGR_CloseAudio(this);
    7.82 +        SNDMGR_CloseDevice(this);
    7.83          SDL_OutOfMemory();
    7.84          return 0;
    7.85      }
    7.86 @@ -307,7 +306,7 @@
    7.87      channel->userInfo = (long) this;
    7.88      channel->qLength = 128;
    7.89      if (SndNewChannel(&channel, sampledSynth, initOptions, callback) != noErr) {
    7.90 -        SNDMGR_CloseAudio(this);
    7.91 +        SNDMGR_CloseDevice(this);
    7.92          SDL_SetError("Unable to create audio channel");
    7.93          return 0;
    7.94      }
    7.95 @@ -326,7 +325,7 @@
    7.96  }
    7.97  
    7.98  static void
    7.99 -SNDMGR_CloseAudio(_THIS)
   7.100 +SNDMGR_CloseDevice(_THIS)
   7.101  {
   7.102  
   7.103      int i;
     8.1 --- a/test/testaudioinfo.c	Tue Oct 03 20:48:42 2006 +0000
     8.2 +++ b/test/testaudioinfo.c	Tue Oct 03 22:17:59 2006 +0000
     8.3 @@ -12,7 +12,7 @@
     8.4          int i;
     8.5          printf("%s devices:\n", typestr);
     8.6          for (i = 0; i < n; i++) {
     8.7 -            printf("  %s\n", SDL_GetAudioDevice(i, iscapture));
     8.8 +            printf("  %s\n", SDL_GetAudioDeviceName(i, iscapture));
     8.9          }
    8.10          printf("\n");
    8.11      }