mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Add direct effect add/remove control to SoundPlayer
This commit is contained in:
parent
dd2ccfa55c
commit
a96b48b0c0
|
@ -2831,6 +2831,22 @@ namespace MiniEngine
|
||||||
return Mix_SetReverseStereo(id,flip);
|
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;
|
AudioPlayer::_Audio* AudioPlayer::_sysAudio = nullptr;
|
||||||
int AudioPlayer::_sysAudioCounter = 0;
|
int AudioPlayer::_sysAudioCounter = 0;
|
||||||
|
|
||||||
|
|
|
@ -834,6 +834,11 @@ namespace MiniEngine
|
||||||
int setPosition(ChannelID id,int16_t angle,uint8_t distance);
|
int setPosition(ChannelID id,int16_t angle,uint8_t distance);
|
||||||
int setDistance(ChannelID id,uint8_t distance);
|
int setDistance(ChannelID id,uint8_t distance);
|
||||||
int setReverseStereo(ChannelID id,int flip);
|
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
|
class StringEngine
|
||||||
|
|
Loading…
Reference in New Issue
Block a user