Code: Select all
sp = Sfx->play2D(music);
This problem is affected to mesh file. When I load my level on the scene and change map (delete old scene) the memory usage doesn't decrease. Also AVI file when I play it for second time and memory usage is rising up! Am I do anything wrong with those pointer ?
This problem occur even in IrrKlang Example itself.
This is my full class of sound effect.
Code: Select all
class SoundEffect
{
public:
ISoundSource* music;
ISound* sp;
bool is_stop;
char *files;
float Volume;
// Set Sound
void Load(char file[50]){
files=file;
music = Sfx->getSoundSource(file);
Volume=1.0f;
}
void Del(){
sp->stop();
}
// Stop Sound All
void Stop(){
Sfx->stopAllSounds();
}
// Play Sound
void Play(){
sp = Sfx->play2D(music);
Sfx->setSoundVolume(Volume);
}
// Set Volume take 0-100
void SetVol(int rate){
Volume=rate/100;
}
};
fx1.load(somefile);
fx1.play();
fx1.del()
????