Audio in to audio out pass thru

hi

I'm programming in Xcode 9 - swift 4 - macOS NOT IOS

I have a basic recording audio setup below for recording a singer with headphones and a microphone. I would like it to react like Logic X.

In Logic X you put the track you want to record into record ready while this happens the microphone is routed to the headphones so the vocalist can hear himself/herself. Whilst in playback the record ready is muted so the vocalist can here whats been recorded. and if the record button is pressed during playback then the vocalist hears the vocal being recorded.

The problem i am having is routing audio in directly to audio out. I'm not quiet sure what Audio system I should use

AVAudioSession is obviously for iOS .


Is there anyway i can do this avoiding Core Audio

I would like to stick with swift 4

Any advice would be appreciated


thanks for reading