Game Development Community

SFX::assignVoices () showing up at 21% on profiler.

by Stefan Lundmark · in Torque Game Engine Advanced · 10/29/2008 (12:45 pm) · 9 replies

SFX::assignVoices () is showing up at 21% on our profiling tests. Testing the now released demo of the TGEA FPS Environment Pack, I get the same results. We tested it because we had jumping framerates and stuttering sound performance.

Using FMOD (not trough the SFX layer, though) I get a measily 1% CPU time hit and that's for all three threads.
I understand I can't compare SFX to FMOD, and I don't. But 21% is a lot.

Has this been looked at before? I'm intending to take a look when I'm less busy, whenever that might be.

#1
10/30/2008 (4:42 pm)
21% is alot... how many sound sources do you have in the scene?

You can do metrics( sfx ) in the console to see whats going on.
#2
10/30/2008 (5:16 pm)
Stefan,

Did you profile this in stock TGEA?

I would be very interested in the results.

I did encounter some nasty hitches related to sounds. Also could not get their variability to work in TGEA so the sounds that are set to repeat, do so at a constant rate ...which is pretty ugly.
#3
10/31/2008 (6:23 am)
Quote:
21% is alot... how many sound sources do you have in the scene?

There's no constant slowdown, really. But when I move around, I get bursty FPS (from 255ish to 30ish) and pauses of upto 1 second or so, as (I guess) new emitters come into place and others get culled. I'm assuming this can't be related to my Creative XFI card, since we're running in software? On my laptop (recently bought, no state of the art stuff though) it's not even possible to walk around because it's so choppy. Disabling sound lessens this effect.

Anyway, here's the stats:

Sources: 52
Playing: 52
Culled: 49
Voices: 4

Intel Core 2 Duo 6600 (2.40 GHz)
2 Gig's of RAM
Latest Video/Sound drivers from Nvidia and Creative. Tried older ones from Creative as well.

Quote:
Did you profile this in stock TGEA?

Now that you mention it, yeah. Tried some tests in Stronghold, too. That wasn't too bad, but there was a noticable slowdown compared to TGEA 1.03 but its nothing huge. I assumed it had to do with the new mission.
#4
10/31/2008 (8:46 am)
Stefan,

OK, good info.

That is about what I thought. TGEA 1.7.1 (could be true in other versions as well, don't know) did not handle culling and loading of new sounds well at all.

As previously mentioned, I could also not get it to regulate how often it played a repeating sound, as was an option in TGE. So the repeating sounds are hammering away constantly without pause, not sure how big of an impact that is having on what you are experiencing. And I should add a disclaimer here that there may in fact be that functionality in 1.7.1 but if it is there, I could not make work.

Ultimately, I dropped a number sound instances that were causing a noticeable pop on my PC and that of Andy Maloney who was providing most of the code support on the TGEA version of the pack. The version that shipped did occasionally show a very small hitch in a couple of spots as sounds loaded and culled, but nothing like you are describing.

My specs are comparable to yours except for the a different video card.

Intel core 2 Duo 6600 2.40GHz
2.0 GB of ram
Nvidia 8600 gts video card

You said that you "Disabling sound lessens this effect"? I assume that was through the options menu? If so, I wander if it is still loading the sounds of something, even though it is not playing them.

You are the first to bring up this issue with the TGEA version of the pack. I am guessing it is party being magnified due to running on a lap top, but i could be wrong about that.
#5
10/31/2008 (10:13 am)
@Stefan - Which SFX provider are you using? Also do you happen to be on Vista?
#6
10/31/2008 (10:14 am)
@Todd
Quote:As previously mentioned, I could also not get it to regulate how often it played a repeating sound
In what way were you trying to do this? Via SFXAudioEmitter?
#7
10/31/2008 (10:19 am)
Tom,

Min and max loop gap in the Emitter for TGE. Could not get the same functionality in TGEA. But as mentioned, I could be doing it wrong in TGEA.
#8
10/31/2008 (11:45 am)
Quote:
You said that you "Disabling sound lessens this effect"? I assume that was through the options menu? If so, I wander if it is still loading the sounds of something, even though it is not playing them.

I blanked out the Audio Provider field in prefs.cs. Should be the same as setting the provider to NULL via options, I believe. If I disable sounds this way, there is no visible pause at all anymore.

Quote:
You are the first to bring up this issue with the TGEA version of the pack. I am guessing it is party being magnified due to running on a lap top, but i could be wrong about that.

I don't expect my laptop to run it very well, but the tests above are on my workstation (The one not too unlike yours) which I do expect to run this flawlessly. Interesting how no one else has mentioned this as a problem, I'll test it further on another computer when I find the time. Maybe there's something fudgy going on there, can't gaurantee nothing else is interfearing. (Edit: As in outside TGEA. TGEA in the tests are stock)

Quote:
@Stefan - Which SFX provider are you using? Also do you happen to be on Vista?

OpenAL, though DirectSound shows the same issues. Tests on my workstation were done in Windows XP, and on my laptop in Vista Home.

-Thanks a lot for the information, guys.
#9
10/31/2008 (11:57 am)
Really strange that you are getting this sort of hit on you work station.

There is definitely a sound issues, but if its crippling your performance, then something is not right.

The worst I see on my system is when I launch the demo and walk down to the foot bridge. At that point a number of sound emitters are coming into range and others are go out.

I originally had a pretty obvious hitch there, but removed a number of emitters and the hitch became almost unnoticeable.