Video SDK for MacOS API Reference
Loading...
Searching...
No Matches
ZMVideoSDKAudioDeviceTestHelper Class Reference

Interface for testing audio input and output devices. More...

#include <ZMVideoSDKAudioSettingHelper.h>

Inherits NSObject.

Instance Methods

(ZMVideoSDKErrors- startMicTestRecording:
 Start the microphone test. This will start recording the input from the mic. Once the recording is complete, stopMicTestRecording must be called to finish the recording.
 
(ZMVideoSDKErrors- stopMicTestRecording
 Stop the microphone test. Before calling this, you must have successfully started the microphone test by calling startMicTestRecording. Otherwise this returns an error.
 
(ZMVideoSDKErrors- playMicTestRecording
 Play the microphone recorded sound. You must complete a microphone test by successfully executing startMicTestRecording and stopMicTestRecording before calling this. Otherwise this returns an error.
 
(ZMVideoSDKErrors- startSpeakerTest:
 Start the speaker test.
 
(ZMVideoSDKErrors- stopSpeakerTest
 Stop the speaker test. Before calling this, you must have successfully started the speaker test by calling startSpeakerTest. Otherwise this returns an error.
 
(ZMVideoSDKErrors- setTimerInterval:
 Set the time interval for the audio test.
 

Detailed Description

Interface for testing audio input and output devices.

Definition at line 15 of file ZMVideoSDKAudioSettingHelper.h.

Method Documentation

◆ playMicTestRecording

- (ZMVideoSDKErrors) playMicTestRecording

Play the microphone recorded sound. You must complete a microphone test by successfully executing startMicTestRecording and stopMicTestRecording before calling this. Otherwise this returns an error.

Returns
If the function succeeds, it will return ZMVideoSDKErrors_Success.

◆ setTimerInterval:

- (ZMVideoSDKErrors) setTimerInterval: (unsigned int) timerInterval

Set the time interval for the audio test.

Parameters
timerIntervalUsually the SDK sends the mic and speaker volumes every 200 ms by default via onMicSpeakerVolumeChanged:(unsigned int)micVolume speakerVolume:. With this function, the user can modify the time interval instead of 200, default is 200 ms. Accepted values between 50 to 1000 milliseconds.
Returns
If the function succeeds, it will return ZMVideoSDKErrors_Success, otherwise failed.
Note
This interface will stop the mic or speaker test (if there is on ongoing). As a best practice, call it before the audio test.

◆ startMicTestRecording:

- (ZMVideoSDKErrors) startMicTestRecording: (NSString *) deviceID

Start the microphone test. This will start recording the input from the mic. Once the recording is complete, stopMicTestRecording must be called to finish the recording.

Parameters
deviceIDSpecify to test a microphone device. If the param is a wrong microphone ID, the SDK will return an error. Otherwise the SDK tests the specified device and sets it as selected.
Returns
If the function succeeds, it will return ZMVideoSDKErrors_Success, otherwise failed.
Note
The SDK will test the default device if no parameter is input.

◆ startSpeakerTest:

- (ZMVideoSDKErrors) startSpeakerTest: (nullable NSString *) deviceID

Start the speaker test.

Parameters
deviceIDSpecify to test a speaker device. If the param is a wrong speaker ID, the SDK will return an error. Otherwise the SDK tests the specified device and sets it as selected.
Returns
If the function succeeds, it will return ZMVideoSDKErrors_Success, otherwise failed.
Note
The SDK will test the default device if no parameter is input.

◆ stopMicTestRecording

- (ZMVideoSDKErrors) stopMicTestRecording

Stop the microphone test. Before calling this, you must have successfully started the microphone test by calling startMicTestRecording. Otherwise this returns an error.

Returns
If the function succeeds, it will return ZMVideoSDKErrors_Success.

◆ stopSpeakerTest

- (ZMVideoSDKErrors) stopSpeakerTest

Stop the speaker test. Before calling this, you must have successfully started the speaker test by calling startSpeakerTest. Otherwise this returns an error.

Returns
If the function succeeds, it will return ZMVideoSDKErrors_Success.