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:
authorMikkel Krautz <mikkel@krautz.dk>2013-06-12 23:41:45 +0400
committerMikkel Krautz <mikkel@krautz.dk>2013-06-12 23:41:45 +0400
commit1c6b96e3ff23efc09f8260c418dfe490e41a9c95 (patch)
tree776313d80da6bdfdf2954aec73150e07d379d13d
parentf71841c3e43e57b93d857131f60c485bcb0b9852 (diff)
MKAudioInput: fix mic boost memory corruption when resampling.
-rw-r--r--src/MKAudioInput.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/MKAudioInput.m b/src/MKAudioInput.m
index 621577b..fbcdeb5 100644
--- a/src/MKAudioInput.m
+++ b/src/MKAudioInput.m
@@ -425,7 +425,7 @@
BOOL resampled = micFrequency != sampleRate;
short *buf = resampled ? psOut : psMic;
int i;
- for (i = 0; i < micLength; i++) {
+ for (i = 0; i < frameSize; i++) {
float val = (buf[i] / 32767.0f) * (1.0f + _settings.micBoost);
if (val > 1.0f)
val = 1.0f;