Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumblekit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hubel <andreas.hubel@br.de>2021-01-23 21:24:47 +0300
committerAndreas Hubel <andreas.hubel@br.de>2021-01-23 21:24:47 +0300
commit437c2dfc7315ded20bf36a406d6c57b600839036 (patch)
treedf60befca5a9554b397e274ca464b591f462b86b
parent76ababeb9b681148b9dfa744cc7b70d98366611f (diff)
fix warning: implicit converstion from int to short turns value to -32768
-rw-r--r--src/MKAudioOutput.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/MKAudioOutput.m b/src/MKAudioOutput.m
index 44e5458..9d47dcb 100644
--- a/src/MKAudioOutput.m
+++ b/src/MKAudioOutput.m
@@ -200,8 +200,8 @@
short *outputBuffer = (short *)frames;
for (i = 0; i < nsamp * _numChannels; ++i) {
- if (mixBuffer[i] > 1.0f) {
- outputBuffer[i] = 32768;
+ if (mixBuffer[i] >= 1.0f) {
+ outputBuffer[i] = 32767;
} else if (mixBuffer[i] < -1.0f) {
outputBuffer[i] = -32768;
} else {
@@ -235,8 +235,8 @@
_cngLastSample = runningvalue;
_cngRegister2 += _cngRegister1;
- if (runningvalue > 1.0f) {
- outputBuffer[i] = 32768;
+ if (runningvalue >= 1.0f) {
+ outputBuffer[i] = 32767;
} else if (runningvalue < -1.0f) {
outputBuffer[i] = -32768;
} else {