VIAudioManager

Interface that may be used to manage audio devices on iOS device.

Members
Other Methods
–  init

Warning: NS_UNAVAILABLE

- (instancetype)init
+  sharedAudioManager

Obtain VIAudioManager instance

+ (instancetype)sharedAudioManager
useLoudSpeaker

Enable or disable loudspeaker

@property (nonatomic, assign) BOOL useLoudSpeaker
CallKit Methods
–  callKitConfigureAudioSession:

Initializes AudioSession for use with CallKit integration. Only needed for correct CallKit integration.

Should be called in - (void)provider:(CXProvider *)provider performStartCallAction:(CXStartCallAction *)action; and - (void)provider:(CXProvider *)provider performAnswerCallAction:(CXAnswerCallAction *)action; of CXProviderDelegate

- (void)callKitConfigureAudioSession:(NSError **)error
Parameters
error

Occured error on configuration steps

–  callKitReleaseAudioSession

Restores default AudioSession initialization routines, MUST be called if CallKit becomes disabled

- (void)callKitReleaseAudioSession
–  callKitStartAudio

Starts AudioSession Only needed for correct CallKit integration.

Should be called in - (void)provider:(CXProvider *)provider didActivateAudioSession:(AVAudioSession *)audioSession; and - (void)provider:(CXProvider *)provider performSetHeldCallAction:(CXSetHeldCallAction *)action; of CXProviderDelegate

- (void)callKitStartAudio
–  callKitStopAudio

Stops AudioSession Only needed for correct CallKit integration.

Should be called in - (void)provider:(CXProvider *)provider performEndCallAction:(CXEndCallAction *)action; and - (void)provider:(CXProvider *)provider performSetHeldCallAction:(CXSetHeldCallAction *)action; of CXProviderDelegate

- (void)callKitStopAudio