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

Interface to send share audio raw data. More...

#include <ZMVideoSDKShareHelper.h>

Inherits NSObject.

Instance Methods

(ZMVideoSDKErrors) - sendShareAudio:dataLength:sampleRate:audioChannel:
 Sends audio raw data.

Detailed Description

Interface to send share audio raw data.

Definition at line 188 of file ZMVideoSDKShareHelper.h.

Method Documentation

◆ sendShareAudio:dataLength:sampleRate:audioChannel:

- (ZMVideoSDKErrors) sendShareAudio: (char *_Nullable) data
dataLength: (unsigned int) length
sampleRate: (int) rate
audioChannel: (ZMVideoSDKAudioChannel) channel 

Sends audio raw data.

Parameters
dataThe audio data address.
lengthThe audio data length. It must be even numbers.
rateThe audio data sampling rate.
channelThe channel type. Default type is ZoomVideoSDKAudioChannel_Mono.
Returns
If the function succeeds, it returns ZMVideoSDKErrors_Success. Otherwise, this function returns an error.
Note
Support sample Rate 44100, 48000, 50000, or 50400.
  1. The size of a single input must not exceed the number of bytes corresponding to 100 ms of audio. Exceeding this limit returns ZMVideoSDKErrors_RAWDATA_SEND_TOO_MUCH_DATA_IN_SINGLE_TIME.
  2. Variable-length input is supported; it is recommended to send audio data in 10 ms, 20 ms, or 30 ms chunks (not exceeding 100 ms).
  3. If ZMVideoSDKErrors_RAWDATA_SEND_TOO_FREQUENTLY is returned, this is not a genuine error; please wait briefly before retrying—for example, sleep for 10 ms before attempting to send the data again.