I'm trying to port my QuickTime-using app to AVFoundation. My app plays both video and audio, and offers a choice of audio output devices (sometimes I want to use a different output device from the standard system output device). In QuickTime, I use QTAudioContextCreateForAudioDevice / SetMovieAudioContext to do this.
For audio only, I was able to create an AVAudioEngine, hook up an AVAudioPlayerNode to it and successfully change the AVAudioOutputNode's output device. But for a video playback (such as with AVPlayer), I can't figure out how to pick an audio device. I did find MTAudioProcessingTap which I guess I could use to get audio samples, but this seems like it might be the wrong thing to do given I don't need to do any postprocessing.
Any pointers appreciated — thanks!