static void pcmout_sdl_exit(sfx_pcm_device_t *self) { SDL_PauseAudio (1); SDL_CloseAudio(); sfx_audbuf_free(&audio_buffer); }
static void pcmout_sdl_exit(sfx_pcm_device_t *self) { SDL_PauseAudio (1); SDL_CloseAudio(); sfx_audbuf_free(&audio_buffer); SDL_QuitSubSystem(SDL_INIT_AUDIO); if (!SDL_WasInit(SDL_INIT_EVERYTHING)) { sciprintf("[SND:SDL] No active SDL subsystems found.. shutting down SDL\n"); SDL_Quit(); } }
static void pcmout_alsa_exit(sfx_pcm_device_t *self) { int err; run_thread = 0; sciprintf("[SND:ALSA] Waiting for PCM thread to exit... "); if (!pthread_join(thread, NULL)) sciprintf("OK\n"); else sciprintf("Failed\n"); pthread_mutex_destroy(&mutex); if ((err = snd_pcm_drop(handle)) < 0) { sciprintf("[SND:ALSA] Can't stop PCM device: %s\n", snd_strerror(err)); } if ((err = snd_pcm_close(handle)) < 0) { sciprintf("[SND:ALSA] Can't close PCM device: %s\n", snd_strerror(err)); } sfx_audbuf_free(&audio_buffer); }