diff options
author | erihel <erihel@gmail.com> | 2013-04-11 23:16:32 +0200 |
---|---|---|
committer | erihel <erihel@gmail.com> | 2013-04-11 23:16:32 +0200 |
commit | 82fdc2ba238a9cb0f60e82681f0dac26d2db7bc9 (patch) | |
tree | 3db6de48ee4bd66f443ad508077b8c438dc6e0fb | |
parent | bc760e35138579743f687661f1104777f5ba727f (diff) | |
download | colobot-82fdc2ba238a9cb0f60e82681f0dac26d2db7bc9.tar.gz colobot-82fdc2ba238a9cb0f60e82681f0dac26d2db7bc9.tar.bz2 colobot-82fdc2ba238a9cb0f60e82681f0dac26d2db7bc9.zip |
* Fixed problem with 2D sound mode
-rw-r--r-- | src/sound/oalsound/alsound.cpp | 4 | ||||
-rw-r--r-- | src/sound/oalsound/channel.cpp | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/sound/oalsound/alsound.cpp b/src/sound/oalsound/alsound.cpp index 68bf515..02e2403 100644 --- a/src/sound/oalsound/alsound.cpp +++ b/src/sound/oalsound/alsound.cpp @@ -478,7 +478,7 @@ void ALSound::FrameMove(float delta) // setting volume volume = progress * (oper.finalAmplitude - it.second->GetStartAmplitude()); volume = (volume + it.second->GetStartAmplitude()); - it.second->SetVolume(powf(volume, 0.2f) * mAudioVolume); + it.second->SetVolume(powf(volume * it.second->GetVolume(), 0.2f) * mAudioVolume); // setting frequency frequency = progress; @@ -515,7 +515,7 @@ void ALSound::SetListener(Math::Vector eye, Math::Vector lookat) alListener3f(AL_POSITION, eye.x, eye.y, eye.z); alListenerfv(AL_ORIENTATION, orientation); } else { - float orientation[] = {0.0f, 0.0f, 0.0f, 0.f, 1.f, 0.f}; + float orientation[] = {0.0f, 0.0f, -1.0f, 0.f, 1.f, 0.f}; alListener3f(AL_POSITION, 0.0f, 0.0f, 0.0f); alListenerfv(AL_ORIENTATION, orientation); } diff --git a/src/sound/oalsound/channel.cpp b/src/sound/oalsound/channel.cpp index 686e909..01ec3de 100644 --- a/src/sound/oalsound/channel.cpp +++ b/src/sound/oalsound/channel.cpp @@ -158,7 +158,6 @@ void Channel::SetPriority(int pri) void Channel::SetStartAmplitude(float gain) { mStartAmplitude = gain; - SetVolume(mStartAmplitude); } |