//
// MusicDownloadManager::addMusicDownloadDelegate from 0x95bca4 to 0x95bd20 (124 bytes)
//
// 12 xrefs:
// > MenuLayer::init @ 0x6ebfa0
// > EditorUI::init @ 0x7d1024
// > CustomSongWidget::init @ 0x86ba30
// > SetupSongTriggerPopup::init @ 0xaeaf2c
// > CustomSFXWidget::init @ 0xb5fdf4
// > sub_B85DD0 @ 0xb86f74
// > NewsPopup::init @ 0xb8d56c
// > sub_B947C8 @ 0xb962b8
// > AudioAssetsBrowser::init @ 0xbc2b30
// > AudioAssetsPopup::init @ 0xc8e658
// > EditorSoundConfigInfoLayer::startSFXDownload @ 0xcd3584
// > ??> @ 0xa6d80
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:57:28 +0000
//
MusicDownloadDelegate *__fastcall MusicDownloadManager::addMusicDownloadDelegate(
cocos2d::CCArray **this,
MusicDownloadDelegate *a2)
{
unsigned int v4; // w19
MusicDownloadDelegate *result; // x0
bool v6; // cf
MusicDownloadDelegate *v7; // x1
cocos2d::CCObject *v8; // x0
v4 = 0;
while ( 1 )
{
v6 = v4 >= (unsigned int)cocos2d::CCArray::count(*(this + 42));
v7 = (MusicDownloadDelegate *)v4++;
if ( v6 )
break;
result = *(MusicDownloadDelegate **)(cocos2d::CCArray::objectAtIndex(*(this + 42), (unsigned int)v7) + 320);
if ( result == a2 )
return result;
}
v8 = MusicDelegateHandler::create(a2, v7);
return (MusicDownloadDelegate *)cocos2d::CCArray::addObject(*(this + 42), v8);
}