WebAudio / web-audio-api

The Web Audio API v1.0, developed by the W3C Audio WG
https://webaudio.github.io/web-audio-api/
Other
1.05k stars 166 forks source link

The sample frame data in the inputs of the process method in AudioWorkletProcessor is 0. #2601

Open asasas234 opened 2 weeks ago

asasas234 commented 2 weeks ago

I found that besides the case of silence, when my audio is just starting to load and has already finished playing or paused, the process method still executes and passes all sample frames in inputs as 0. Their length is still 128, but they are all 0. My program needs to record the valid data of the audio per second and expects to cache one AudioBuffer per second. So, is 0 considered valid data? How can I accurately filter out invalid data and only retain the valid data?

padenot commented 2 weeks ago

Please provide a test case to the browser vendor that exhibits the issue. I know Firefox won't do that, for example.