aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Audio/SDL/SDLSource.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-07-28 22:10:27 +0800
committerchai <chaifix@163.com>2018-07-28 22:10:27 +0800
commit52693d68f7181d707e1a192d67a617145b358394 (patch)
tree5a39bcdf225def306738ead6683cd224e2c5762d /src/libjin/Audio/SDL/SDLSource.cpp
parentd033400614e7e2c0ff49e5100c81e937e5818e74 (diff)
*update
Diffstat (limited to 'src/libjin/Audio/SDL/SDLSource.cpp')
-rw-r--r--src/libjin/Audio/SDL/SDLSource.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libjin/Audio/SDL/SDLSource.cpp b/src/libjin/Audio/SDL/SDLSource.cpp
index b70230d..18ba855 100644
--- a/src/libjin/Audio/SDL/SDLSource.cpp
+++ b/src/libjin/Audio/SDL/SDLSource.cpp
@@ -18,6 +18,8 @@ namespace jin
namespace audio
{
+ using namespace jin::math;
+
#define BITS 8
typedef struct SDLSourceCommand
@@ -134,7 +136,7 @@ namespace audio
raw.samplerate = wav.samplerate;
raw.bitdepth = wav.bitdepth;
raw.samples = raw.length / (wav.bitdepth / 8.f) / wav.channels;
- raw.channels = clamp(wav.channels, CHANNEL::MONO, CHANNEL::STEREO);
+ raw.channels = clamp<int>(wav.channels, CHANNEL::MONO, CHANNEL::STEREO);
}
else
throw SourceException();