diff options
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; |