From 60326e359a9c082fd002e262e50921c5f496a2ca Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 30 Mar 2021 12:01:35 -0600 Subject: [PATCH] Clarify comment --- src/voice/VoiceRecorder.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/voice/VoiceRecorder.ts b/src/voice/VoiceRecorder.ts index 529781a090..0d890160c3 100644 --- a/src/voice/VoiceRecorder.ts +++ b/src/voice/VoiceRecorder.ts @@ -140,7 +140,9 @@ export class VoiceRecorder { // and will instead return a Float32Array still. const translatedData: number[] = []; for (let i = 0; i < data.length; i++) { - // We're clamping the values so we can do that math operation mentioned above. + // We're clamping the values so we can do that math operation mentioned above, + // and to ensure that we produce consistent data (it's possible for the array + // to exceed the specified range with some audio input devices). translatedData.push(percentageOf(data[i], 0, 1)); }