src/audio/SDL_audio.c
changeset 7719 31b5f9ff36ca
parent 7678 286c42d7c5ed
child 7904 915b9b6c9fa0
equal deleted inserted replaced
7718:213b9777e988 7719:31b5f9ff36ca
   298 
   298 
   299 /* Deinitialize the stream simply by freeing the buffer */
   299 /* Deinitialize the stream simply by freeing the buffer */
   300 static void
   300 static void
   301 SDL_StreamDeinit(SDL_AudioStreamer * stream)
   301 SDL_StreamDeinit(SDL_AudioStreamer * stream)
   302 {
   302 {
   303     if (stream->buffer != NULL) {
   303     SDL_free(stream->buffer);
   304         SDL_free(stream->buffer);
       
   305     }
       
   306 }
   304 }
   307 
   305 
   308 #if defined(ANDROID)
   306 #if defined(ANDROID)
   309 #include <android/log.h>
   307 #include <android/log.h>
   310 #endif
   308 #endif
   630         while (i--) {
   628         while (i--) {
   631             SDL_free((*devices)[i]);
   629             SDL_free((*devices)[i]);
   632         }
   630         }
   633     }
   631     }
   634 
   632 
   635     if (*devices != NULL) {
   633     SDL_free(*devices);
   636         SDL_free(*devices);
       
   637     }
       
   638 
   634 
   639     *devices = NULL;
   635     *devices = NULL;
   640     *devCount = 0;
   636     *devCount = 0;
   641 }
   637 }
   642 
   638 
   759         SDL_WaitThread(device->thread, NULL);
   755         SDL_WaitThread(device->thread, NULL);
   760     }
   756     }
   761     if (device->mixer_lock != NULL) {
   757     if (device->mixer_lock != NULL) {
   762         SDL_DestroyMutex(device->mixer_lock);
   758         SDL_DestroyMutex(device->mixer_lock);
   763     }
   759     }
   764     if (device->fake_stream != NULL) {
   760     SDL_FreeAudioMem(device->fake_stream);
   765         SDL_FreeAudioMem(device->fake_stream);
       
   766     }
       
   767     if (device->convert.needed) {
   761     if (device->convert.needed) {
   768         SDL_FreeAudioMem(device->convert.buf);
   762         SDL_FreeAudioMem(device->convert.buf);
   769     }
   763     }
   770     if (device->opened) {
   764     if (device->opened) {
   771         current_audio.impl.CloseDevice(device);
   765         current_audio.impl.CloseDevice(device);