diff options
Diffstat (limited to 'src/resources/soundeffect.cpp')
-rw-r--r-- | src/resources/soundeffect.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/resources/soundeffect.cpp b/src/resources/soundeffect.cpp index 5d51ef12..ba0af415 100644 --- a/src/resources/soundeffect.cpp +++ b/src/resources/soundeffect.cpp @@ -31,7 +31,8 @@ SoundEffect::SoundEffect(Mix_Chunk *soundEffect): SoundEffect::~SoundEffect() { - unload(); + Mix_FreeChunk(soundEffect); + soundEffect = NULL; } SoundEffect* SoundEffect::load(void* buffer, unsigned int bufferSize) @@ -48,13 +49,6 @@ SoundEffect* SoundEffect::load(void* buffer, unsigned int bufferSize) return new SoundEffect(tmpSoundEffect); } -void SoundEffect::unload() -{ - Mix_FreeChunk(soundEffect); - soundEffect = NULL; - loaded = false; -} - bool SoundEffect::play(int loops, int volume) { Mix_VolumeChunk(soundEffect, volume); |