You can go into Audio Midi Setup.app
create an aggregate device containing the two devices you want to record from, then set that aggregate device as the default input.
Tapping the input node will give you buffers that contain audio recorded from both devices, and as a bonus the audio will be synchronised!
The manual aggregate setup can also be done via Core Audio.
Alternatively you could simply record from the two separate devices using Core Audio's RemoteIO
AudioUnit
s. You will be responsible for timestamp matching in this case. There are pros and cons to both approaches. My own anti-pattern is to write an AVAudioEngine
solution then replace it with Core Audio.
