diff options
author | krzys-h <krzys_h@interia.pl> | 2013-03-31 10:22:08 +0200 |
---|---|---|
committer | krzys-h <krzys_h@interia.pl> | 2013-03-31 10:22:08 +0200 |
commit | 0625f064a74ab70b06534b2198fa2b10f42fa183 (patch) | |
tree | 6f710509bcb841bf017775b650e596c81a3684ab /src/sound/oalsound/channel.cpp | |
parent | 90301e24c0fc5fcd6bffb0399e203e5adea6aa2c (diff) | |
parent | 5a60a7a21958e2d8cfd33148f575d36e3bbd9ebb (diff) | |
download | colobot-0625f064a74ab70b06534b2198fa2b10f42fa183.tar.gz colobot-0625f064a74ab70b06534b2198fa2b10f42fa183.tar.bz2 colobot-0625f064a74ab70b06534b2198fa2b10f42fa183.zip |
Merge branch 'dev' of github.com:colobot/colobot into dev
Diffstat (limited to 'src/sound/oalsound/channel.cpp')
-rw-r--r-- | src/sound/oalsound/channel.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/sound/oalsound/channel.cpp b/src/sound/oalsound/channel.cpp index 19394c6..f5967ab 100644 --- a/src/sound/oalsound/channel.cpp +++ b/src/sound/oalsound/channel.cpp @@ -17,8 +17,6 @@ #include "channel.h" -#define MIN(a, b) (a > b ? b : a) - Channel::Channel() { alGenSources(1, &mSource); @@ -89,15 +87,6 @@ bool Channel::SetFrequency(float freq) } -bool Channel::AdjustFrequency(float freq) -{ - if (!mReady || mBuffer == nullptr) - return false; - - return SetFrequency(mInitFrequency + fabs(freq)); -} - - float Channel::GetFrequency() { ALfloat freq; @@ -119,7 +108,7 @@ bool Channel::SetVolume(float vol) if (!mReady || vol < 0 || mBuffer == nullptr) return false; - alSourcef(mSource, AL_GAIN, MIN(powf(vol, 0.2f), 1.0f)); + alSourcef(mSource, AL_GAIN, vol); if (alCheck()) { GetLogger()->Warn("Could not set sound volume to '%f'. Code: %d\n", vol, alGetCode()); return false; |