summaryrefslogtreecommitdiff
path: root/src/resources/soundeffect.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-06-23 23:33:34 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-06-23 23:33:34 +0000
commit4b0172d1f666a12cffbdd6bd331e95a92d8f652f (patch)
treedde7ab71fd5d02200be35e041b00e5649f9cd3a8 /src/resources/soundeffect.cpp
parent33587089cf7d87bbc2104e80746fdddc7a5498e1 (diff)
downloadmana-client-4b0172d1f666a12cffbdd6bd331e95a92d8f652f.tar.gz
mana-client-4b0172d1f666a12cffbdd6bd331e95a92d8f652f.tar.bz2
mana-client-4b0172d1f666a12cffbdd6bd331e95a92d8f652f.tar.xz
mana-client-4b0172d1f666a12cffbdd6bd331e95a92d8f652f.zip
Finishing resource manager ability to clean up resources. Still work to do on
resources other than images.
Diffstat (limited to 'src/resources/soundeffect.cpp')
-rw-r--r--src/resources/soundeffect.cpp10
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);