Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

131
Views
Im trying to visualize Audiofiles with the WebaudioAPI but getByteFrequencyData always is always 0
function playSound(){
let noise = context.createBufferSource()
noise.buffer = generateWhiteNoise()

const analyzer = context.createAnalyser()
analyzer.fftSize = 2048

let test = new Uint8Array(analyzer.frequencyBinCount)

noise.connect(analyzer)

analyzer.getByteFrequencyData(test)
console.log(test)

}

Currently im just trying to get the Analyzer node to work properly by testing it out with some whitenoise. The problem is that the test array is always 0 for every index. I cant figure out why.

function generateWhiteNoise() {
let bufferSize = context.sampleRate;
let buffer = context.createBuffer(1, bufferSize, context.sampleRate);
let output = buffer.getChannelData(0);

for (let i = 0; i < bufferSize; i++) {
    output[i] = Math.random() * 2 - 1;
}

return buffer;

}

Here is my generateWhiteNoise() Function.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!