//
// FMODAudioEngine::getFMODStatus from 0x2ff440 to 0x2ff608 (456 bytes)
//
// 1 xrefs:
// > MoreOptionsLayer::onFMODDebug @ 0x421e50
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
FMODAudioEngine *__fastcall FMODAudioEngine::getFMODStatus(FMODAudioEngine *this, int a2)
{
cocos2d::CCString *v4; // r0
char *CString; // r0
const char *v6; // r1
cocos2d::CCString *v7; // r0
char *v8; // r0
float v9; // s16
const char *v10; // r1
cocos2d::CCString *v11; // r0
char *v12; // r0
const char *v13; // r1
cocos2d::CCString *v14; // r0
char *v15; // r0
const char *v16; // r1
cocos2d::CCString *v17; // r0
char *v18; // r0
cocos2d::CCString *v19; // r0
char *v20; // r0
FMOD::System *v21; // r0
cocos2d::CCString *v22; // r0
char *v23; // r0
char *v25; // [sp+2Ch] [bp-28h]
unsigned int v26; // [sp+34h] [bp-20h] BYREF
int v27; // [sp+38h] [bp-1Ch] BYREF
int v28; // [sp+3Ch] [bp-18h] BYREF
const char *v29; // [sp+40h] [bp-14h] BYREF
int v30; // [sp+44h] [bp-10h] BYREF
int v31; // [sp+48h] [bp-Ch] BYREF
char *v32; // [sp+4Ch] [bp-8h] BYREF
unsigned int v33[7]; // [sp+50h] [bp-4h] BYREF
sub_776584((int)this, (char *)&unk_939830);
FMOD_Memory_GetStats();
v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Memory: %i, Max: %i", v25);
CString = (char *)cocos2d::CCString::getCString(v4);
sub_7753D4((int)this, CString);
FMOD::System::getCPUUsage();
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"\ndsp: %f, stream: %f\ngeo: %f, update: %f\nconv1: %f, conv2: %f",
v6,
*(float *)&v33[1],
*(float *)&v33[2],
*(float *)&v33[3],
*(float *)&v33[4],
*(float *)&v33[5],
*(float *)&v33[6]);
v8 = (char *)cocos2d::CCString::getCString(v7);
sub_774544((int)this, v8);
FMOD::System::getDSPBufferSize(*(FMOD::System **)(a2 + 388), &v26, &v27);
FMOD::System::getSoftwareFormat(*(FMOD::System **)(a2 + 388), &v28, nullptr, nullptr);
v9 = (float)((float)v26 * 1000.0) / (float)v28;
v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"\nMixer blocksize = %f ms",
v10,
v9);
v12 = (char *)cocos2d::CCString::getCString(v11);
sub_774544((int)this, v12);
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"\nMixer Total buffersize = %f ms",
v13,
(float)(v9 * (float)v27));
v15 = (char *)cocos2d::CCString::getCString(v14);
sub_774544((int)this, v15);
v17 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"\nMixer Average Latency = %f ms",
v16,
(float)(v9 * (float)((float)v27 - 1.5)));
v18 = (char *)cocos2d::CCString::getCString(v17);
sub_774544((int)this, v18);
FMOD::System::getSoftwareFormat(*(FMOD::System **)(a2 + 388), (int *)&v29, (FMOD_SPEAKERMODE *)&v30, &v31);
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"\nSR: %i, SM: %i, NRS: %i",
v29,
v30,
v31);
v20 = (char *)cocos2d::CCString::getCString(v19);
sub_774544((int)this, v20);
v21 = *(FMOD::System **)(a2 + 388);
v32 = nullptr;
v33[0] = 1;
FMOD::System::getStreamBufferSize(v21, (unsigned int *)&v32, v33);
v22 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"\nstreamBufferSize: %i, Type: %i",
v32,
v33[0]);
v23 = (char *)cocos2d::CCString::getCString(v22);
sub_774544((int)this, v23);
return this;
}