Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
Sound ticks at certain playbackspeeds

oogst
Registered User
Quote
2014-04-09 18:12:28

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! :)


niko
Moderator
Quote
2014-04-10 07:50:30

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.


mvhooren
Registered User
Quote
2014-06-02 16:02:21

(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?


niko
Moderator
Quote
2014-06-02 18:58:36

It's how the resampling in WinMM is implemented in irrKlang. Try setting another playback speed, and the effect will probably go away.


mvhooren
Registered User
Quote
2014-06-04 11:31:13

Is there some kind of formula we can use to predict which playback speeds will cause problems?


niko
Moderator
Quote
2014-06-04 19:49:17

No, sorry. This depends entirely on the content of the sound file.


areichl
Guest
Quote
2014-06-13 18:07:38

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.


oogst
Registered User
Quote
2014-11-03 15:40:37

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.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Int?rnational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact