From b7b5f002a636154033166a2c828765386c14e5a5 Mon Sep 17 00:00:00 2001 From: erihel Date: Sat, 30 Mar 2013 16:03:25 +0100 Subject: * Removed warning while compiling brain.cpp * Fix for issue #130 * Fix for issue #128 with wrong sound pitch --- src/sound/oalsound/channel.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/sound/oalsound/channel.cpp') 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; -- cgit v1.2.3-1-g7c22