IAudioDeviceManager
Audio device management methods.
startPlaybackDeviceTest
Starts the audio playback device test.
abstract startPlaybackDeviceTest(testAudioFilePath: string): number;
This method tests whether the local audio playback device is working properly. After the test starts, the SDK plays the specified audio file. If the tester hears the sound, it indicates the playback device is functioning correctly.
After calling this method, the SDK triggers the onAudioVolumeIndication callback every 100 ms, reporting uid = 1 and the volume information of the playback device.
The difference between this method and startEchoTest is that this method checks whether the local audio playback device works properly, while the latter checks whether the audio/video devices and network are functioning properly.
Parameters
- testAudioFilePath
- The absolute path of the audio file. The path string must be in UTF-8 encoding.
- Supported file formats: wav, mp3, m4a, aac.
- Supported sampling rates: 8000, 16000, 32000, 44100, 48000.
Return Values
- 0: Success.
- < 0: Failure. See Error Codes for details and resolution suggestions.
stopPlaybackDeviceTest
Stops the audio playback device test.
abstract stopPlaybackDeviceTest(): number;
This method stops the audio playback device test. After calling startPlaybackDeviceTest, you must call this method to stop the test.
Return Values
- 0: Success.
- < 0: Failure. See Error Codes for details and resolution suggestions.