Files
CustomPlugin/Libs/iflyMSC.framework/Headers/IFlyAudioSession.h
2023-04-10 18:48:16 +08:00

36 lines
1.4 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// IFlyAudioSession.h
// MSCDemo
//
// Created by AlexHHC on 1/9/14.
//
//
#import <Foundation/Foundation.h>
/**
* 音频环境初始化设置AVAudioSession的Category属性。
*/
@interface IFlyAudioSession : NSObject
/**
* 初始化播音环境,主要用于合成播放器。
*
* 此接口主要根据原来的音频环境重新优化设置AVAudioSession的Category属性值。<br>
* 若原来的Category属性值为AVAudioSessionCategoryPlayAndRecord则添加AVAudioSessionCategoryOptionDefaultToSpeakerAVAudioSessionCategoryOptionAllowBluetooth选项若为其他Category属性值且isMPCenter为NO则设置Category属性值为AVAudioSessionCategoryPlayback选项为AVAudioSessionCategoryOptionMixWithOthers若为其他Category属性值且isMPCenter为YES则保持原来的设置不做任何更改。
*
* @param isMPCenter 是否初始化MPPlayerCenter0不初始化1初始化。此参数只在AVAudioSession的Category属性值不为AVAudioSessionCategoryPlayAndRecord时设置有效。
*/
+(void) initPlayingAudioSession:(BOOL)isMPCenter;
/**
* 初始化录音环境,主要用于识别录音器。
*
* 设置AVAudioSession的Category属性值为AVAudioSessionCategoryPlayAndRecord选项为AVAudioSessionCategoryOptionDefaultToSpeaker|AVAudioSessionCategoryOptionAllowBluetooth。
*
* @return 成功返回YES失败返回NO
*/
+(BOOL) initRecordingAudioSession;
@end