audio volume-related fix
This commit is contained in:
parent
ce687a67a3
commit
a82476949c
@ -232,7 +232,7 @@ State ALSpeaker::getState() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
float ALSpeaker::getVolume() const {
|
float ALSpeaker::getVolume() const {
|
||||||
return AL::getSourcef(source, AL_GAIN);
|
return volume;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ALSpeaker::setVolume(float volume) {
|
void ALSpeaker::setVolume(float volume) {
|
||||||
@ -258,6 +258,7 @@ void ALSpeaker::setLoop(bool loop) {
|
|||||||
void ALSpeaker::play() {
|
void ALSpeaker::play() {
|
||||||
paused = false;
|
paused = false;
|
||||||
stopped = false;
|
stopped = false;
|
||||||
|
AL_CHECK(alSourcef(source, AL_GAIN, 0.0f));
|
||||||
AL_CHECK(alSourcePlay(source));
|
AL_CHECK(alSourcePlay(source));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user