mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 16:51:31 +00:00
- Added support for FMOD Ex 4.25.01+, which added a geometry parameter to getCPUUsage().
SVN r1710 (trunk)
This commit is contained in:
parent
33249ff833
commit
17418316ea
2 changed files with 13 additions and 4 deletions
|
@ -131,7 +131,11 @@ namespace FMOD
|
|||
FMOD_RESULT getOutputHandle (void **handle) { return FMOD_System_GetOutputHandle(this, handle); }
|
||||
FMOD_RESULT getChannelsPlaying (int *channels) { return FMOD_System_GetChannelsPlaying(this, channels); }
|
||||
FMOD_RESULT getHardwareChannels (int *num2d, int *num3d, int *total) { return FMOD_System_GetHardwareChannels(this, num2d, num3d, total); }
|
||||
#if FMOD_VERSION < 0x42501
|
||||
FMOD_RESULT getCPUUsage (float *dsp, float *stream, float *update, float *total) { return FMOD_System_GetCPUUsage(this, dsp, stream, update, total); }
|
||||
#else
|
||||
FMOD_RESULT getCPUUsage (float *dsp, float *stream, float *geometry, float *update, float *total) { return FMOD_System_GetCPUUsage(this, dsp, stream, geometry, update, total); }
|
||||
#endif
|
||||
FMOD_RESULT getSoundRAM (int *currentalloced, int *maxalloced, int *total) { return FMOD_System_GetSoundRAM(this, currentalloced, maxalloced, total); }
|
||||
FMOD_RESULT getNumCDROMDrives (int *numdrives) { return FMOD_System_GetNumCDROMDrives(this, numdrives); }
|
||||
FMOD_RESULT getCDROMDriveName (int drive, char *drivename, int drivenamelen, char *scsiname, int scsinamelen, char *devicename, int devicenamelen) { return FMOD_System_GetCDROMDriveName(this, drive, drivename, drivenamelen, scsiname, scsinamelen, devicename, devicenamelen); }
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue