rserota / wad

Web Audio DAW. Use the Web Audio API for dynamic sound synthesis. It's like jQuery for your ears.
MIT License
1.89k stars 160 forks source link

play mp3 data recieved from websocket #94

Closed richtier closed 5 years ago

richtier commented 5 years ago

I have mp3 audio streaming from a websocket.

Does wad support playing the audio?

richtier commented 5 years ago

yes:

        var blob = new Blob([samples]);
        var source = URL.createObjectURL(blob)
        var wadSound = new Wad({source: source});
        wadSound.play();
rserota commented 5 years ago

Thanks for posting the answer to your own question. I'm sure it'll be useful to other users.