H
Holy Moly
Guest
I have set 3d sounds to some bullets in my game, so the sound has falloff and changes it's speaker orientation depending on the listener (player) position. Those bullets make a sound as they travel. At this point, the 3d sound works perfectly.
However, when a bullet is destroyed, I want it to a make a different sound with the same falloff and sound orientation properties. The problem is that if I don't free each bullet's emitter on destroy event, it will result on a memory leack; and freeing a bullet's emitter seems to not be allowing me to play the "bullet destroy sound effect". I had thought on freeing the bullet's emitters on room end, but if the bullet spawner makes too many bullets before room end, it will also result on a memory leack.
Is there a way to don't stop an object's last emitted sound after that emitter was freed?
However, when a bullet is destroyed, I want it to a make a different sound with the same falloff and sound orientation properties. The problem is that if I don't free each bullet's emitter on destroy event, it will result on a memory leack; and freeing a bullet's emitter seems to not be allowing me to play the "bullet destroy sound effect". I had thought on freeing the bullet's emitters on room end, but if the bullet spawner makes too many bullets before room end, it will also result on a memory leack.
Is there a way to don't stop an object's last emitted sound after that emitter was freed?