Open FireController1847 opened 6 years ago
Here's my attempt at this.
const wae = require("web-audio-engine"); const mp3decoder = require("lame"); const { promisify } = require("util"); const Decode = promisify(mp3decoder.Decoder); wae.decoder.set("mp3", Decode); wae.decoder.set("m4a", Decode); const fs = require("fs"); const AudioContext = require("web-audio-engine").RenderingAudioContext; const context = new AudioContext(); const audioData = fs.readFileSync("c7.wav.mp3"); context.decodeAudioData(audioData).then((audioBuffer) => { console.log(audioBuffer); });
You can downloaded said file here. http://www.multiplayerpiano.com/mp3/c7.wav.mp3 Why is this CONSTANTLY returning format unknown?
http://www.multiplayerpiano.com/mp3/c7.wav.mp3
This is still an issue, the reasoning behind why I closed it is a seperate issue entirely.
I'm having the same problem. Can someone explain how to use other decoders besides the built-in wav support?
Here's my attempt at this.
You can downloaded said file here.
http://www.multiplayerpiano.com/mp3/c7.wav.mp3
Why is this CONSTANTLY returning format unknown?