audio: fixed more "spec" references that should have been "callbackspec".
authorRyan C. Gordon <icculus@icculus.org>
Wed, 10 May 2017 16:18:43 -0400
changeset 10997b6315b6bc32f
parent 10996 98cb4438d83e
child 10998 cedca11e9b61
audio: fixed more "spec" references that should have been "callbackspec".

This should catch all the ones for audio targets that have provided their
own audio threads.
src/audio/coreaudio/SDL_coreaudio.m
src/audio/emscripten/SDL_emscriptenaudio.c
src/audio/haiku/SDL_haikuaudio.cc
src/audio/nacl/SDL_naclaudio.c
     1.1 --- a/src/audio/coreaudio/SDL_coreaudio.m	Tue May 09 03:19:58 2017 -0700
     1.2 +++ b/src/audio/coreaudio/SDL_coreaudio.m	Wed May 10 16:18:43 2017 -0400
     1.3 @@ -412,7 +412,7 @@
     1.4              if (this->hidden->bufferOffset >= this->hidden->bufferSize) {
     1.5                  /* Generate the data */
     1.6                  SDL_LockMutex(this->mixer_lock);
     1.7 -                (*this->spec.callback)(this->spec.userdata,
     1.8 +                (*this->callbackspec.callback)(this->callbackspec.userdata,
     1.9                              this->hidden->buffer, this->hidden->bufferSize);
    1.10                  SDL_UnlockMutex(this->mixer_lock);
    1.11                  this->hidden->bufferOffset = 0;
    1.12 @@ -459,7 +459,7 @@
    1.13  
    1.14              if (this->hidden->bufferOffset >= this->hidden->bufferSize) {
    1.15                  SDL_LockMutex(this->mixer_lock);
    1.16 -                (*this->spec.callback)(this->spec.userdata, this->hidden->buffer, this->hidden->bufferSize);
    1.17 +                (*this->callbackspec.callback)(this->callbackspec.userdata, this->hidden->buffer, this->hidden->bufferSize);
    1.18                  SDL_UnlockMutex(this->mixer_lock);
    1.19                  this->hidden->bufferOffset = 0;
    1.20              }
     2.1 --- a/src/audio/emscripten/SDL_emscriptenaudio.c	Tue May 09 03:19:58 2017 -0700
     2.2 +++ b/src/audio/emscripten/SDL_emscriptenaudio.c	Wed May 10 16:18:43 2017 -0400
     2.3 @@ -52,7 +52,7 @@
     2.4  static void
     2.5  HandleAudioProcess(_THIS)
     2.6  {
     2.7 -    SDL_AudioCallback callback = this->spec.callback;
     2.8 +    SDL_AudioCallback callback = this->callbackspec.callback;
     2.9      const int stream_len = this->callbackspec.size;
    2.10  
    2.11      /* Only do something if audio is enabled */
    2.12 @@ -65,11 +65,11 @@
    2.13  
    2.14      if (this->stream == NULL) {  /* no conversion necessary. */
    2.15          SDL_assert(this->spec.size == stream_len);
    2.16 -        callback(this->spec.userdata, this->work_buffer, stream_len);
    2.17 +        callback(this->callbackspec.userdata, this->work_buffer, stream_len);
    2.18      } else {  /* streaming/converting */
    2.19          int got;
    2.20          while (SDL_AudioStreamAvailable(this->stream) < ((int) this->spec.size)) {
    2.21 -            callback(this->spec.userdata, this->work_buffer, stream_len);
    2.22 +            callback(this->callbackspec.userdata, this->work_buffer, stream_len);
    2.23              if (SDL_AudioStreamPut(this->stream, this->work_buffer, stream_len) == -1) {
    2.24                  SDL_AudioStreamClear(this->stream);
    2.25                  SDL_AtomicSet(&this->enabled, 0);
    2.26 @@ -90,7 +90,7 @@
    2.27  static void
    2.28  HandleCaptureProcess(_THIS)
    2.29  {
    2.30 -    SDL_AudioCallback callback = this->spec.callback;
    2.31 +    SDL_AudioCallback callback = this->callbackspec.callback;
    2.32      const int stream_len = this->callbackspec.size;
    2.33  
    2.34      /* Only do something if audio is enabled */
    2.35 @@ -123,7 +123,7 @@
    2.36  
    2.37      if (this->stream == NULL) {  /* no conversion necessary. */
    2.38          SDL_assert(this->spec.size == stream_len);
    2.39 -        callback(this->spec.userdata, this->work_buffer, stream_len);
    2.40 +        callback(this->callbackspec.userdata, this->work_buffer, stream_len);
    2.41      } else {  /* streaming/converting */
    2.42          if (SDL_AudioStreamPut(this->stream, this->work_buffer, this->spec.size) == -1) {
    2.43              SDL_AtomicSet(&this->enabled, 0);
    2.44 @@ -135,7 +135,7 @@
    2.45              if (got != stream_len) {
    2.46                  SDL_memset(this->work_buffer, this->callbackspec.silence, stream_len);
    2.47              }
    2.48 -            callback(this->spec.userdata, this->work_buffer, stream_len);  /* Send it to the app. */
    2.49 +            callback(this->callbackspec.userdata, this->work_buffer, stream_len);  /* Send it to the app. */
    2.50          }
    2.51      }
    2.52  }
     3.1 --- a/src/audio/haiku/SDL_haikuaudio.cc	Tue May 09 03:19:58 2017 -0700
     3.2 +++ b/src/audio/haiku/SDL_haikuaudio.cc	Wed May 10 16:18:43 2017 -0400
     3.3 @@ -48,7 +48,7 @@
     3.4            const media_raw_audio_format & format)
     3.5  {
     3.6      SDL_AudioDevice *audio = (SDL_AudioDevice *) device;
     3.7 -    SDL_AudioCallback callback = audio->spec.callback;
     3.8 +    SDL_AudioCallback callback = audio->callbackspec.callback;
     3.9  
    3.10      /* Only do something if audio is enabled */
    3.11      if (!SDL_AtomicGet(&audio->enabled) || SDL_AtomicGet(&audio->paused)) {
    3.12 @@ -63,13 +63,13 @@
    3.13  
    3.14      if (audio->stream == NULL) {  /* no conversion necessary. */
    3.15          SDL_LockMutex(audio->mixer_lock);
    3.16 -        callback(audio->spec.userdata, (Uint8 *) stream, len);
    3.17 +        callback(audio->callbackspec.userdata, (Uint8 *) stream, len);
    3.18          SDL_UnlockMutex(audio->mixer_lock);
    3.19      } else {  /* streaming/converting */
    3.20          const int stream_len = audio->callbackspec.size;
    3.21          const int ilen = (int) len;
    3.22          while (SDL_AudioStreamAvailable(audio->stream) < ilen) {
    3.23 -            callback(audio->spec.userdata, audio->work_buffer, stream_len);
    3.24 +            callback(audio->callbackspec.userdata, audio->work_buffer, stream_len);
    3.25              if (SDL_AudioStreamPut(audio->stream, audio->work_buffer, stream_len) == -1) {
    3.26                  SDL_AudioStreamClear(audio->stream);
    3.27                  SDL_AtomicSet(&audio->enabled, 0);
     4.1 --- a/src/audio/nacl/SDL_naclaudio.c	Tue May 09 03:19:58 2017 -0700
     4.2 +++ b/src/audio/nacl/SDL_naclaudio.c	Wed May 10 16:18:43 2017 -0400
     4.3 @@ -48,7 +48,7 @@
     4.4  static void nacl_audio_callback(void* stream, uint32_t buffer_size, PP_TimeDelta latency, void* data) {
     4.5      const int len = (int) buffer_size;
     4.6      SDL_AudioDevice* _this = (SDL_AudioDevice*) data;
     4.7 -    SDL_AudioCallback callback = _this->spec.callback;
     4.8 +    SDL_AudioCallback callback = _this->callbackspec.callback;
     4.9      
    4.10      SDL_LockMutex(private->mutex);  /* !!! FIXME: is this mutex necessary? */
    4.11  
    4.12 @@ -65,12 +65,12 @@
    4.13  
    4.14      if (_this->stream == NULL) {  /* no conversion necessary. */
    4.15          SDL_LockMutex(_this->mixer_lock);
    4.16 -        callback(_this->spec.userdata, stream, len);
    4.17 +        callback(_this->callbackspec.userdata, stream, len);
    4.18          SDL_UnlockMutex(_this->mixer_lock);
    4.19      } else {  /* streaming/converting */
    4.20          const int stream_len = _this->callbackspec.size;
    4.21          while (SDL_AudioStreamAvailable(_this->stream) < len) {
    4.22 -            callback(_this->spec.userdata, _this->work_buffer, stream_len);
    4.23 +            callback(_this->callbackspec.userdata, _this->work_buffer, stream_len);
    4.24              if (SDL_AudioStreamPut(_this->stream, _this->work_buffer, stream_len) == -1) {
    4.25                  SDL_AudioStreamClear(_this->stream);
    4.26                  SDL_AtomicSet(&_this->enabled, 0);