Abhimanyu Abhimanyu - 1 month ago 8
Objective-C Question

Is it possible to run Audio file alternatively in two ear phone?

I have to run Audio file alternatively in right and left ear phone ? I have process sound such that it will heard right and left both alternatively?

Answer

To direct Audio to either the left or right speaker, you use the .pan property of AVAudioPlayer. You can balance it in the center (the default of 0.0) or send it all left (-1.0) or all right (1.0)

https://developer.apple.com/reference/avfoundation/avaudioplayer/1390884-pan

Comments