diff --git a/kkapturedll/sound.cpp b/kkapturedll/sound.cpp index d2acf80..68538ad 100644 --- a/kkapturedll/sound.cpp +++ b/kkapturedll/sound.cpp @@ -1613,8 +1613,7 @@ struct FMODExSoundDesc float frequency; }; -static const int FMODExNumSounds = 65535; // max # of active (playing) sounds supported -static FMODExSoundDesc FMODExSounds[FMODExNumSounds]; +static std::unordered_map FMODExSoundDescs; static int __stdcall Mine_System_init(void *sys,int maxchan,int flags,void *extradriverdata) { @@ -1630,20 +1629,12 @@ static int __stdcall Mine_System_playSound(void *sys,int index,void *sound,bool int result = Real_System_playSound(sys,index,sound,paused,&chan); if(result == 0) // FMOD_OK { - // find a free sound desc - int index = 0; - while(index