继承自 agora_gaming_rtc.IAudioRecordingDeviceManager .
◆ CreateAAudioRecordingDeviceManager()
override bool agora_gaming_rtc.AudioRecordingDeviceManager.CreateAAudioRecordingDeviceManager |
( |
| ) |
|
◆ ReleaseAAudioRecordingDeviceManager()
override int agora_gaming_rtc.AudioRecordingDeviceManager.ReleaseAAudioRecordingDeviceManager |
( |
| ) |
|
◆ GetAudioRecordingDeviceCount()
override int agora_gaming_rtc.AudioRecordingDeviceManager.GetAudioRecordingDeviceCount |
( |
| ) |
|
获取系统中被索引的音频采集设备的总数。
- 返回
- 被索引的音频采集设备的总数。
◆ GetAudioRecordingDevice()
override int agora_gaming_rtc.AudioRecordingDeviceManager.GetAudioRecordingDevice |
( |
int |
index, |
|
|
ref string |
audioRecordingDeviceName, |
|
|
ref string |
audioRecordingDeviceId |
|
) |
| |
获取某个被索引的音频采集设备的指定信息。
调用该方法后,SDK 会根据索引获取音频采集设备的设备名称和设备 ID。
- 注解
- 在 GetAudioRecordingDeviceCount 方法后调用该方法。
- 参数
-
index | 指定的索引值,必须小于 GetAudioRecordingDeviceCount 的返回值。 |
audioRecordingDeviceName | 设备名称。 |
audioRecordingDeviceId | 设备 ID。 |
- 返回
-
◆ GetCurrentRecordingDevice()
override int agora_gaming_rtc.AudioRecordingDeviceManager.GetCurrentRecordingDevice |
( |
ref string |
deviceId | ) |
|
◆ SetAudioRecordingDeviceVolume()
override int agora_gaming_rtc.AudioRecordingDeviceManager.SetAudioRecordingDeviceVolume |
( |
int |
volume | ) |
|
设置音频采集设备音量。
- 参数
-
volume | 音频采集设备音量。取值可在 [0,255]。 |
- 返回
-
◆ GetAudioRecordingDeviceVolume()
override int agora_gaming_rtc.AudioRecordingDeviceManager.GetAudioRecordingDeviceVolume |
( |
| ) |
|
获取当前音频采集设备的音量。
- 返回
- ≥ 0: 方法调用成功则返回当前音频采集设备的音量。
- < 0: 方法调用失败。
◆ SetAudioRecordingDeviceMute()
override int agora_gaming_rtc.AudioRecordingDeviceManager.SetAudioRecordingDeviceMute |
( |
bool |
mute | ) |
|
静音采集设备。
- 参数
-
mute |
- true: 设备设为静音;
- false: 设备设为不静音。
|
- 返回
-
◆ IsAudioRecordingDeviceMute()
override bool agora_gaming_rtc.AudioRecordingDeviceManager.IsAudioRecordingDeviceMute |
( |
| ) |
|
获取当前音频采集设备的静音状态。
- 返回
- 当前音频采集设备的静音状态。
- true: 为静音状态;
- false: 为非静音状态。
◆ SetAudioRecordingDevice()
override int agora_gaming_rtc.AudioRecordingDeviceManager.SetAudioRecordingDevice |
( |
string |
deviceId | ) |
|
通过设备 ID 设置指定的音频采集设备。
- 注解
-
- 参数
-
deviceId | 设备 ID,可通过 GetAudioRecordingDevice 获取。 |
- 返回
-
◆ StartAudioRecordingDeviceTest()
override int agora_gaming_rtc.AudioRecordingDeviceManager.StartAudioRecordingDeviceTest |
( |
int |
indicationInterval | ) |
|
启动音频采集设备测试。
该方法测试音频采集设备是否能正常工作。
调用该方法后,SDK 会按设置的时间间隔触发 OnVolumeIndicationHandler,报告 uid = 0
及采集设备的音量信息。
调用该方法后,请确保调用 StopAudioRecordingDeviceTest 停止测试。
- 注解
- 该方法仅测试本地采集设备,不报告网络状态。
- 该方法需在加入频道前调用。
- 该方法仅适用于 Windows 和 macOS 平台。
- 参数
-
indicationInterval | OnVolumeIndicationHandler 回调的周期(毫秒)。 |
- 返回
-
◆ StopAudioRecordingDeviceTest()
override int agora_gaming_rtc.AudioRecordingDeviceManager.StopAudioRecordingDeviceTest |
( |
| ) |
|
◆ GetCurrentRecordingDeviceInfo()
override int agora_gaming_rtc.AudioRecordingDeviceManager.GetCurrentRecordingDeviceInfo |
( |
ref string |
deviceName, |
|
|
ref string |
deviceId |
|
) |
| |
获取当前音频采集设备的信息。
- 参数
-
deviceName | 当前采集设备的设备名称。 |
deviceId | 当前采集设备的设备 ID。 |
- 返回
-