How can I see the performance impacts of audio effects?

Discussion and feedback on Construct 2

Post » Sat Jun 27, 2015 2:49 am

Hey all,

I'm experimenting with audio effects like convolution. However, I've read that effects like this are often quite costly performance-wise.

Is there a good way to measure or just get an indication of how expensive certain convolutions are, when applied to every sound effect in the game?

Thanks!
Daniel
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Sat Jun 27, 2015 3:18 am

My understanding of the audio system is that each 'tag' has its own effects chain, thus making each tag a separate 'track', so to speak.

So, if you ganged together most of your sfx under a single tag "sfx", even an expensive effect like convolution should be pretty cheap.

FYI, audio effects are generally very efficient, and run in a separate thread from the main game, so they shouldn't really cause slowdown. Convolution is probably the heaviest effect in WebAudio outside of a really high rez fft; most everything else would barely register unless you are targeting mobile.

IIRC, the length of the convolution impulse sample will determine the cost of the effect; longer sample, more cpu.

Slightly OT: Oh, and don't use the Doppler effect; it's been depreciated: https://groups.google.com/a/chromium.or ... 1SI1GoHYO8
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202

Post » Sat Jun 27, 2015 5:14 am

@TiAm thanks!

It's not really practical for me to have all sfx under one tag since I need to do dynamic volume stuff in a few places.

It's nice to hear that they are processed in another thread - I guess that means I don't really need to worry? I'm not targeting mobile.
B
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

Post » Sat Jun 27, 2015 6:52 pm

@sqiddster

Yes, you probably don't need to worry, should be able to get away with quite a few 'tags'.

However, I'd recommend doing some experiments in lieu of speculation, because I haven't used WebAudio convolution myself. I'm simply projecting from my knowledge of how the effect works in a daw environment, and my experiments with other aspects of WebAudio. It's generally very fast and efficient, comparable to native audio processing.
Don't lose your work. Backup your game with Dropbox.
B
44
S
10
G
10
Posts: 1,106
Reputation: 9,202


Return to Construct 2 General

Who is online

Users browsing this forum: tomkuk and 5 guests