comparison src/audio/SDL_audio.c @ 3787:8d74a4721ca9 SDL-ryan-multiple-audio-device

Added deinitialize hook.
author Ryan C. Gordon <icculus@icculus.org>
date Tue, 03 Oct 2006 16:26:42 +0000
parents b70f4e9291bb
children 7006b176ef4f
comparison
equal deleted inserted replaced
3786:b70f4e9291bb 3787:8d74a4721ca9
440 440
441 if (!current_audio.impl.LockAudio && !current_audio.impl.UnlockAudio) { 441 if (!current_audio.impl.LockAudio && !current_audio.impl.UnlockAudio) {
442 current_audio.impl.LockAudio = SDL_LockAudio_Default; 442 current_audio.impl.LockAudio = SDL_LockAudio_Default;
443 current_audio.impl.UnlockAudio = SDL_UnlockAudio_Default; 443 current_audio.impl.UnlockAudio = SDL_UnlockAudio_Default;
444 } 444 }
445
445 return (0); 446 return (0);
446 } 447 }
447 448
448 /* 449 /*
449 * Get the current audio driver name 450 * Get the current audio driver name
849 { 850 {
850 SDL_AudioDeviceID i; 851 SDL_AudioDeviceID i;
851 for (i = 0; i < SDL_arraysize(open_devices); i++) { 852 for (i = 0; i < SDL_arraysize(open_devices); i++) {
852 SDL_CloseAudioDevice(i); 853 SDL_CloseAudioDevice(i);
853 } 854 }
855
854 /* Free the driver data */ 856 /* Free the driver data */
855 857 current_audio.Deinitialize();
856 /* !!! FIXME! current_audio.free(&current_audio); */
857 SDL_memset(&current_audio, '\0', sizeof (current_audio)); 858 SDL_memset(&current_audio, '\0', sizeof (current_audio));
858 SDL_memset(open_devices, '\0', sizeof (open_devices)); 859 SDL_memset(open_devices, '\0', sizeof (open_devices));
859 } 860 }
860 861
861 #define NUM_FORMATS 10 862 #define NUM_FORMATS 10