Inherits agora_gaming_rtc.IAudioRecordingDeviceManager.
The definition of AudioRecordingDeviceManager. The APIs of this class are only available on Windows and macOS.
◆ CreateAAudioRecordingDeviceManager()
override bool agora_gaming_rtc.AudioRecordingDeviceManager.CreateAAudioRecordingDeviceManager |
( |
| ) |
|
◆ ReleaseAAudioRecordingDeviceManager()
override int agora_gaming_rtc.AudioRecordingDeviceManager.ReleaseAAudioRecordingDeviceManager |
( |
| ) |
|
◆ GetAudioRecordingDeviceCount()
override int agora_gaming_rtc.AudioRecordingDeviceManager.GetAudioRecordingDeviceCount |
( |
| ) |
|
Retrieves the total number of the indexed audio capturing devices in the system.
- Returns
- Total number of the indexed audio capturing devices.
◆ GetAudioRecordingDevice()
override int agora_gaming_rtc.AudioRecordingDeviceManager.GetAudioRecordingDevice |
( |
int |
index, |
|
|
ref string |
audioRecordingDeviceName, |
|
|
ref string |
audioRecordingDeviceId |
|
) |
| |
Retrieves the audio capturing device associated with the index.
After calling this method, the SDK retrieves the device name and device ID according to the index.
- Note
- Call GetAudioRecordingDeviceCount before this method.
- Parameters
-
index | The index of the capturing device in the system. The value of index is associated with the number of the capturing device which is retrieved from GetAudioRecordingDeviceCount . For example, when the number of capturing devices is 3, the value range of index is [0,2]. |
audioRecordingDeviceName | The name of the capturing device for the corresponding index. |
audioRecordingDeviceId | The ID of the capturing device for the corresponding index. |
- Returns
- 0: Success.
- < 0: Failure.
◆ GetCurrentRecordingDevice()
override int agora_gaming_rtc.AudioRecordingDeviceManager.GetCurrentRecordingDevice |
( |
ref string |
deviceId | ) |
|
Retrieves the device ID of the current audio capturing device.
- Parameters
-
deviceId | The device ID of the current audio capturing device. |
- Returns
- 0: Success.
- < 0: Failure.
◆ SetAudioRecordingDeviceVolume()
override int agora_gaming_rtc.AudioRecordingDeviceManager.SetAudioRecordingDeviceVolume |
( |
int |
volume | ) |
|
Sets the volume of the current audio capturing device.
- Parameters
-
volume | The volume of the current audio capturing device. The value ranges between 0 (lowest volume) and 255 (highest volume). |
- Returns
- 0: Success.
- < 0: Failure.
◆ GetAudioRecordingDeviceVolume()
override int agora_gaming_rtc.AudioRecordingDeviceManager.GetAudioRecordingDeviceVolume |
( |
| ) |
|
Retrieves the volume of the current audio capturing device.
- Returns
- ≥ 0: The volume of the current audio capturing device, if this method call succeeds.
- < 0: Failure.
◆ SetAudioRecordingDeviceMute()
override int agora_gaming_rtc.AudioRecordingDeviceManager.SetAudioRecordingDeviceMute |
( |
bool |
mute | ) |
|
Sets whether to stop audio capturing.
- Parameters
-
mute | Sets whether to stop audio capturing.
- true: Stops.
- false: Doesn't stop.
|
- Returns
- 0: Success.
- < 0: Failure.
◆ IsAudioRecordingDeviceMute()
override bool agora_gaming_rtc.AudioRecordingDeviceManager.IsAudioRecordingDeviceMute |
( |
| ) |
|
Gets the status of the current audio capturing device.
- Returns
- Whether the current audio capturing device stops audio capturing.
- true: Stops.
- false: Doesn't stop.
◆ SetAudioRecordingDevice()
override int agora_gaming_rtc.AudioRecordingDeviceManager.SetAudioRecordingDevice |
( |
string |
deviceId | ) |
|
Sets the audio capturing device using the device ID.
- Note
- Call GetAudioRecordingDevice before this method.
- Plugging or unplugging the audio device does not change the device ID.
- Parameters
-
deviceId | Device ID of the audio capturing device, retrieved by calling GetAudioRecordingDevice . |
- Returns
- 0: Success.
- < 0: Failure.
◆ GetAudioRecordingDefaultDevice()
override int agora_gaming_rtc.AudioRecordingDeviceManager.GetAudioRecordingDefaultDevice |
( |
ref string |
deviceName, |
|
|
ref string |
deviceId |
|
) |
| |
Gets the default audio recording device of the system.
- Parameters
-
deviceName | The name of the system default audio recording device. |
deviceId | Pointer to the device ID of the audio recording device. |
- Returns
- 0: Success.
- < 0: Failure.
◆ StartAudioRecordingDeviceTest()
override int agora_gaming_rtc.AudioRecordingDeviceManager.StartAudioRecordingDeviceTest |
( |
int |
indicationInterval | ) |
|
Starts the test of the current audio capturing device.
This method tests whether the audio sampling device works properly.
After calling this method, the SDK triggers the OnVolumeIndicationHandler callback at the time interval set in this method, which reports uid = 0
and the volume of the sampling device.
- Note
- Ensure that you call StopAudioRecordingDeviceTest after calling this method.
- Call this method before joining a channel.
- This method is for Windows and macOS only.
- Parameters
-
indicationInterval | The time interval (ms) at which the OnVolumeIndicationHandler callback returns. We recommend a setting greater than 200 ms. This value must not be less than 10 ms; otherwise, you cannot receive the OnVolumeIndicationHandler callback. |
- Returns
- 0: Success.
- < 0: Failure.
◆ StopAudioRecordingDeviceTest()
override int agora_gaming_rtc.AudioRecordingDeviceManager.StopAudioRecordingDeviceTest |
( |
| ) |
|
Stops the test of the current audio capturing device.
- Note
- Ensure that you call this method to stop the test after calling StartAudioRecordingDeviceTest.
- Returns
- 0: Success.
- < 0: Failure.
◆ GetCurrentRecordingDeviceInfo()
override int agora_gaming_rtc.AudioRecordingDeviceManager.GetCurrentRecordingDeviceInfo |
( |
ref string |
deviceName, |
|
|
ref string |
deviceId |
|
) |
| |
Retrieves the device information of the current audio capturing device.
- Parameters
-
deviceName | The device name of the current audio capturing device. |
deviceId | The device ID of the current audio capturing device. |
- Returns
- 0: Success.
- < 0: Failure.
◆ FollowSystemRecordingDevice()
override int agora_gaming_rtc.AudioRecordingDeviceManager.FollowSystemRecordingDevice |
( |
bool |
enable | ) |
|
Sets the audio recording device used by the SDK to follow the system default audio recording device.
- Since
- v3.6.1.1
- Parameters
-
enable | Whether to follow the system default audio recording device:
- true: Follow. The SDK immediately switches the audio recording device when the system default audio recording device changes.
- false: Do not follow. The SDK switches the audio recording device to the system default audio recording device only when the currently used audio recording device is disconnected.
|
- Returns
- 0: Success.
- < 0: Failure.