//
// MusicDownloadManager::addMusicDownloadDelegate from 0x100153ee8 to 0x100153f6c (132 bytes)
//
// 7 xrefs:
// > CustomSongWidget::init @ 0x1000fa830
// > SFXBrowser::init @ 0x1001695a4
// > SetupSongTriggerPopup::init @ 0x1001c3044
// > AudioAssetsBrowser::init @ 0x1001d1a8c
// > CustomSFXWidget::init @ 0x1002f08c8
// > MusicBrowser::init @ 0x1003c18d8
// > EditorUI::init @ 0x1003c6de4
//
// 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 __fastcall MusicDownloadManager::addMusicDownloadDelegate(MusicDownloadManager *a1, MusicDownloadDelegate *a2)
{
__int64 v4; // x21
MusicDelegateHandler *v5; // x1
if ( (unsigned int)sub_10024A36C(a1->m_musicDownloadDelegates) )
{
v4 = 0;
while ( *(MusicDownloadDelegate **)(sub_10024A388(a1->m_musicDownloadDelegates, v4) + 320) != a2 )
{
v4 = (unsigned int)(v4 + 1);
if ( (unsigned int)v4 >= (unsigned int)sub_10024A36C(a1->m_musicDownloadDelegates) )
goto LABEL_5;
}
}
else
{
LABEL_5:
v5 = MusicDelegateHandler::create(a2);
sub_10024A2D0(a1->m_musicDownloadDelegates, v5);
}
}