//
// MusicDownloadManager::addMusicDownloadDelegate from 0x8291f0 to 0x82926c (124 bytes)
//
// 8 xrefs:
// > EditorUI::init @ 0x6bdd34
// > CustomSongWidget::init @ 0x7461f4
// > SetupSongTriggerPopup::init @ 0x9aa7a8
// > CustomSFXWidget::init @ 0xa33048
// > MusicBrowser::init @ 0xa5bfe4
// > sub_A5DEA4 @ 0xa5ec30
// > AudioAssetsBrowser::init @ 0xa8faac
// > ??> @ 0x7d148
//
// 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
//
void MusicDownloadManager::addMusicDownloadDelegate(MusicDownloadManager *a1, MusicDownloadDelegate *a2)
{
unsigned int v4; // w19
bool v5; // cf
unsigned int v6; // w1
MusicDelegateHandler *v7; // x0
v4 = 0;
while ( 1 )
{
v5 = v4 >= (unsigned int)cocos2d::CCArray::count(a1->m_musicDownloadDelegates);
v6 = v4++;
if ( v5 )
break;
if ( *(MusicDownloadDelegate **)(cocos2d::CCArray::objectAtIndex(a1->m_musicDownloadDelegates, v6) + 320) == a2 )
return;
}
v7 = MusicDelegateHandler::create(a2);
cocos2d::CCArray::addObject(a1->m_musicDownloadDelegates, v7);
}