Am looking to add a preview channel to an AV project, so that a video or audio file can be playing on the master output channel but the user can preview a separate audio or video file on a different channel.
Naturally the prerequisite is that the user has a sound device capable of multiple channels or a separate device for master output than for preview. For example, the output could go to a USB audio device which provides balanced audio output but the preview could be via the standard headphone jack.
I am struggling to find the right documentation on enumerating sound devices connected to the mac and then linking either AVAudioPlayer or AVPlayer/AVPlayerLayer or an underlying API.
Anyone know where I should be looking?
Is this a case of discovering the sound devices, selecting the appropriate one then using something like NSSound
to set the device before I start playing the file? What happens with files already playing?
Thanks
Note that AVAudioSession
is iOS-only.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With