//
// CustomSFXWidget::onPlayback from 0x6a6494 to 0x6a6548 (180 bytes)
//
// 1 xrefs:
// > CustomSFXWidget::downloadSFXFinished @ 0x6a656c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:56:30 +0000
//
FMODAudioEngine *__fastcall CustomSFXWidget::onPlayback(FMODAudioEngine *this, cocos2d::CCObject *a2)
{
FMODAudioEngine *v2; // r4
FMOD::ChannelControl **v3; // r0
MusicDownloadManager *v4; // r8
MusicDownloadManager *v5; // r0
char *v6; // r6
size_t v7; // r0
char v8; // [sp+4h] [bp-1Ch] BYREF
char v9; // [sp+5h] [bp-1Bh] BYREF
char *v10; // [sp+Ch] [bp-14h]
int v11[3]; // [sp+10h] [bp-10h] BYREF
v2 = this;
if ( *((_DWORD *)this + 68) )
{
v3 = (FMOD::ChannelControl **)FMODAudioEngine::sharedEngine(this);
FMODAudioEngine::stopAllEffects(v3);
this = *((FMODAudioEngine **)v2 + 86);
if ( !this
|| (this = (FMODAudioEngine *)(*(int (__fastcall **)(FMODAudioEngine *, _DWORD))(*(_DWORD *)this + 12))(
this,
*((_DWORD *)v2 + 68))) == nullptr )
{
v4 = (MusicDownloadManager *)FMODAudioEngine::sharedEngine(this);
v5 = (MusicDownloadManager *)MusicDownloadManager::sharedState(v4);
MusicDownloadManager::pathForSFX((MusicDownloadManager *)&v8, v5, *(_DWORD *)(*((_DWORD *)v2 + 68) + 52));
if ( (v8 & 1) != 0 )
v6 = v10;
else
v6 = &v9;
memset(v11, 0, sizeof(v11));
v7 = strlen(v6);
std::string::__init(v11, v6, v7);
FMODAudioEngine::playEffectAsync(v4, (int)v11);
std::string::~string((int)v11);
return (FMODAudioEngine *)std::string::~string((int)&v8);
}
}
return this;
}