revolunet/webaudio-wav-stream-player

Crackle in Chrome Playback

fearfulsmtry opened this issue · 2 comments

Hi,

I just noticed that in Chrome, the stream plays with a slight crackle. Is there anything that can be done about this?

Using HTML5 Audio element the stream plays fine, I don't know if it is Web Audio API, but I started using your streamer because it has very low latency.

Hi ! yes there's indeed a little crackle on Chrome. I dont know how to resolve it though. Maybe @chrisguttandin has an idea ?

Hi, sorry for the delay. It might be worth to tweak the latency to see if that results in a better experience.

Unfortunately the value is hardcoded here: https://github.com/revolunet/webaudio-wav-stream-player/blob/master/src/WavPlayer.js#L78

In the long term it might be worth to consider using an AudioWorklet for the audio playback. Streaming the audio could be done by a WebWorker which passes the encoded audio directly to the AudioWorklet without ever interfering with the main thread. That should improve the performance, at least in theory.