mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
take proper max/min values for samples
This commit is contained in:
parent
5fe311638e
commit
a5708c0450
1 changed files with 2 additions and 2 deletions
|
@ -46,8 +46,8 @@ AgentList agentList(MIXER_LISTEN_PORT);
|
|||
void plateauAdditionOfSamples(int16_t &mixSample, int16_t sampleToAdd) {
|
||||
long sumSample = sampleToAdd + mixSample;
|
||||
|
||||
long normalizedSample = std::max(MAX_SAMPLE_VALUE, sumSample);
|
||||
normalizedSample = std::min(MIN_SAMPLE_VALUE, sumSample);
|
||||
long normalizedSample = std::min(MAX_SAMPLE_VALUE, sumSample);
|
||||
normalizedSample = std::max(MIN_SAMPLE_VALUE, sumSample);
|
||||
|
||||
mixSample = normalizedSample;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue