diff --git a/MiniEngine.cpp b/MiniEngine.cpp index 8952468..a1b50ac 100644 --- a/MiniEngine.cpp +++ b/MiniEngine.cpp @@ -2831,6 +2831,22 @@ namespace MiniEngine return Mix_SetReverseStereo(id,flip); } + int SoundPlayer::addEffect(ChannelID id,Mix_EffectFunc_t f, Mix_EffectDone_t d, void* arg) + { + return Mix_RegisterEffect(id,f,d,arg); + } + + int SoundPlayer::removeEffect(ChannelID id,Mix_EffectFunc_t f) + { + return Mix_UnregisterEffect(id,f); + } + + int SoundPlayer::removeAllEffect(ChannelID id) + { + return Mix_UnregisterAllEffects(id); + } + + AudioPlayer::_Audio* AudioPlayer::_sysAudio = nullptr; int AudioPlayer::_sysAudioCounter = 0; diff --git a/MiniEngine.h b/MiniEngine.h index 12968a5..e104388 100644 --- a/MiniEngine.h +++ b/MiniEngine.h @@ -834,6 +834,11 @@ namespace MiniEngine int setPosition(ChannelID id,int16_t angle,uint8_t distance); int setDistance(ChannelID id,uint8_t distance); int setReverseStereo(ChannelID id,int flip); + + /// Experimental: Direct Add/Remove Effect + int addEffect(ChannelID id,Mix_EffectFunc_t f, Mix_EffectDone_t d, void *arg); + int removeEffect(ChannelID id,Mix_EffectFunc_t f); + int removeAllEffect(ChannelID id); }; class StringEngine