startSpeakerDeviceTest method
Starting Speaker Testing (for Desktop OS)
This API is used to test whether the audio playback device functions properly by playing a specified audio file. If users can hear audio during testing, the device functions properly.
- Parameters:
- filePath(String):
- Path of the audio file.
- filePath(String):
Implementation
int startSpeakerDeviceTest(String filePath) {
if (_only_support_desktop) {
ffi.Pointer<ffi.Char> filePathPointer = filePath.toNativeUtf8().cast<ffi.Char>();
int result = _deviceFFIBindings.start_speaker_device_test(_nativePointer, filePathPointer);
calloc.free(filePathPointer);
return result;
} else {
debugPrint("device-manager-api not support");
return -1;
}
}