src/audio/SDL_audio.c
changeset 3096 ae4e80dbe330
parent 3040 62d4992e5a92
child 3099 82e60908fab1
     1.1 --- a/src/audio/SDL_audio.c	Mon Mar 23 02:02:30 2009 +0000
     1.2 +++ b/src/audio/SDL_audio.c	Mon Mar 23 05:21:40 2009 +0000
     1.3 @@ -472,16 +472,12 @@
     1.4                  SDL_StreamRead(&device->streamer, stream, stream_len);
     1.5  
     1.6                  /* Ready current buffer for play and change current buffer */
     1.7 -                if (stream != device->fake_stream) {
     1.8 +                if (stream != device->fake_stream && !device->paused) {
     1.9                      current_audio.impl.PlayDevice(device);
    1.10 -                }
    1.11 -
    1.12 -                /* Wait for an audio buffer to become available */
    1.13 -                if (stream == device->fake_stream) {
    1.14 -                    SDL_Delay((device->spec.samples * 1000) /
    1.15 -                              device->spec.freq);
    1.16 +                    /* Wait for an audio buffer to become available */
    1.17 +                    current_audio.impl.WaitDevice(device);
    1.18                  } else {
    1.19 -                    current_audio.impl.WaitDevice(device);
    1.20 +                    SDL_Delay((device->spec.samples * 1000) / device->spec.freq);
    1.21                  }
    1.22              }
    1.23  
    1.24 @@ -524,15 +520,12 @@
    1.25              }
    1.26  
    1.27              /* Ready current buffer for play and change current buffer */
    1.28 -            if (stream != device->fake_stream) {
    1.29 +            if (stream != device->fake_stream && !device->paused) {
    1.30                  current_audio.impl.PlayDevice(device);
    1.31 -            }
    1.32 -
    1.33 -            /* Wait for an audio buffer to become available */
    1.34 -            if (stream == device->fake_stream) {
    1.35 -                SDL_Delay((device->spec.samples * 1000) / device->spec.freq);
    1.36 +                /* Wait for an audio buffer to become available */
    1.37 +                current_audio.impl.WaitDevice(device);
    1.38              } else {
    1.39 -                current_audio.impl.WaitDevice(device);
    1.40 +            	SDL_Delay((device->spec.samples * 1000) / device->spec.freq);
    1.41              }
    1.42          }
    1.43      }