mercredi 25 janvier 2017

How to select destination output device using Web Audio Api

I have been using web audio api and have created a context, and populated a source buffer with data. It plays fine over the default output device, but i don't understand how to choose the destination. In an old w3 spec you were able to pass in the correct deviceId to the audio context constructor, but i can't figure out how to do it now without using a media element. Any suggestions?

source = context.createBufferSource()
source.loop = true;
source.buffer = globalAudioBuffer;
source.connect(context.destination);
context.resume();
source.start(0);




Aucun commentaire:

Enregistrer un commentaire