Skip to content
This repository was archived by the owner on Jun 9, 2019. It is now read-only.
This repository was archived by the owner on Jun 9, 2019. It is now read-only.

Valid mp3 file returns format "unknown" #64

Description

@FireController1847

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions