src/audio/SDL_audio.c
changeset 9031 e963a13a720c
parent 9012 aa058c87737b
child 9032 36c472422d64
     1.1 --- a/src/audio/SDL_audio.c	Wed Jul 30 09:54:01 2014 -0400
     1.2 +++ b/src/audio/SDL_audio.c	Wed Jul 30 11:08:31 2014 -0400
     1.3 @@ -178,6 +178,12 @@
     1.4  {                               /* no-op. */
     1.5  }
     1.6  
     1.7 +static int
     1.8 +SDL_AudioGetPendingBytes_Default(_THIS)
     1.9 +{
    1.10 +    return 0;
    1.11 +}
    1.12 +
    1.13  static Uint8 *
    1.14  SDL_AudioGetDeviceBuf_Default(_THIS)
    1.15  {
    1.16 @@ -253,6 +259,7 @@
    1.17      FILL_STUB(ThreadInit);
    1.18      FILL_STUB(WaitDevice);
    1.19      FILL_STUB(PlayDevice);
    1.20 +    FILL_STUB(GetPendingBytes);
    1.21      FILL_STUB(GetDeviceBuf);
    1.22      FILL_STUB(WaitDone);
    1.23      FILL_STUB(CloseDevice);
    1.24 @@ -471,7 +478,7 @@
    1.25      SDL_AudioDevice *device = get_audio_device(devid);
    1.26      if (device) {
    1.27          current_audio.impl.LockDevice(device);
    1.28 -        retval = device->queued_bytes;
    1.29 +        retval = device->queued_bytes + current_audio.impl.GetPendingBytes(device);
    1.30          current_audio.impl.UnlockDevice(device);
    1.31      }
    1.32