static void AndroidAUD_CloseDevice(_THIS) { if (this->hidden != NULL) { SDL_free(this->hidden); this->hidden = NULL; } Android_JNI_CloseAudioDevice(); if (audioDevice == this) { audioDevice = NULL; } }
static void ANDROIDAUDIO_CloseDevice(_THIS) { /* At this point SDL_CloseAudioDevice via close_audio_device took care of terminating the audio thread so it's safe to terminate the Java side buffer and AudioTrack */ Android_JNI_CloseAudioDevice(this->iscapture); if (this->iscapture) { SDL_assert(captureDevice == this); captureDevice = NULL; } else { SDL_assert(audioDevice == this); audioDevice = NULL; } SDL_free(this->hidden); }
static void AndroidAUD_CloseDevice(_THIS) { /* At this point SDL_CloseAudioDevice via close_audio_device took care of terminating the audio thread so it's safe to terminate the Java side buffer and AudioTrack */ Android_JNI_CloseAudioDevice(); if (audioDevice == this) { if (audioDevice->hidden != NULL) { SDL_free(this->hidden); this->hidden = NULL; } audioDevice = NULL; } }