Stack Overflow Asked by Joe Meadows on December 16, 2020
I am processing audio files in a browser with Javascript. I’m mostly happy with how it’s working except that the Audio object (used to decode the file) seems to throttle the data stream to somewhere in the neighborhood of the playback rate. I am looking for a way to make the Audio object burst through the entire file without throttling.
After instantiating an Audio object I call AudioContext.createMediaElementSource() to obtain a MediaElementAudioSourceNode for the Audio object. I’ve got a barebones AudioWorkletProcessor (1 stereo input, 0 outputs) that is connected to the output of this source node. Its job is to take the input data and send it back to the main thread in a message where it gets saved in an IndexedDB. Technically this is all working, but it takes as long to ingest a file as it would to play it.
Any suggestions for how to get the Audio object to run ‘wide open’, or an alternative solution that can be implemented with native browser APIs?
Thanks in advance!
Joe
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP