openplanet-nl / issues

Issue tracker for Openplanet.
10 stars 0 forks source link

Audio buzzing after spamming playing a ding #418

Closed XertroV closed 6 months ago

XertroV commented 8 months ago

I was testing a ding for a timer plugin and spammed the "play ding" button a bunch. I then got an annoying buzzing. reloading the plugin didn't fix. reducing Gain under openplanet audio settings did affect it. game volume did not. required restarting TM to get rid of it.

timers-1705198503.zip

codecat commented 6 months ago

This is because you are loading the sample with streaming enabled, which only supports a single voice. I have fixed this problem by not playing any new voices for streamed samples when there is already a voice. If you want to play a single sample with multiple voices, you should keep the sample in memory instead of streaming it. (eg. pass false to the second parameter of Audio::LoadSample)