74 |
void |
void |
75 |
sound::ClearSoundCache() |
sound::ClearSoundCache() |
76 |
{ |
{ |
77 |
|
for (px::Dict<Mix_Chunk*>::iterator it = wav_cache.begin(); it != wav_cache.end(); ++it) |
78 |
|
Mix_FreeChunk(it->second); |
79 |
wav_cache.clear(); |
wav_cache.clear(); |
80 |
} |
} |
81 |
|
|
95 |
sound::Shutdown() |
sound::Shutdown() |
96 |
{ |
{ |
97 |
if (sound_initialized) { |
if (sound_initialized) { |
98 |
|
ClearSoundCache(); |
99 |
Mix_FreeMusic(current_music); |
Mix_FreeMusic(current_music); |
100 |
Mix_CloseAudio(); |
Mix_CloseAudio(); |
101 |
sound_initialized = false; |
sound_initialized = false; |