Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 60326e3

Browse files
committed
Clarify comment
1 parent 5441287 commit 60326e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/voice/VoiceRecorder.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ export class VoiceRecorder {
140140
// and will instead return a Float32Array still.
141141
const translatedData: number[] = [];
142142
for (let i = 0; i < data.length; i++) {
143-
// We're clamping the values so we can do that math operation mentioned above.
143+
// We're clamping the values so we can do that math operation mentioned above,
144+
// and to ensure that we produce consistent data (it's possible for the array
145+
// to exceed the specified range with some audio input devices).
144146
translatedData.push(percentageOf(data[i], 0, 1));
145147
}
146148

0 commit comments

Comments
 (0)