I'm currenly developing an audio web application using Web Audio API in javascript, but I found a problem: I need to record simultaneously from different devices to different tracks (imagine for example a sound card with 8 inputs recording in 8 buffers independently in orderto record a drummer), but I have not found any way to tell the AudioContext from which device you must record :(
Can anybody help me? Thanks a lot :)
Well you can have multiple microphones - but only if they're plugged into a multi-channel interface. Separate devices would be addressed by calling getUserMedia multiple times with a constraint to select different inputs - look at https://simpl.info/getusermedia/sources/index.html. I'm not sure if we're wired up to support that yet, though.
来源:https://stackoverflow.com/questions/26659560/record-audio-on-multiple-tracks-simultaneously-from-multiple-devices