CNLiveAudioCapture.h
1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//
// CNLiveAudioCapture.h
// CNLivePlayer_Example
//
// Created by CNLive-zxw on 2019/8/21.
// Copyright © 2019 153993236@qq.com. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
* @abstract 噪声抑制等级
*/
typedef NS_ENUM(NSInteger, CNLiveAudioNoiseSuppress){
/// 关闭
CNLiveAudioNoiseSuppress_OFF = -1,
/// 温和
CNLiveAudioNoiseSuppress_LOW = 0,
/// 中等
CNLiveAudioNoiseSuppress_MEDIUM = 1,
/// 激进
CNLiveAudioNoiseSuppress_HIGH = 2,
/// 非常激进
CNLiveAudioNoiseSuppress_VERYHIGH = 3,
};
@interface CNLiveAudioCapture : NSObject
/**
@abstract 是否有耳机麦克风可用
@return 是/否有耳机麦克风
*/
+ (BOOL)isHeadsetPluggedIn;
/**
@abstract 是否播放采集的声音 (又称"耳返")
@warning 如果在没有插入耳机的情况下启动, 容易出现很刺耳的声音
*/
@property(nonatomic, assign) BOOL bPlayCapturedAudio;
/**
@abstract 设置mic采集的声音音量
@discussion 调整范围 0.0~1.0
*/
@property(nonatomic, assign) float micVolume;
/**
@abstract 设置耳返音量
@discussion 调整范围 0.0~1.0
*/
@property(nonatomic, assign) Float32 bPlayVolume;
/**
@abstract 混响类型
@discussion 目前提供了4种类型的混响场景, type和场景的对应关系如下
- 0 关闭
- 1 录音棚
- 2 KTV
- 3 小舞台
- 4 演唱会
*/
@property(nonatomic, assign) int reverbType;
/**
@abstract 音效类型
@discussion 目前提供了4种音效类型, type和音效的对应关系如下
- 0 关闭
- 1 大叔
- 2 萝莉
- 3 庄严
- 4 机器人
*/
@property (nonatomic, assign) int audioEffectType;
/**
@abstract 噪声抑制处理的等级(默认为CNLiveAudioNoiseSuppress_OFF)
@discussion 当启用噪声抑制处理后, 内部会进行输出音频数据的
*/
@property (nonatomic, assign) CNLiveAudioNoiseSuppress noiseSuppressionLevel;
@end
NS_ASSUME_NONNULL_END