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

286
Views
Javascript Playing BASE64 Audio Files Without Delay

I wrote a very simple JavaScript file to play BASE64 Wav files.

I did not paste the encoded wav files becuase it's a HUGE string and it won't let me post it anyways but just for you to get the idea :

let whiteNoise=new Audio("data:audio/wav;base64, {{Here goes the BASE64 Wav encoded file of the white noise}} ");
let pinkNoise=new Audio("data:audio/wav;base64, {{Here goes the BASE64 Wav encoded file of the pink noise}} ");

whiteNoise.play();

whiteNoise.onended=function()
{
    pinkNoise.play();
};

pinkNoise.onended=function()
{
    whiteNoise.play();
};

It's working (almost) perfectly the only issue I got is that there is a tiny delay between then

[White Noise][***UNWANTER DELAY***][Pink Noise][***UNWANTER DELAY***] (etc...)

I Want to get

[White Noise][Pink Noise][White Noise][Pink Noise] (etc..)

So it would sound like 1 single endless file :)

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!