- Added support for FMOD Ex 4.25.01+, which added a geometry parameter to getCPUUsage().

SVN r1710 (trunk)
This commit is contained in:
Randy Heit 2009-07-06 03:51:43 +00:00
commit 17418316ea
2 changed files with 13 additions and 4 deletions

View file

@ -1279,19 +1279,24 @@ void FMODSoundRenderer::PrintDriversList()
FString FMODSoundRenderer::GatherStats()
{
int channels;
float dsp, stream, update, total;
float dsp, stream, update, geometry, total;
FString out;
channels = 0;
total = update = stream = dsp = 0;
total = update = geometry = stream = dsp = 0;
Sys->getChannelsPlaying(&channels);
Sys->getCPUUsage(&dsp, &stream, &update, &total);
Sys->getCPUUsage(&dsp, &stream,
#if FMOD_VERSION >= 0x42501
&geometry,
#endif
&update, &total);
out.Format ("%d channels,"TEXTCOLOR_YELLOW"%5.2f"TEXTCOLOR_NORMAL"%% CPU "
"(DSP:"TEXTCOLOR_YELLOW"%2.2f"TEXTCOLOR_NORMAL"%% "
"Stream:"TEXTCOLOR_YELLOW"%2.2f"TEXTCOLOR_NORMAL"%% "
"Geometry:"TEXTCOLOR_YELLOW"%2.2f"TEXTCOLOR_NORMAL"%% "
"Update:"TEXTCOLOR_YELLOW"%2.2f"TEXTCOLOR_NORMAL"%%)",
channels, total, dsp, stream, update);
channels, total, dsp, stream, geometry, update);
return out;
}