Skip to content

Commit b0f3c05

Browse files
Fix dictaphone buffer length (#287)
* Fix dictaphone buffer length * incorporate review
1 parent acad140 commit b0f3c05

File tree

1 file changed

+2
-2
lines changed
  • media/web-dictaphone/scripts

1 file changed

+2
-2
lines changed

media/web-dictaphone/scripts/app.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ function visualize(stream) {
117117

118118
const source = audioCtx.createMediaStreamSource(stream);
119119

120+
const bufferLength = 2048;
120121
const analyser = audioCtx.createAnalyser();
121-
analyser.fftSize = 2048;
122-
const bufferLength = analyser.frequencyBinCount;
122+
analyser.fftSize = bufferLength;
123123
const dataArray = new Uint8Array(bufferLength);
124124

125125
source.connect(analyser);

0 commit comments

Comments
 (0)