IRTCAudioDeviceManager class
- Inheritance
-
- Object
- NativeClass
- IRTCAudioDeviceManager
Properties
-
$resource
→ NativeResource
-
no setterinherited
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
ready
→ Future<void>
-
Whether the instance is initialized
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
destroy()
→ void
-
inherited
-
nativeCall<T>(String method, [List? args, NativeMethodMeta? meta])
→ Future<T>
-
Call instance method
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
sendInstanceGet<T>(String property)
→ Future<T>
-
Get instance property
inherited
-
sendInstancePropertiesGet(dynamic nativeClass)
→ Future<Map<String, dynamic>>
-
Get instance properties
inherited
-
sendInstanceSet(String property, dynamic value)
→ Future<void>
-
Set instance property
inherited
-
startAudioDeviceRecordTest(int interval)
→ FutureOr<int>
-
@detail api
@brief Start the capture and playback test for local audio devices.
@param interval During the test, you'll receive
enableAudioPropertiesReport periodically. Set the period in ms with this parameter. Recommended value is 200 ms; the minimal value is 10 ms.
@return result
- 0: success
- < 0: failure
@note
- The audio capturing stops in 30s after calling this API and begins to play the recording audio. Before that, you can call stopAudioDeviceRecordAndPlayTest{@link #IRTCAudioDeviceManager#stopAudioDeviceRecordAndPlayTest} to stop audio capturing and start playing the recording audio.
- Call stopAudioDevicePlayTest{@link #IRTCAudioDeviceManager#stopAudioDevicePlayTest} to stop the test, including capturing and playing the recording.
- You must stop the test before starting another test for audio devices.
- You must stop the test before calling enableAudioPropertiesReport.
- This test performs locally and does not involve network connection testing.
-
startAudioPlaybackDeviceTest(String testAudioFilePath, int interval)
→ FutureOr<int>
-
@detail api
@brief Start the playback test for the local audio device. RTC will start playing the audio file specified. And RTC will notify the audio volume via the
onAudioPlaybackDeviceTestVolume periodically.
@param testAudioFilePath Specify the path of the audio file for the playback test, including *.mp3, *.aac, *.m4a, *.3gp, and *.wav.
@param interval The time interval between each onAudioPlaybackDeviceTestVolume callback in milliseconds. We recommend setting it to 200 ms. The minimal value is 10 ms.
@return
- 0: Success
- < 0: Failure
@note
- You can call this API whether the user is in the room.
- Call stopAudioPlaybackDeviceTest{@link #IRTCAudioDeviceManager#stopAudioPlaybackDeviceTest} to stop the playback test before moving on to the other device tests.
-
stopAudioDevicePlayTest()
→ FutureOr<int>
-
@detail api
@brief Stop the capture and playback test for local audio devices which is started by calling startAudioDeviceRecordTest{@link #IRTCAudioDeviceManager#startAudioDeviceRecordTest}.
Before the test ends by itself, you can call this API to stop the recording or playing.
@return
- 0: Success
- < 0: Failure
-
stopAudioDeviceRecordAndPlayTest()
→ FutureOr<int>
-
@detail api
@brief Call this API to stop recording in the test and start to play the recording in 30 s after calling startAudioDeviceRecordTest{@link #IRTCAudioDeviceManager#startAudioDeviceRecordTest}.
@return Result
- 0: Success
- < 0: Failure
@note After calling this API, the recording starts playing during which you can call stopAudioDevicePlayTest{@link #IRTCAudioDeviceManager#stopAudioDevicePlayTest} to stop playing.
-
stopAudioPlaybackDeviceTest()
→ FutureOr<int>
-
@detail api
@author dixing
@brief Stop the playback test for the local audio device.
@return Result
- 0: Success
- < 0: Failure
@note Call this API to stop the playback test started by calling startAudioPlaybackDeviceTest{@link #IRTCAudioDeviceManager#startAudioPlaybackDeviceTest} before moving on to the other device tests.
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateResource(NativeResource resource)
→ void
-
inherited