src/audio/haiku/SDL_haikuaudio.cc
changeset 10997 b6315b6bc32f
parent 10768 73dfaab7e779
child 11811 5d94cb6b24d3
     1.1 --- a/src/audio/haiku/SDL_haikuaudio.cc	Tue May 09 03:19:58 2017 -0700
     1.2 +++ b/src/audio/haiku/SDL_haikuaudio.cc	Wed May 10 16:18:43 2017 -0400
     1.3 @@ -48,7 +48,7 @@
     1.4            const media_raw_audio_format & format)
     1.5  {
     1.6      SDL_AudioDevice *audio = (SDL_AudioDevice *) device;
     1.7 -    SDL_AudioCallback callback = audio->spec.callback;
     1.8 +    SDL_AudioCallback callback = audio->callbackspec.callback;
     1.9  
    1.10      /* Only do something if audio is enabled */
    1.11      if (!SDL_AtomicGet(&audio->enabled) || SDL_AtomicGet(&audio->paused)) {
    1.12 @@ -63,13 +63,13 @@
    1.13  
    1.14      if (audio->stream == NULL) {  /* no conversion necessary. */
    1.15          SDL_LockMutex(audio->mixer_lock);
    1.16 -        callback(audio->spec.userdata, (Uint8 *) stream, len);
    1.17 +        callback(audio->callbackspec.userdata, (Uint8 *) stream, len);
    1.18          SDL_UnlockMutex(audio->mixer_lock);
    1.19      } else {  /* streaming/converting */
    1.20          const int stream_len = audio->callbackspec.size;
    1.21          const int ilen = (int) len;
    1.22          while (SDL_AudioStreamAvailable(audio->stream) < ilen) {
    1.23 -            callback(audio->spec.userdata, audio->work_buffer, stream_len);
    1.24 +            callback(audio->callbackspec.userdata, audio->work_buffer, stream_len);
    1.25              if (SDL_AudioStreamPut(audio->stream, audio->work_buffer, stream_len) == -1) {
    1.26                  SDL_AudioStreamClear(audio->stream);
    1.27                  SDL_AtomicSet(&audio->enabled, 0);