Detect attached audio devices iOS

后端 未结 3 955
一整个雨季
一整个雨季 2021-01-12 06:36

I\'m trying to figure out how to detect which if any audio devices are connected on iphone/ipad/ipod. I know all about the audio route calls and route change callbacks but t

3条回答
  •  天命终不由人
    2021-01-12 07:12

    You can get from AudioSession properties a list of InputSources and OutputDestinations. Check out these Session Properties:

    kAudioSessionProperty_InputSources
    kAudioSessionProperty_OutputDestinations
    

    And to query the details of each, you can use:

    kAudioSessionProperty_InputSource
    kAudioSessionProperty_OutputDestination
    

提交回复
热议问题