static void PULSEAUDIO_CloseDevice(_THIS) { if (this->hidden != NULL) { if (this->hidden->mixbuf != NULL) { SDL_FreeAudioMem(this->hidden->mixbuf); this->hidden->mixbuf = NULL; } if (this->hidden->stream) { PULSEAUDIO_pa_stream_disconnect(this->hidden->stream); PULSEAUDIO_pa_stream_unref(this->hidden->stream); this->hidden->stream = NULL; } if (this->hidden->context != NULL) { PULSEAUDIO_pa_context_disconnect(this->hidden->context); PULSEAUDIO_pa_context_unref(this->hidden->context); this->hidden->context = NULL; } if (this->hidden->mainloop != NULL) { PULSEAUDIO_pa_mainloop_free(this->hidden->mainloop); this->hidden->mainloop = NULL; } SDL_free(this->hidden); this->hidden = NULL; } }
static void PULSEAUDIO_CloseDevice(_THIS) { if (this->hidden != NULL) { SDL_FreeAudioMem(this->hidden->mixbuf); SDL_free(this->hidden->device_name); if (this->hidden->stream) { PULSEAUDIO_pa_stream_disconnect(this->hidden->stream); PULSEAUDIO_pa_stream_unref(this->hidden->stream); } DisconnectFromPulseServer(this->hidden->mainloop, this->hidden->context); SDL_free(this->hidden); this->hidden = NULL; } }
static void PULSEAUDIO_CloseDevice(_THIS) { if (this->hidden->stream) { if (this->hidden->capturebuf != NULL) { PULSEAUDIO_pa_stream_drop(this->hidden->stream); } PULSEAUDIO_pa_stream_disconnect(this->hidden->stream); PULSEAUDIO_pa_stream_unref(this->hidden->stream); } DisconnectFromPulseServer(this->hidden->mainloop, this->hidden->context); SDL_free(this->hidden->mixbuf); SDL_free(this->hidden->device_name); SDL_free(this->hidden); }