I am attempting to designate output channels of an audio interface for sending audio during video playback on macOS. I am using AVPlayer to play a video file:
auto player = [AVPlayer playerWithPlayerItem:playerItem]; // playerItem created from a file path
player.audioOutputDeviceUniqueID = deviceID; // deviceID determined by passing kAudioObjectPropertyName to AudioObjectGetPropertyData and inspecting device name, e.g. "Babyface Pro"
/* select hardware channels? */
[player play];
The AVPlayer
defaults to playing channels 1/2 of my Babyface Pro, but I'd like to select, for instance, channels 3/4. I cannot select these channel routes globally (i.e. through TotalMix FX) since I am using more than one AVPlayer
and selecting separate channels for each.
I came across a nearly identical question, however the question did not require playing video, only audio.