startAudioPlaybackDeviceTest method

FutureOr<int> startAudioPlaybackDeviceTest(
  1. String testAudioFilePath,
  2. int interval
)

@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.

Implementation

FutureOr<int> startAudioPlaybackDeviceTest(
    String testAudioFilePath, int interval) async {
  return await nativeCall(
      'startAudioPlaybackDeviceTest', [testAudioFilePath, interval]);
}