don't use std::map and std::function in scheduler

This commit is contained in:
RSDuck
2024-11-20 02:55:40 +01:00
parent f6f993cb41
commit d0d010b09d
12 changed files with 68 additions and 59 deletions

View File

@ -202,7 +202,7 @@ SPU::SPU(melonDS::NDS& nds, AudioBitDepth bitdepth, AudioInterpolation interpola
AudioLock(Platform::Mutex_Create()),
Degrade10Bit(bitdepth == AudioBitDepth::_10Bit || (nds.ConsoleType == 1 && bitdepth == AudioBitDepth::Auto))
{
NDS.RegisterEventFunc(Event_SPU, 0, MemberEventFunc(SPU, Mix));
NDS.RegisterEventFuncs(Event_SPU, this, {MakeEventThunk(SPU, Mix)});
ApplyBias = true;
Degrade10Bit = false;
@ -219,7 +219,7 @@ SPU::~SPU()
Platform::Mutex_Free(AudioLock);
AudioLock = nullptr;
NDS.UnregisterEventFunc(Event_SPU, 0);
NDS.UnregisterEventFuncs(Event_SPU);
}
void SPU::Reset()