Clearing audio cache in ios
I have an ios app that's written with cocos2d, and uses SimpleAudioEngine
for playing audio.
When playing/preloading a sound using:
[[SimpleAudioEngine sharedEngine] preloadEffect:@"x.mp3"];
[[SimpleAudioEngine sharedEngine] playEffect:@"x.mp3"];
The sound effect is loaded to the memory (or some audio cache).
My questions regarding this issue are:
What are the best practices for clearing this audio cache, after it is
done playing?
Are there any important anecdotes to keep in mind when implementing it?
Can not clearing the sound cache cause memory leaks/issues, other than the
memory used to load the sound when played (for example if it can be loaded
more than once etc.)?
Is it something worth my time?
What do you do, in your experience, to handle this issue?
No comments:
Post a Comment