mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
reduce doppler effect
This commit is contained in:
parent
8710cdfba3
commit
13b7377b3f
1 changed files with 3 additions and 0 deletions
|
|
@ -485,6 +485,8 @@ ALAudio::ALAudio(ALCdevice* device, ALCcontext* context)
|
|||
for (auto& name : inputDevices) {
|
||||
logger.info() << " " << name;
|
||||
}
|
||||
|
||||
alDopplerFactor(1.0 / 3.0);
|
||||
}
|
||||
|
||||
ALAudio::~ALAudio() {
|
||||
|
|
@ -654,6 +656,7 @@ void ALAudio::setListener(
|
|||
) {
|
||||
ALfloat listenerOri[] = {at.x, at.y, at.z, up.x, up.y, up.z};
|
||||
|
||||
logger.info() << "velcotiy: " << glm::length(velocity);
|
||||
AL_CHECK(alListener3f(AL_POSITION, position.x, position.y, position.z));
|
||||
AL_CHECK(alListener3f(AL_VELOCITY, velocity.x, velocity.y, velocity.z));
|
||||
AL_CHECK(alListenerfv(AL_ORIENTATION, listenerOri));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue