how can release or destory sounds?
See original GitHub issuehi.
thanks for developing SoundJS.
We are developing mmorpg with sound.js. I know how can we release loaded mp3 by calling instance.destroy()
but i gave error… i don’t know correct reason yet…
i wanna know how release sounds after registerSound, when every using done…
thx
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
The Sound of Destruction | News | College of Engineering
“Under certain conditions, sound waves cause the formation of small bubbles that rapidly implode and release an intense shock wave that ...
Read more >Can sound or silence be used to kill? - The Washington Post
Sound is not a practical way to kill someone. You can make a loud sound, but it gets lost in the air. If...
Read more >Attack, decay, sustain, and release - Apple Support
Release: Sets the time it takes for the sound to decay from the sustain level to an amplitude of 0 when the key...
Read more >destroy object and play sound? - Unity Answers
You play the sound using an audio source, and you destroy the object holding the audio source. You have multiple solutions : Do...
Read more >Can a sound wave kill you? - Science | HowStuffWorks
A key factor here is that you'd be in an enclosed space. Outside, sound waves disperse and dissipate too quickly to reach lethal...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The suggested solution only partly solves the problem. SoundInstance.destroy() does remove references to objects within the sound instance, but not the reference to the SoundInstance itself, which is kept in AbstractPlugin._soundInstances. When you have an event sound which is played often, for instance associated with a button, references keep piling up. Sound.removeSound(src) does remove references to SoundInstance instances, but removing/unloading the source sound is often not desired, as is the case with the button sound.
A bit of a hacky way (because it accesses the ‘private’ property _soundInstances of the plugin) to remove the references is:
(You still also have to call
soundInstance.destroy()
though.)@lannymcnie thx…
i hope it will be fixed asap
thx…