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:
 Starts the microphone test. This starts recording the input from the mic. Once the recording is complete, stopMicTestRecording must be called to finish the recording.
 
(ZMVideoSDKErrors- stopMicTestRecording
 Stops the microphone test. Before calling this, successfully start the microphone test by calling startMicTestRecording. Otherwise this returns an error.
 
(ZMVideoSDKErrors- playMicTestRecording
 Plays the microphone recorded sound. Complete a microphone test by successfully executing startMicTestRecording and stopMicTestRecording before calling this. Otherwise this returns an error.
 
(ZMVideoSDKErrors- startSpeakerTest:
 Starts the speaker test.
 
(ZMVideoSDKErrors- stopSpeakerTest
 Stops the speaker test. Before calling this, successfully start the speaker test by calling startSpeakerTest. Otherwise this returns an error.
 
(ZMVideoSDKErrors- setTimerInterval:
 Sets the time interval for the audio test.
 

Detailed Description

Interface for testing audio input and output devices.

Definition at line 14 of file ZMVideoSDKAudioSettingHelper.h.

Method Documentation

◆ playMicTestRecording

- (ZMVideoSDKErrors) playMicTestRecording

Plays the microphone recorded sound. Complete a microphone test by successfully executing startMicTestRecording and stopMicTestRecording before calling this. Otherwise this returns an error.

Returns
If the function succeeds, it returns ZMVideoSDKErrors_Success. Otherwise, this function returns an error.

◆ setTimerInterval:

- (ZMVideoSDKErrors) setTimerInterval: (unsigned int) timerInterval

Sets 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:. This function modifies the time interval instead of 200, default is 200 ms. Accepted values between 50 to 1000 milliseconds.
Returns
If the function succeeds, it returns ZMVideoSDKErrors_Success. Otherwise, this function returns an error.
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

Starts the microphone test. This starts 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 returns an error, otherwise the SDK tests the specified device and sets it as selected.
Returns
If the function succeeds, it returns ZMVideoSDKErrors_Success. Otherwise, this function returns an error.
Note
The SDK will test the default device if no parameter is input.

◆ startSpeakerTest:

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

Starts the speaker test.

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

◆ stopMicTestRecording

- (ZMVideoSDKErrors) stopMicTestRecording

Stops the microphone test. Before calling this, successfully start the microphone test by calling startMicTestRecording. Otherwise this returns an error.

Returns
If the function succeeds, it returns ZMVideoSDKErrors_Success. Otherwise, this function returns an error.

◆ stopSpeakerTest

- (ZMVideoSDKErrors) stopSpeakerTest

Stops the speaker test. Before calling this, successfully start the speaker test by calling startSpeakerTest. Otherwise this returns an error.

Returns
If the function succeeds, it returns ZMVideoSDKErrors_Success. Otherwise, this function returns an error.