From 5fe311638e3fcc7dc08d116ddb5ab11b9c909a75 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 7 Mar 2013 11:10:16 -0800 Subject: [PATCH] fall back to the working MIN/MAX for int16_t --- mixer/src/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mixer/src/main.cpp b/mixer/src/main.cpp index 833e5c59eb..df45511618 100644 --- a/mixer/src/main.cpp +++ b/mixer/src/main.cpp @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include @@ -47,8 +46,8 @@ AgentList agentList(MIXER_LISTEN_PORT); void plateauAdditionOfSamples(int16_t &mixSample, int16_t sampleToAdd) { long sumSample = sampleToAdd + mixSample; - long normalizedSample = std::max((long)INT16_MAX, sumSample); - normalizedSample = std::min((long)INT16_MIN, sumSample); + long normalizedSample = std::max(MAX_SAMPLE_VALUE, sumSample); + normalizedSample = std::min(MIN_SAMPLE_VALUE, sumSample); mixSample = normalizedSample; }