audio::playStream + speaker relative property

This commit is contained in:
MihailRis
2024-03-01 14:47:12 +03:00
parent 2fab1593c8
commit 603546f642
5 changed files with 65 additions and 2 deletions
+8
View File
@@ -197,6 +197,14 @@ glm::vec3 ALSpeaker::getVelocity() const {
return AL::getSource3f(source, AL_VELOCITY);
}
void ALSpeaker::setRelative(bool relative) {
AL_CHECK(alSourcei(source, AL_SOURCE_RELATIVE, relative ? AL_TRUE : AL_FALSE));
}
bool ALSpeaker::isRelative() const {
return AL::getSourcei(source, AL_SOURCE_RELATIVE) == AL_TRUE;
}
int ALSpeaker::getPriority() const {
return priority;
}