Hello,
I noticed in the execution log of our game, when we use the same png twice it is loaded once then the refcount increased (very good thing), but when we use the same wav twice the log message say it is created twice (see extract from our log at the end of this message)
It is the wav really loaded twice in memory? if yes, do exist a quick way to evitate the duplication without to have to rewrite our game scripts to explicitly share sounds?
log: create sound: Audio/select.wav
log: Inserting Menu/Popup/buttons_yes.png to the texture cache. Total memory is 42048 KB.
log: Inserting Menu/Popup/buttons_no.png to the texture cache. Total memory is 42112 KB.
log: create sound: Audio/select.wav
log: Increasing refcount of Menu/Popup/buttons_yes.png. New refcount is 2.
log: Increasing refcount of Menu/Popup/buttons_no.png. New refcount is 2.
Comments
Could this be due to the fact that if you try and play a sound again whilst it's already playing then things might get messed up?
If that is the case then you might need to load multiple copies of any sounds you intend to play that might be triggered at the same time.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
This issue is on the roadmap http://bugs.giderosmobile.com/issues/71 and I'll implement reference counting for Sounds.