0
0

hello,

i am apart of a team creating a multi-threaded demo, and on this demo we are measuring how much of the CPU(s) each subsystem is taking. i am curious if there is a way or method to hook into FMOD and capture this information.

thanks.

  • You must to post comments
0
0

Would this be sufficient?
[code:1z8qdsok]system->getCPUUsage(0, 0, 0, &CPUusage)[/code:1z8qdsok]

  • You must to post comments
0
0

Thanks Peter, it looks like that will work.

One quick question though. getCPUUsage will return the total CPU utilization FMOD is using across all cores, correct (on multicore CPUs)?

  • You must to post comments
0
0

Each item there represents a thread.

stream = stream thread
dsp = software mixer thread
update = main thread
total = all added together.

We dont control what threads go on what cpu so you can see with 3 threads there might be 1 or 3 cpus involved.

  • You must to post comments
0
0

If you’re doing this on the PC you might as well try Intel’s vTune (30 day trial) and AMD’s equivalent (free?)

  • You must to post comments
0
0

Empirical observation indicates getCPUUsage values are percentage of one hardware thread. On a quad-core PC, 50% means 1/8 of the total machine capability.

Could someone from Firelight confirm or refute this?

  • You must to post comments
0
0

No because fmod doesnt specify which cpu a thread goes on. 2 threads may be on the same cpu so you can’t just say that one fmod cpu usage value will be a percentage of one cpu.

  • You must to post comments
0
0

hi brett,

thanks for the fast responses.

if total = stream + dsp + update, and if stream, dsp, and update are all between 0 and 100f, then how come total is limited to 100f? the documentation states that all 4 numbers are between 0 and 100f.

keeping total between 0 and 100f only works in a single core case, or if all three threads are on the same core… on any multicore CPU w/ any one of the three threads moving to a different core, total will no longer be accurate.

in the extreme case that all 3 threads are on seperate cores and all utilize 100% of the cpu, then we’d have a total of 300. or is total smarter than simply a sum?

thanks brett.

  • You must to post comments
0
0

Total is the sum. If you dont want it, don’t use it.

  • You must to post comments
0
0

I try to test FMOD on real ASIO device on Windows. The device is EMU Trecker Pre/USB.

The problem is that DSP CPU in GetCPUUsage is ZERO on ASIO API. But I add three DSP effect with 40% cpu load in Windows Task Manager.

FMOD with DirectSound API shows DSP at 40%.

I found another intersting thing. The amount of CPU usage in FMOD can be more than 100%. And you here cracks of sound in that time. I get temporary 120% cpu usage with sound cracks. So if usage is more than 100% you get crack.

Am I right?

  • You must to post comments
Showing 9 results
Your Answer

Please first to submit.