Memory Release
SlickZero
Houston, TexasMember, Sous Chef Posts: 2,870
So spawning and destroying actors locks up the memory on the device. Is there any other functions that lock up memory as well, or is it just the spawn/destroy?
And does anybody know if the memory gets released when you change scenes, or if you reset the scene, or is it locked up until you stop the game?
And does anybody know if the memory gets released when you change scenes, or if you reset the scene, or is it locked up until you stop the game?
Comments
Cheers,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
A little while ago I've made an instrument which offers two sound choices. This is done via a scene change and I am not happy with how it performs.
My samples are small and I reuse quite a few by altering the pitch so that I don't need 14 individual ogg files in memory.
The problem is that when I change the sound, I have to briefly touch each button once to get rid of the noticeable lag which occurs the first time I touch each and every key.
The lag is around 500 milliseconds and happens on the whole keyboard.
If there was a way to do this with GS, I'd save a lot of time because right now, the only solution I see is to script it as I still want to add more features down the road.
Is there a way to force a scene change AND empty the memory at the same time?
Even if it takes a tad longer to load, I'd prefer to wait a few more seconds instead of messin' with the keys.
Have an actor in the scene that plays ALL your sounds in one hit as soon as the scene starts....but at 0 volume.
That way, they will already have been played that first time, and the lag "should" not be there.
I've used this technique a few times, and it's worked for me.
Pitch change will always result in timing changes as well unless time compression/expansion is also incorporated. I expect the pitch shifting being used by GS is pretty basic, better methods require a lot more grunt/cpu.
Also, shifting the pitch up and down a few semi tones does not produce a noticeable effect because it is only a few milliseconds that get added if you shift down and the other way, it would have the reverse effect (shortening the silence should there be any in the first place).