Clarify comment

pull/21833/head
Travis Ralston 2021-03-30 12:01:35 -06:00
parent 54412878a1
commit 60326e359a
1 changed files with 3 additions and 1 deletions

View File

@ -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));
}