static void sdl_cleanup_audio(running_machine &machine) { // if nothing to do, don't do it if (machine.sample_rate() == 0) return; // kill the buffers and dsound sdl_kill(machine); sdl_destroy_buffers(); // print out over/underflow stats if (buffer_overflows || buffer_underflows) mame_printf_verbose("Sound buffer: overflows=%d underflows=%d\n", buffer_overflows, buffer_underflows); if (LOG_SOUND) { fprintf(sound_log, "Sound buffer: overflows=%d underflows=%d\n", buffer_overflows, buffer_underflows); fclose(sound_log); } }
void sound_sdl::exit() { // if nothing to do, don't do it if (sample_rate() == 0) return; osd_printf_verbose("sdl_kill: closing audio\n"); SDL_CloseAudio(); SDL_QuitSubSystem(SDL_INIT_AUDIO); // kill the buffers sdl_destroy_buffers(); // print out over/underflow stats if (buffer_overflows || buffer_underflows) osd_printf_verbose("Sound buffer: overflows=%d underflows=%d\n", buffer_overflows, buffer_underflows); if (LOG_SOUND) { fprintf(sound_log, "Sound buffer: overflows=%d underflows=%d\n", buffer_overflows, buffer_underflows); fclose(sound_log); } }