Skip to content

Commit

Permalink
Fix dictaphone buffer length (#287)
Browse files Browse the repository at this point in the history
* Fix dictaphone buffer length

* incorporate review
  • Loading branch information
vincerubinetti authored Dec 17, 2024
1 parent acad140 commit b0f3c05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions media/web-dictaphone/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ function visualize(stream) {

const source = audioCtx.createMediaStreamSource(stream);

const bufferLength = 2048;
const analyser = audioCtx.createAnalyser();
analyser.fftSize = 2048;
const bufferLength = analyser.frequencyBinCount;
analyser.fftSize = bufferLength;
const dataArray = new Uint8Array(bufferLength);

source.connect(analyser);
Expand Down

0 comments on commit b0f3c05

Please sign in to comment.