mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 06:51:51 +00:00
audio::playStream + speaker relative property
This commit is contained in:
parent
2fab1593c8
commit
603546f642
5 changed files with 65 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,6 +103,9 @@ namespace audio {
|
|||
void setVelocity(glm::vec3 vel) override;
|
||||
glm::vec3 getVelocity() const override;
|
||||
|
||||
void setRelative(bool relative) override;
|
||||
bool isRelative() const override;
|
||||
|
||||
int getPriority() const override;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue