mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Add Sound Effect API to class SoundPlayer (Experimental)
This commit is contained in:
parent
01c31a4f71
commit
f1f86c933d
|
@ -2408,6 +2408,26 @@ namespace MiniEngine
|
||||||
return Mix_HaltChannel(id);
|
return Mix_HaltChannel(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int SoundPlayer::setPanning(ChannelID id, uint8_t left, uint8_t right)
|
||||||
|
{
|
||||||
|
return Mix_SetPanning(id,left,right);
|
||||||
|
}
|
||||||
|
|
||||||
|
int SoundPlayer::setPosition(ChannelID id, int16_t angle, uint8_t distance)
|
||||||
|
{
|
||||||
|
return Mix_SetPosition(id,angle,distance);
|
||||||
|
}
|
||||||
|
|
||||||
|
int SoundPlayer::setDistance(ChannelID id, uint8_t distance)
|
||||||
|
{
|
||||||
|
return Mix_SetDistance(id,distance);
|
||||||
|
}
|
||||||
|
|
||||||
|
int SoundPlayer::setReverseStereo(ChannelID id, int flip)
|
||||||
|
{
|
||||||
|
return Mix_SetReverseStereo(id,flip);
|
||||||
|
}
|
||||||
|
|
||||||
AudioPlayer::_Audio* AudioPlayer::_sysAudio = nullptr;
|
AudioPlayer::_Audio* AudioPlayer::_sysAudio = nullptr;
|
||||||
int AudioPlayer::_sysAudioCounter = 0;
|
int AudioPlayer::_sysAudioCounter = 0;
|
||||||
|
|
||||||
|
|
|
@ -723,6 +723,12 @@ namespace MiniEngine
|
||||||
void pause(ChannelID id);
|
void pause(ChannelID id);
|
||||||
void resume(ChannelID id);
|
void resume(ChannelID id);
|
||||||
int stop(ChannelID id);
|
int stop(ChannelID id);
|
||||||
|
|
||||||
|
/// Experimental
|
||||||
|
int setPanning(ChannelID id,uint8_t left,uint8_t right);
|
||||||
|
int setPosition(ChannelID id,int16_t angle,uint8_t distance);
|
||||||
|
int setDistance(ChannelID id,uint8_t distance);
|
||||||
|
int setReverseStereo(ChannelID id,int flip);
|
||||||
};
|
};
|
||||||
|
|
||||||
class StringEngine
|
class StringEngine
|
||||||
|
|
Loading…
Reference in New Issue
Block a user