//
// MusicDownloadManager::addMusicDownloadDelegate from 0x457d80 to 0x457dc0 (64 bytes)
//
// 7 xrefs:
// > EditorUI::init @ 0x3a28e2
// > CustomSongWidget::init @ 0x3df73a
// > SetupSongTriggerPopup::init @ 0x525768
// > CustomSFXWidget::init @ 0x56eee4
// > sub_581CB4 @ 0x582512
// > sub_5836C8 @ 0x584164
// > AudioAssetsBrowser::init @ 0x59bba6
//
// 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 i; // r4
MusicDelegateHandler *v5; // r1
for ( i = 0; i < cocos2d::CCArray::count(a1->m_musicDownloadDelegates); ++i )
{
if ( *(MusicDownloadDelegate **)(cocos2d::CCArray::objectAtIndex(a1->m_musicDownloadDelegates, i) + 264) == a2 )
return;
}
v5 = MusicDelegateHandler::create(a2);
cocos2d::CCArray::addObject(a1->m_musicDownloadDelegates, v5);
}