Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
We have encountered a very problematic issue in Irrklang where sounds start ticking with a really ugly noise when played back at certain speeds. It sounds like this: Recording of the bug: http://www.ronimo-games.com/Irrk... As you can probably imagine, hearing this ticking noise often makes for a horrible game experience. It only happens at certain playback speeds. For example, if we set the sample below to play at this specific speed, then it always happens. We have tried this on various computers, even with various windows versions, and it always happened with this specific sample at this specific speed. setPlaybackSpeed(1.21326f); Sample used for bug reproduction: http://www.ronimo-games.com/Irrk... Are we doing something wrong, or is this a bug in Irrklang itself? Is there a workaround besides not using setPlaybackSpeed? Thanks in advance! :) |
||||
|
Hm, interesting. You might be able to fix it by trying to save it (re-encode it) using some different settings, like adjusting the sample rate, or even the PCM format. I think this effect might be caused by the resampling filter in irrKlang, causing this side effect with this playback speed. Also, try if the effect is different when using irrKlang with WinMM instead of DirectSound, they use different filters for this. |
||||
|
(I took over from oogst) Changing the device to a DirectSound device fixed the ticking sounds. I haven't tried your other suggestions since this seems to fix our problems. However, if our game is unable to create a DirectSound device, it will revert to creating a WinMM device. So in that case (probably very rarely) the bug still exists. Is this an issue with irrklang or just with WinMM? |
||||
|
It's how the resampling in WinMM is implemented in irrKlang. Try setting another playback speed, and the effect will probably go away. |
||||
|
Is there some kind of formula we can use to predict which playback speeds will cause problems? |
||||
|
No, sorry. This depends entirely on the content of the sound file. |
||||
|
Same problem here. I found out that it's best to set the engine to "automatic": createIrrKlangDevice( ESOD_AUTO_DETECT, ... Playing around with the many additional parameters only made things worse. I think you only need them, if automatic does NOT work, hehe. |
||||
|
A little update on this: we have experimented with using something else than WinMM, but this gave significant issues for some users, so we went back to WinMM. After some experimentation we discovered that for files with the exact same file format the ticking always happens at the same frequencies. So as long as samplerate/bitrate/etc remain the same we know exactly which frequencies will sound bad. It remains the same with different sounds and on different computers. Based on these experiments we have made a list of playbackSpeeds that sound good and simply translate all playbackSpeeds to the nearest one that we know sounds good. This change is not live yet, but it seems like a fine workaround for us. |
|