Functional APIs

API List

  • IThunderEngine

Global FunctionFunction Name
Thunder::IThunderEngine*createEngine()
Public Member FunctionsFunction Name
virtual voiddestroyEngine() = 0
virtual intinitialize(const char* appId, int sceneId, IThunderEventHandler* pHandler) = 0
virtual intsetArea(AREA_TYPE area) = 0
virtual intjoinRoom(const char* token, int tokenLen, const char* roomId, const char* uid) = 0
virtual intleaveRoom() = 0
virtual intupdateToken(const char* token, int tokenLen) = 0
virtual intsetMediaMode(THUNDER_PROFILE mode) = 0
virtual intsetRoomMode(ROOM_CONFIG_TYPE mode) = 0
virtual intsetAudioConfig(AUDIO_PROFILE_TYPE profile, COMMUT_MODE commutMode, SCENARIO_MODE scenarioMode) = 0
virtual intsetAudioSourceType(ThunderSourceType sourceType) = 0
virtual intstopLocalAudioStream(bool stop) = 0
virtual intstopAllRemoteAudioStreams(bool stop) = 0
virtual intstopRemoteAudioStream(const char* uid, bool stop) = 0
virtual intsetAudioVolumeIndication(int interval, int smooth) = 0
virtual intenableLoopbackRecording(bool enabled) = 0
virtual intstartAudioRecording(const char* fileName, AUDIO_RECORDING_FILE_TYPE fileType, AUDIO_RECORDING_QUALITY_TYPE quality) = 0
virtual intstopAudioRecording() = 0
virtual intadjustRecordingSignalVolume(int volume) = 0
virtual intadjustPlaybackSignalVolume(int volume) = 0
virtual IAudioDeviceManager*getAudioDeviceMgr() = 0
virtual boolregisterAudioFrameObserver(IAudioFrameObserver* observer) = 0
virtual intsetRecordingAudioFrameParameters(int sampleRate, int channel, ThunderAudioRawFrameOperationMode mode, int samplesPerCall) = 0
virtual intsetPlaybackAudioFrameParameters(int sampleRate, int channel, ThunderAudioRawFrameOperationMode mode, int samplesPerCall) = 0
virtual intsetLogFilePath(const char* filePath) = 0
virtual intsetLogLevel(LOG_FILTER filter) = 0
virtual intregisterVideoFrameObserver(IVideoFrameObserver* observer) = 0
virtual IVideoDeviceManager*getVideoDeviceMgr() = 0
virtual intsetVideoEncoderConfig(const VideoEncoderConfiguration& config) = 0
virtual intsetLocalVideoCanvas(const VideoCanvas& canvas) = 0
virtual intsetRemoteVideoCanvas(const VideoCanvas& canvas) = 0
virtual intsetLocalCanvasScaleMode(VideoRenderMode mode) = 0
virtual intsetRemoteCanvasScaleMode(VideoRenderMode mode) = 0
virtual intstartVideoPreview() = 0
virtual intstopVideoPreview() = 0
virtual intenableLocalVideoCapture(bool enabled) = 0
virtual intstopLocalVideoStream(bool stop) = 0
virtual intstopRemoteVideoStream(const char* uid, bool stop) = 0
virtual intstopAllRemoteVideoStreams(bool stop) = 0
virtual intsetLocalVideoMirrorMode(ThunderVideoMirrorMode mode) = 0
virtual intsetVideoWatermark(const ThunderBoltImage& watermark) = 0
virtual intremoveVideoWatermarks() = 0
virtual intsetCustomAudioSource(bool bEnable, CustomAudioOptions& option) = 0
virtual intpushCustomAudioFrame(const char* pData, unsigned dataLen, unsigned timeStamp) = 0
virtual intsetCustomVideoSource(bool bEnable, CustomVideoOptions& option) = 0
virtual intpushCustomVideoFrame(const unsigned char* yuv[3], int linesize[3], unsigned timestamp) = 0
virtual intaddPublishOriginStreamUrl(const char* url) = 0
virtual intremovePublishOriginStreamUrl(const char* url) = 0
virtual intsetLiveTranscodingTask(const char* taskId, const LiveTranscoding& transcodingCfg) = 0
virtual intremoveLiveTranscodingTask(const char* taskId) = 0
virtual intaddPublishTranscodingStreamUrl(const char* taskId, const char* url) = 0
virtual intremovePublishTranscodingStreamUrl(const char* taskId, const char* url) = 0
virtual intaddSubscribe(const char* roomId, const char* uid) = 0
virtual intremoveSubscribe(const char* roomId, const char* uid) = 0
virtual intenableWebSdkCompatibility(bool enabled) = 0
virtual intsendUserAppMsgData(const char* msgData) = 0
virtual intsendMediaExtraInfo(const char* extraData) = 0
virtual intenableMixVideoExtraInfo(bool enabled) = 0
virtual intstartScreenCaptureForHwnd(HWND hWnd, const RECT* pRect) = 0
virtual intstartScreenCaptureForScreen(int screenId, const RECT* pRect) = 0
virtual intupdateScreenCaptureRect(const RECT* pRect) = 0
virtual intstopScreenCapture() = 0
virtual intpauseScreenCapture() = 0
virtual intresumeScreenCapture() = 0
virtual intregisterVideoCaptureObserver(IVideoCaptureObserver* observer) = 0
virtual intregisterMediaExtraInfoObserver(IThunderMediaExtraInfoObserver* observer) = 0
virtual IThunderAudioPlayer*createThunderAudioPlayer() = 0
virtual voiddestroyThunderAudioPlayer(IThunderAudioPlayer* player) = 0
virtual intgetVideoEncoderParam(const VideoEncoderConfiguration& configIn, ThunderVideoEncodeParam& paramOut) = 0
virtual ThunderConnectionStatusgetConnectionStatus() = 0
virtual intenableCaptureVolumeIndication(int interval, int moreThanThd, int lessThanThd, int smooth) = 0
virtual boolcheckFeatureSupport(FEATURE_SUPPORT flag) = 0
virtual intsetCaptureExcludeWindowList(HWND* wndList, int count) = 0
virtual intenableVoiceReverb(bool enabled) = 0
virtual intsetReverbParameter(const ReverbParameter& parameter) = 0
virtual intenableLimiter(bool enabled) = 0
virtual intsetLimiterParameter(const LimiterParameter& parameter) = 0
virtual intenableEqualizer(bool enabled) = 0
virtual intsetEqualizerParameter(const EqualizerParameter& parameter) = 0
virtual intsetVoicePitch(float pitch) = 0
virtual intenableHowlingDetector(bool enabled) = 0
virtual intenableEchoDetector(bool enabled) = 0
  • IAudioDeviceManager

Public Member FunctionFunction Name
virtual intenumInputDevices(AudioDeviceList& devices) = 0
virtual intsetInputtingDevice(GUID& id) = 0
virtual intgetInputtingDevice(GUID& id) = 0
virtual intsetInputtingVolume(int volume) = 0
virtual intgetInputtingVolume(int& volume) = 0
virtual intsetInputtingMute(bool mute) = 0
virtual intgetInputtingMute(bool& mute) = 0
virtual intstartInputDeviceTest(int indicationInterval) = 0
virtual intstopInputDeviceTest() = 0
virtual intenumOutputDevices(AudioDeviceList& devices) = 0
virtual intsetOutputtingDevice(GUID& id) = 0
virtual intgetOutputtingDevice(GUID& id) = 0
virtual intsetOuttingVolume(int volume) = 0
virtual intgetOuttingVolume(int& volume) = 0
virtual intsetOutputtingMute(bool mute) = 0
virtual intgetOutputtingMute(bool& mute) = 0
virtual intstartOutputDeviceTest(int indicationInterval, const char* audioFileName) = 0
virtual intstopOutputDeviceTest() = 0
virtual intenableMicEnhancement(bool enabled) = 0
virtual intenableMicDenoise(bool enabled) = 0
virtual intenableAEC(bool enabled) = 0
virtual intenableAGC(bool enabled) = 0
  • IThunderAudioPlayer

Public Member FunctionFunction Name
virtual boolopen(const char* path) = 0
virtual voidclose() = 0
virtual voidplay() = 0
virtual voidstop() = 0
virtual voidpause() = 0
virtual voidresume() = 0
virtual voidseek(unsigned int timeMS) = 0
virtual unsigned intgetTotalPlayTimeMS() = 0
virtual unsigned intgetCurrentPlayTimeMS() = 0
virtual intsetPlayerLocalVolume(int volume) = 0
virtual intsetPlayerPublishVolume(int volume) = 0
virtual intgetPlayerLocalVolume() = 0
virtual intgetPlayerPublishVolume() = 0
virtual intsetLooping(int cycle) = 0
virtual voidsetSemitone(int val) = 0
virtual voidsetTempo(float val) = 0
virtual voidsetPosition(int azimuth) = 0
virtual voidSetFilePlayerNotify(IThunderAudioPlayerNotify* notify) = 0
  • IVideoDeviceManager

Public Member FunctionFunction Name
virtual intenumVideoDevices(VideoDeviceList& devices) = 0
virtual intstartVideoDeviceCapture(int deviceIdx) = 0
virtual intstopVideoDeviceCapture() = 0
virtual intenumMonitorDevices(MonitorDeviceList& devices) = 0

API Details

IThunderEngine

IThunderEngine::createEngine

EXTERN_C
{
 __declspec(dllimport) Thunder::IThunderEngine* createEngine();
};

Create the Thunder:: IThunderEngine instance.

Notes:

  • It is recommended that this instance be created upon initialization by calling the IThunderEngine::initialize.
  • Currently, the SDK only supports one IThunderEngine instance, meaning that each application can only create one IThunderEngine object.
  • Unless otherwise specified, all API functions of ThunderEngine are called asynchronously, and the API is called in the same thread.
Return

Pointer directing to the object of Thunder::IThunderEngine object


IThunderEngine::destroyEngine

virtual void Thunder::IThunderEngine::destroyEngine();

Destroy the Thunder::IThunderEngine instance.

Description
  • This API releases all resources used by the SDK.
  • Call this API for applications in which users occasionally make audio or video calls. When users do not make calls, you can free up resources for other operations.
  • Once destroyEngine is called, the user cannot use functions of this instance and event notification will not be triggered any more.
  • To re-enable communication, call createEngine again to create a new IThunderEngine instance.

IThunderEngine::initialize

virtual int Thunder::IThunderEngine::initialize(const char* appId, int sceneId, IThunderEventHandler* pHandler);

Initialize the engine.

Notes:

  • Only users with the same AppId can communicate with one another.
  • Call this API after an instance has been created. This API is reset only when destroyEngine is called.
Parameters
ParameterTypeDescription
appIdINApplication ID issued for application developers. It can be obtained on the official website.
sceneIdINID for scenarios customized by developers. It details service scenarios and can be collected with more details based on scenarios. If not required, set it to 0.
pHandlerINObject pointer of IThunderEventHandler. The SDK uses this abstract class for various runtime event callback.
Return

IThunderEngine::setArea

virtual int Thunder::IThunderEngine::setArea(AREA_TYPE area);

Set a user's country/region.

To accommodate to different laws and regulations at home and abroad, CS2 NETWORK has central systems each for domestic (default) and international users. Set area as follows:

  • If applications are mainly conducted overseas, set the area to abroad via this API. Users in one central system (domestic or abroad) cannot communicate with ones in the other, so you must be sure that users in the same room are also in the same system.
  • The two systems are deployed globally, supporting global access.

Notes:

  • This API takes effect only when it is called before joinRoom.
  • It is required for international users.
  • It can only be reset by calling destroyEngine.
Parameters
ParameterTypeDescription
areaINRegion type is domestic by default. See details in AREA_TYPE.
Return

IThunderEngine::joinRoom

virtual int Thunder::IThunderEngine::joinRoom(const char* token, int tokenLen, const char* roomName, const char* uid);

Join a room.

You can call this API to join a (audio/video) call room. Users in the same room can communicate with each other. When multiple users join a room, it starts a group chat.

You must call leaveRoom to the current call before joining another room.

Notes:

  • It can only be called after (initialize).
  • The applications with different AppIDs cannot communicate with each other.
  • Successful function return only indicates that the request has executed successfully. Successful joining of a room is indicated by the callback onJoinRoomSuccess.
Parameters
ParameterTypeDescription
tokenINToken for authentication. See details in User Authentication Description on the official website.
tokenLenINToken length
roomNameINRoom ID (unique to each application ID), which only supports a combination of characters such as [A,Z],[a,z],[0,9],-,_, and cannot exceed 64 bytes.
uidINUser ID, which only supports a combination of characters such as [A,Z],[a,z],[0,9],-,_, and cannot exceed 64 bytes.
Return

IThunderEngine::leaveRoom

virtual int Thunder::IThunderEngine::leaveRoom();

Exit a room to end a call.

Notes:

  • It can only be called after (initialize).
  • Once joinRoom is called, you have to call leaveRoom to end the call before joining another one. Whether you are in a call or not, leaveRoom can be called to end the call and release all related resources.
Return

IThunderEngine::updateToken

virtual int Thunder::IThunderEngine::updateToken(const char* token, int tokenLen);

Update the token.

Notes:

  • It can only be called after (initialize).
  • Successful function return only indicates that the request has executed successfully. Successful joining of a room is indicated by the callback onJoinRoomSuccess.

Token is used for authentication. Recommended token format is as follows. See details in Authentication Access Manual.

uint16uint32uint64uint64uint32uint16nBytes20 Bytes
TokenLenAppIduidTimeStamp(ms)ValidTime(s)BizExtInfoLenBizExtInfoDataDigitalSignature

Please refer to the following explanation:

  1. The multi-byte integer uses network byte order, generally big endian.
  2. TokenLen: the length of the whole token includes its 2 bytes and abstract.
  3. Token expiration time=Timestamp+ValidTime*1000, the UTC time in millisecond since 1970.
  4. BizExtInfoData: service authentication extension information should be customized by the service personnel.
  5. DigitalSignature: digital signature adopts the hmac-sha1 algorithm to calculate all data before DigitalSignature to get the [TokenLen,BizExtInfoData]. AppSecret distributed in application of AppId is used as the key.
  6. Token has to be transmitted by HTTP, so the entire token must be encoded by URL base64. Note that URL encoding is not performed for the whole base64.
Parameter
ParameterTypeDescription
tokenINToken for authentication. See details in User Authentication Description.
tokenLenINToken length
Return

IThunderEngine::setMediaMode

virtual int Thunder::IThunderEngine::setMediaMode(THUNDER_PROFILE mode);

Set media format. PROFILE_NORMAL is used by the SDK by default.

Notes:

Parameters
ParameterTypeDescription
modeINMedia mode. See details in Thunder::THUNDER_PROFILE.
Return

IThunderEngine::setRoomMode

virtual int Thunder::IThunderEngine::setRoomMode(ROOM_CONFIG_TYPE mode);

Set room mode. ROOM_CONFIG_LIVE is used by the SDK by default.

Notes:

Parameters
ParameterTypeDescription
modeINRoom mode. See details in Thunder::ROOM_CONFIG_TYPE.
Return

IThunderEngine::setAudioConfig

virtual int Thunder::IThunderEngine::setAudioConfig(AUDIO_PROFILE_TYPE profile, COMMUT_MODE commutMode, SCENARIO_MODE scenarioMode);

Set audio parameters and application scenarios.

Notes:

Parameters
ParameterTypeDescription
profileINAudio type. See details in Thunder::AUDIO_PROFILE_TYPE.
commuModeINCommunication mode. See details in Thunder::COMMUT_MODE.
scenarioModeINScenario mode. See details in Thunder::SCENARIO_MODE.
Return

IThunderEngine::setAudioSourceType

virtual int Thunder::IThunderEngine::setAudioSourceType(ThunderSourceType sourceType);

Set audio publishing type.

Notes:

Parameters
ParameterTypeDescription
sourceTypeINAudio publishing mode. See details in Thunder::ThunderSourceType.
Return

IThunderEngine::stopLocalAudioStream

virtual int Thunder::IThunderEngine::stopLocalAudioStream(bool stop);

Stop/start audio publishing (including enabling capture, encoding and stream pushing).

Notes:

  • It can only be called after (joinRoom).
Parameters
ParameterTypeDescription
StopINtrue: close local audio; false: open local audio
Return

IThunderEngine::stopAllRemoteAudioStreams

virtual int Thunder::IThunderEngine::stopAllRemoteAudioStreams(bool stop);

Stop/resume receiving all remote audio streams. Operate this API according to the following rules:

  • By default, the SDK receives all audio data.
  • When setting "stop" to "false", all audio streams in the room will be subscribed to automatically. You can unsubscribe to a specific stream by calling stopRemoteAudioStream.
  • When setting "stop" to "true", no audio stream in the room will be subscribed to. You can subscribe to a specific stream by calling stopRemoteAudioStream.

Notes:

  • It can only be called after (initialize). This API is reset only when destroyEngine is called.
  • Determine whether to receive or disable remote users. Check the value of stopRemoteAudioStream first. If no value is found, use the value of this function.
Parameters
ParameterTypeDescription
StopINtrue: stop; false: start
Return

IThunderEngine::stopRemoteAudioStream

virtual int Thunder::IThunderEngine::stopRemoteAudioStream(const char* uid, bool stop);

Stop/resume receiving audio data of specified users.

Notes:

  • It can only be called after (joinRoom). This API is reset only when destroyEngine is called.
  • Determine whether to receive or disable remote users. Check the value of this function first. If no value is found, use the value of stopRemoteAudioStream.
Parameters
ParameterTypeDescription
uidINUser ID
StopINtrue: stop user audio, false: receive user audio
Return

IThunderEngine::setAudioVolumeIndication

virtual int Thunder::IThunderEngine::setAudioVolumeIndication(int interval, int smooth);

Enable speaker volume prompt. This API enables the SDK to send the application feedback on who is speaking and at what volume regularly.

Notes:

  • It can only be called after (initialize). This API is reset only when destroyEngine is called.
  • After this API is called, an onPlayVolumeIndication notification will be received once anyone speaks in the room.
  • The volume carried in the notification does not include sound volume collected by the local microphone or played by files.
Parameters
ParameterTypeDescription
intervalINNotification interval. The default value is 0
<=0: The volume prompt is disabled
>0: Notification interval (ms) (a value greater than 200 is recommended)
smoothINSmooth coefficient, unrealized
Return

IThunderEngine::enableLoopbackRecording

virtual int Thunder::IThunderEngine::enableLoopbackRecording(bool enabled);

Enable/disable sound card recording.

Notes:

Parameters
ParameterTypeDescription
enabledINtrue: sound card recording; false: disable sound card recording
Return

IThunderEngine::startAudioRecording

virtual int Thunder::IThunderEngine::startAudioRecording(const char* fileName,
                                                         AUDIO_RECORDING_FILE_TYPE fileType,
                                                         AUDIO_RECORDING_QUALITY_TYPE quality);

Start audio recording.

Notes:

Parameters
ParameterTypeDescription
fileNameINRecording file name (with full path and excluding filename extension generated based on fileType
fileTypeINFile format. See details in Thunder::AUDIO_RECORDING_FILE_TYPE.
qualityINRecording quality. See details in Thunder::AUDIO_RECORDING_QUALITY_TYPE.
Return

IThunderEngine::stopAudioRecording

virtual int Thunder::IThunderEngine::stopAudioRecording();

Stop audio recording.

Notes:

Return

IThunderEngine::adjustRecordingSignalVolume

virtual int Thunder::IThunderEngine::adjustRecordingSignalVolume(int volume);

Set recording volume.

Notes:

Parameters
ParameterTypeDescription
volumeINVolume, range [0--400.]
Return

IThunderEngine::adjustPlaybackSignalVolume

virtual int Thunder::IThunderEngine::adjustPlaybackSignalVolume(int volume);

Set playing volume.

Notes:

Parameters
ParameterTypeDescription
volumeINVolume, range [0--400.]
Return

IThunderEngine::getAudioDeviceMgr

virtual Thunder::IAudioDeviceManager* Thunder::IThunderEngine::getAudioDeviceMgr();

Get the instance object of audio device management API.

Notes:

Return

IThunderEngine::registerAudioFrameObserver

virtual int Thunder::IThunderEngine::registerAudioFrameObserver(IAudioFrameObserver* observer);

Register audio frame data observer IAudioFrameObserver.

Notes:

  • It can only be called after (initialize).
  • Users need to extend IAudioFrameObserver and implement the virtual methods within. Related raw audio data are called through these methods.
Parameters
ParameterTypeDescription
observerINObject pointer of Pointer of the IAudioFrameObserver. Registration is canceled if it is set to null.
Return

IThunderEngine::setRecordingAudioFrameParameters

virtual int Thunder::IThunderEngine::setRecordingAudioFrameParameters(int sampleRate,
 int channel,
 ThunderAudioRawFrameOperationMode mode,
 int samplesPerCall);

Set raw data mode for audio recording during callback onRecordAudioFrame.

Notes:

Parameters
ParameterTypeDescription
sampleRateINSampling rate
channelINAudio channel; 1: single channel; 2: dual channel
modeINMode of Mode of using onRecordAudioFrame. See details in Thunder::ThunderAudioRawFrameOperationMode.
samplesPerCallINSpecify sampling number of data returned in onRecordAudioFrame. For example, usually the sampling number in applications of transcoding stream pushing is 1024. samplesPerCall = (int)(sampleRate × sampleInterval), in which: sampleInterval ≥ 0.01 (s).
Return

IThunderEngine::setPlaybackAudioFrameParameters

virtual int Thunder::IThunderEngine::setPlaybackAudioFrameParameters(int sampleRate,
 int channel,
 ThunderAudioRawFrameOperationMode mode,
 int samplesPerCall);

Set raw data mode for audio playing during callback onPlaybackAudioFrame.

Notes:

Parameter
ParameterTypeDescription
sampleRateINSampling rate
channelINAudio channel; 1: single channel; 2: dual channel
modeINMode of Mode of using onPlaybackAudioFrame. See details in Thunder::ThunderAudioRawFrameOperationMode.
samplesPerCallINSpecify sampling number of data returned in onPlaybackAudioFrame. For example, usually the sampling number in applications of transcoding stream pushing is 1024. samplesPerCall = (int)(sampleRate × sampleInterval), in which: sampleInterval ≥ 0.01 (s).
Return

IThunderEngine::setLogFilePath

virtual int Thunder::IThunderEngine::setLogFilePath(const char* filePath);

Set directory for the SDK to output log files.

Notes:

  • Ensure that the specified directory has write permission.
Parameters
ParameterTypeDescription
filePathINComplete log file directory
Return

IThunderEngine::setLogLevel

virtual int Thunder::IThunderEngine::setLogLevel(LOG_FILTER filter);

Set log saving level. Logs with lower level (LogLevel) will be filtered. Only logs with levels equal to or larger than this value will be recorded.

Parameters
ParameterTypeDescription
filterINSee details about the log filtering level in Thunder::LOG_FILTER.
Return

IThunderEngine::registerVideoFrameObserver

virtual int Thunder::IThunderEngine::registerVideoFrameObserver(IVideoFrameObserver* observer);

Register video frame data observer IVideoFrameObserver.

Notes:

  • DIt can only be called after (initialize).
  • Users need to extend IVideoFrameObserver and implement the virtual methods within. Related raw audio data are called through these methods.
Parameters
ParameterTypeDescription
observerINObject pointer of Pointer of the IVideoFrameObserver. Registration is canceled if it is set to null.
Return

IThunderEngine::getVideoDeviceMgr

virtual Thunder::IVideoDeviceManager* Thunder::IThunderEngine::getVideoDeviceMgr();

Register video frame data observer IVideoFrameObserver.

Notes:

Return

IThunderEngine::setVideoEncoderConfig

virtual int Thunder::IThunderEngine::setVideoEncoderConfig(const VideoEncoderConfiguration& config);

Set video encoding configuration. Details:

  • The SDK will obtain specific parameters for encoding video from the configuration server. If you have special parameter requirements for encoding video, contact customer support for personalized configuration.
  • If the video has been published, update the video encoding parameters. The updated video effect can be seen from local review and remote subscription.

Notes:

Parameters
ParameterTypeDescription
configINSpecific encoding configuration. See details in Thunder::VideoEncoderConfiguration.
Return

IThunderEngine::setLocalVideoCanvas

virtual int Thunder::IThunderEngine::setLocalVideoCanvas(const VideoCanvas& canvas);

Set the rendering view of local videos.

  • If this window is not set, you can still preview and publish.
  • You can view locally captured pictures by setting this window.

Notes:

Parameters
ParameterTypeDescription
canvasINReference of rendering object VideoCanvas
Return

IThunderEngine::setRemoteVideoCanvas

virtual int Thunder::IThunderEngine::setRemoteVideoCanvas(const VideoCanvas& canvas);

Set remote video rendering.

  • If this window is not set, you can still subscribe.
  • By setting this window, you can see the corresponding video of remote users who subscribed.

Notes:

Parameters
ParameterTypeDescription
canvasINReference of specific rendering object VideoCanvas
Return

IThunderEngine::setLocalCanvasScaleMode

virtual int Thunder::IThunderEngine::setLocalCanvasScaleMode(VideoRenderMode mode);

Set local view mode.

Notes:

Parameters
ParameterTypeDescription
modeINRendering mode. See details in Thunder::VideoRenderMode
Return

IThunderEngine::setRemoteCanvasScaleMode

virtual int Thunder::IThunderEngine::setRemoteCanvasScaleMode(VideoRenderMode mode);

Set remote view mode.

Notes:

Parameters
ParameterTypeDescription
modeINRendering mode. See details in Thunder::VideoRenderMode
Return

IThunderEngine::startVideoPreview

virtual int Thunder::IThunderEngine::startVideoPreview();

Enable camera video preview.

Notes:

Parameters
ParameterTypeDescription
modeINRendering mode. See details in Thunder::VideoRenderMode
Return

IThunderEngine::stopVideoPreview

virtual int Thunder::IThunderEngine::stopVideoPreview();

Disable camera video preview.

Notes:

Parameters
ParameterTypeDescription
modeINRendering mode. See details in Thunder::VideoRenderMode
Return

IThunderEngine::enableLocalVideoCapture

virtual int Thunder::IThunderEngine::enableLocalVideoCapture(bool enabled);

Enable/disable local video capture.

Notes:

Parameter
ParameterTypeDescription
enabledINtrue: enable local video capture;
false: disable local video capture
Return

IThunderEngine::stopLocalVideoStream

virtual int Thunder::IThunderEngine::stopLocalVideoStream(bool stop);

Enable/disable local video transmission.

Notes:

Parameters
ParameterTypeDescription
StopINTrue: disable local video transmission; false: enable local video transmission
Return

IThunderEngine::stopRemoteVideoStream

virtual int Thunder::IThunderEngine::stopRemoteVideoStream(const char* uid, bool stop);

Stop/resume receiving specified remote video.

Notes: It can only be called after (initialize). This API is reset only when destroyEngine is called

  • Determine whether to receive or disable remote users. Check the value of this function first. If no value is found, use the value of stopAllRemoteVideoStreams.
Parameters
ParameterTypeDescription
uidINUser ID
StopINtrue: stop remote video of a specified user; false: receive remote video of a specified user
Return

IThunderEngine::stopAllRemoteVideoStreams

virtual int Thunder::IThunderEngine::stopAllRemoteVideoStreams(bool stop);

Stop/resume receiving all remote videos.

Notes:

  • It can only be called after (initialize). This API is reset only when destroyEngine is called.
  • Determine whether to receive or disable remote users. Check the value of stopRemoteVideoStream first. If no value is found, use the value of this function.
Parameters
ParameterTypeDescription
StopINtrue: stop all remote video streams; false; receive all remote video streams. The default value is false

Return

IThunderEngine::setLocalVideoMirrorMode

virtual int Thunder::IThunderEngine::setLocalVideoMirrorMode(ThunderVideoMirrorMode mode);

Set local video mirror mode.

Notes:

  • It can only be called after (initialize). This API is reset only when destroyEngine is called.
  • Set mirror mode of local preview and videos visible to viewers, which takes effect immediately.
Parameters
ParameterTypeDescription
modeINMirror mode. See details in Thunder::ThunderVideoMirrorMode
Return

IThunderEngine::setVideoWatermark

virtual int Thunder::IThunderEngine::setVideoWatermark(const Thunder::ThunderBoltImage& watermark);

Add local video watermark.

Notes:

  • It can only be called after (initialize).
  • Currently, only one watermark is supported. A newly added watermark will replace the former one.
  • Only 24-bit and 32-bit pictures are supported. The SDK will transform the pictures to the configured width.
Parameters
ParameterTypeDescription
watermarkINReference of watermark picture object to be added to local live stream pushing. See details about the picture format in Thunder::ThunderBoltImage
Return

IThunderEngine::removeVideoWatermarks

virtual int Thunder::IThunderEngine::removeVideoWatermarks();

Remove the local video watermark.

Notes:

Return

IThunderEngine::setCustomAudioSource

virtual int Thunder::IThunderEngine::setCustomAudioSource(bool bEnable, CustomAudioOptions& option);

Set external audio capture parameters.

Notes:

Parameters
ParameterTypeDescription
bEnableINtrue: enable external audio capture
false: disable external audio capture (by default)
optionINExternal audio capture parameters. It is the reference of CustomAudioOptions
Return

IThunderEngine::pushCustomAudioFrame

virtual int Thunder::IThunderEngine::pushCustomAudioFrame(const char* pData, unsigned dataLen, unsigned timeStamp);

Push external audio frames.

Notes:

Parameters
ParameterTypeDescription
pDataINPCM audio frame data
dataLenINData length
timeStampINCapture timestamp
Return

IThunderEngine::setCustomVideoSource

virtual int Thunder::IThunderEngine::setCustomVideoSource(bool bEnable, CustomVideoOptions& option)

Set external video capture parameters.

Notes:

Parameters
ParameterTypeDescription
bEnableINtrue: enable external audio capture
false: disable external audio capture (default)
optionINExternal video capture parameter. It is the reference of CustomVideoOptions
Return

IThunderEngine::pushCustomVideoFrame

virtual int Thunder::IThunderEngine::pushCustomVideoFrame(const unsigned char* yuv[3], int linesize[3], unsigned timestamp);

Push external video frames.

Notes:

Parameters
ParameterTypeDescription
yuvINYUV video data
linesizeINLine width of the buffer zone in YUV data
timestampINCapture timestamp
Return

IThunderEngine::addPublishOriginStreamUrl

virtual int Thunder::IThunderEngine::addPublishOriginStreamUrl(const char* url);

Add a source stream pushing address.

  • After this API is called, the server will push source streams to the matching URL after publishing. Only one-channel stream pushing address can be added each time. If multi-channel streams need to be pushed, this API has to be called repeatedly.

Notes:

-It can be called after joining the room (joinRoom). The configuration will be cleared after you exit the room.

  • A maximum of 5 addresses are supported for stream pushing.
Parameters
ParameterTypeDescription
urlINStream pushing address, in RTMP format. The value does not support special characters including Chinese and the length cannot exceed 512 bytes. Note: some CDN manufacturers may not support 512 bytes; for example, Alibaba Cloud only supports 256 bytes.
Return

IThunderEngine::removePublishOriginStreamUrl

virtual int Thunder::IThunderEngine::removePublishOriginStreamUrl(const char* url);

Remove the source stream pushing address.

Parameters
ParameterTypeDescription
urlINStream pushing address, in RTMP format. The value does not support special characters including Chinese and the length cannot exceed 512 bytes. Note: some CDN manufacturers may not support the 512 bytes; for example, Alibaba Cloud only supports 256 bytes.
Return

IThunderEngine::setLiveTranscodingTask

virtual int Thunder::IThunderEngine::setLiveTranscodingTask(const char* taskId, const LiveTranscoding& transcodingCfg);

Add/update transcoding task.

  • After this API is called, the server will perform transcoding and push streams (if any) according to the configured canvas. The application needs specific task IDs to differentiate different transcoding tasks.
  • During transcoding, this API can be repeatedly called to update transcoding parameters.
  • One room supports a maximum of 5 transcoding tasks.

Notes:

  • It can be called after joining the room (joinRoom). The configuration will be cleared after you exit the room.
Parameters
ParameterTypeDescription
taskIdINTranscoding task ID, which is unique in a room and is managed by users
transcodingCfgINSpecific transcoding layout. See details in Thunder::LiveTranscoding
Return

IThunderEngine::removeLiveTranscodingTask

virtual int Thunder::IThunderEngine::removeLiveTranscodingTask(const char* taskId);

Remove a transcoding task.

  • After this API is called, Jocloud background will will remove stream mixing tasks.

Notes:

  • It can be called after joining the room (joinRoom). The configuration will be cleared after you exit the room.
Parameters
ParameterTypeDescription
taskIdINTranscoding task ID, which is unique in a room and is managed by users
Return

IThunderEngine::addPublishTranscodingStreamUrl

virtual int Thunder::IThunderEngine::addPublishTranscodingStreamUrl(const char* taskId, const char* url);

Add a transcoding stream pushing address.

  • After this API is called, the specified stream mixing will be pushed to the specified CDN address. Only one-channel stream pushing address can be added each time by this API. If multi-channel streams need to be pushed, this API has to be called repeatedly.
  • One transcoding task supports a maximum of 5 addresses for stream pushing.

Notes:

  • It can be called after joining the room (joinRoom). The configuration will be cleared after you exit the room.
Parameters
ParameterTypeDescription
taskIdINTranscoding task ID
urlINStream pushing address, in RTMP format. The value does not support special characters including Chinese and the length cannot exceed 512 bytes. Note: some CDN manufacturers may not support 512 bytes; for example, Alibaba Cloud only supports 256 bytes.
Return

IThunderEngine::removePublishTranscodingStreamUrl

virtual int Thunder::IThunderEngine::removePublishTranscodingStreamUrl(const char* taskId, const char* url);

Remove a transcoding stream pushing address.

  • After this API is called, the specified mixed stream will not be pushed to the specified CDN address.

Notes:

  • It can be called after joining the room (joinRoom). The configuration will be cleared after you exit the room.
Parameters
ParameterTypeDescription
taskIdINTranscoding task ID
urlINStream pushing address, in RTMP format. The value does not support special characters including Chinese and the length cannot exceed 512 bytes. Note: Some CDN manufacturers may not support the 512 bytes; for example, Alibaba Cloud only supports 256 bytes.
Return

IThunderEngine::addSubscribe

virtual int Thunder::IThunderEngine::addSubscribe(const char* roomId, const char* uid);

Subscribe to specific streams (cross-room).

Notes:

  • It can be called after joining the room (joinRoom). The configuration will be cleared after you exit the room.
Parameters
ParameterTypeDescription
roomIdINRoom ID [which only supports a combination of characters such as [A,Z],[a,z],[0,9],-,_, and cannot exceed 64 bytes]
uidINUser ID
Return

IThunderEngine::removeSubscribe

virtual int Thunder::IThunderEngine::removeSubscribe(const char* roomId, const char* uid);

Unsubscribe specified streams.

  • After this API is called, the specified mixed stream will not be pushed to the specified CDN address.

Notes:

  • It can be called after joining the room (joinRoom). The configuration will be cleared after you exit the room.
Parameters
ParameterTypeDescription
roomIdINRoom ID [which only supports a combination of characters such as [A,Z],[a,z],[0,9],-,_, and cannot exceed 64 bytes]
uidINUser ID
Return

IThunderEngine::enableWebSdkCompatibility

virtual int Thunder::IThunderEngine::enableWebSdkCompatibility(bool enabled);

Enable/disable WebSDK compatibility.

Notes:

  • It can only be called after (initialize). This API is reset only when destroyEngine is called.
  • This API is applicable only to the live streaming scenario. Co-hosting is compatible with WebSDK by default, without calling this API.
  • Enable compatibility with WebSDK in live streaming. This API must be called before publishing, which is irrelevant with entering or exiting the room.
Parameters
ParameterTypeDescription
enabledINtrue: compatible
false: incompatible (default)
Return

IThunderEngine::sendUserAppMsgData

virtual int Thunder::IThunderEngine::sendUserAppMsgData(const char* msgData);

Send service-customized broadcast message.

This API sends messages via media UDP channel with features of low-latency and unreliability. Specified constraints are as follows:

  • The sender must join the room.
  • The API can only be called after successfully connecting the microphone (messages cannot be sent if there are only audiences or if broadcast authentication fails).
  • This API can be called no more than twice/second, and the size of msgData cannot exceed 200 bytes.
  • msgData will be dropped if any of the above conditions are unmet.
  • There is no guarantee that messages will be delivered to all online users in room, and no guarantee that they will be delivered in order.
  • Monitor the reasons for notification failing to send service-customized broadcast message via onSendAppMsgDataFailedStatus.
  • Monitor service-customized broadcast message sent by other users via onRecvUserAppMsgData.

Notes:

  • It can be called after joining the room (joinRoom). The configuration will be cleared after you exit the room.
Parameters
ParameterTypeDescription
msgDataINService-customized broadcast message
Return

IThunderEngine::sendMediaExtraInfo

virtual int Thunder::IThunderEngine::sendMediaExtraInfo(const char* extraData);

Send SEI (during audio/video publishing). Usage description:

  • The sender must join the room, and call it after successfully publishing audio.
  • Audio-only publishing: this API is called every 100 ms at best. The SEI cannot exceed 200 bytes.
  • Video publishing: the calling frequency cannot exceed the frame rate. The SEI cannot exceed 2048 bytes.
  • For example: stream pushing adopts a default frame rate of 15 fps, meaning that the frequency of calling cannot exceed 1000/15=66.7 ms per occurrence.
  • Packet loss may occur.
  • The SDK will try to call back media data at the time when related frames are played.
  • Monitor causes for failure in sending SEI through onSendMediaExtraInfoFailedStatus.
  • Monitor SEI sent from other users through onRecvMediaExtraInfo.

Notes:

  • It can be called after joining the room (joinRoom). The configuration will be cleared after you exit the room.
Parameters
ParameterTypeDescription
extraDataINSEI
Return

IThunderEngine::enableMixVideoExtraInfo

virtual int Thunder::IThunderEngine::enableMixVideoExtraInfo(bool enabled);

Enable video mixing with SEI.

Notes:

  • It can be called after joining the room (joinRoom). The configuration will be cleared after you exit the room.
Parameters
ParameterTypeDescription
enabledINFalse by default. true: enable video mixing with SEI; false: disable video mixing with SEI.
Return

IThunderEngine::startScreenCaptureForHwnd

virtual int Thunder::IThunderEngine::startScreenCaptureForHwnd(HWND hWnd, const RECT* pRect);

Start capturing the specified window.

Parameter
ParameterTypeDescription
hWndINWindow handle
pRectINSub region captured from a window as the coordinate is a relative value and the point at the upper left corner is (0,0).The entire window is captured if the value is NULL.
Return

IThunderEngine::startScreenCaptureForScreen

virtual int Thunder::IThunderEngine::startScreenCaptureForScreen(int screenId = 0, const RECT* pRect);

Start capturing the specified area of the specified desktop.

Parameters
ParameterTypeDescription
screenIdINMonitor ID
pRectINSpecified sub region for capturing as the coordinate is a relative value of the specified screen. The entire monitor screen is captured when this parameter is set to NULL.
Return

IThunderEngine::updateScreenCaptureRect

virtual int Thunder::IThunderEngine::updateScreenCaptureRect(const RECT* pRect);

Update the display region captured.

Parameters
ParameterTypeDescription
pRectINSpecified sub region for capturing as the coordinate is a relative value of the specified screen or window. The entire monitor screen or window is captured when this parameter is set to NULL.
Return

IThunderEngine::stopScreenCapture

virtual int Thunder::IThunderEngine::stopScreenCapture();

Stop capturing the desktop or window.

Return

IThunderEngine::pauseScreenCapture

virtual int Thunder::IThunderEngine::pauseScreenCapture();

Pause capturing the desktop or window.

Return

IThunderEngine::resumeScreenCapture

virtual int Thunder::IThunderEngine::resumeScreenCapture(const char* roomId, const char* uid);

Resume capturing the desktop or window.

Return

IThunderEngine::registerVideoCaptureObserver

virtual int Thunder::IThunderEngine::registerVideoCaptureObserver(IVideoCaptureObserver* observer);

Register a video capture observer object for collecting camera data.

Notes:

Parameters
ParameterTypeDescription
observerINPointer of Pointer of the IVideoCaptureObserver. If observer is set as NULL, monitoring is canceled.
Return

IThunderEngine::registerMediaExtraInfoObserver

virtual int Thunder::IThunderEngine::registerMediaExtraInfoObserver(IThunderMediaExtraInfoObserver* observer);

Register the observer object of SEI.

Notes:

Parameters
ParameterTypeDescription
observerINPointer of Pointer of the IThunderMediaExtraInfoObserver object. If observer is set as NULL, monitoring is canceled.
Return

IThunderEngine::createThunderAudioPlayer

virtual IThunderAudioPlayer* Thunder::IThunderEngine::createThunderAudioPlayer();

Create audio file playing object. See details in IThunderAudioPlayer.

Return
  • IThunderAudioPlayer*: pointer of the audio file player object.
  • NULL: creating audio file player failed.

IThunderEngine::destroyThunderAudioPlayer

virtual int Thunder::IThunderEngine::destroyThunderAudioPlayer(IThunderAudioPlayer* player);

Destroy file playing object.

Parameters
ParameterTypeDescription
playerINPointer of the IThunderAudioPlayer object
Return

IThunderEngine::getVideoEncoderParam

virtual int getVideoEncoderParam(const VideoEncoderConfiguration& configIn, ThunderVideoEncodeParam& paramOut);

Get encoding parameters by video encoding configuration.

Parameters
ParameterTypeDescription
configInINVideoEncoderConfiguration Encoding configuration
paramOutOUTThunderVideoEncodeParam Encoding parameters
Return

IThunderEngine::getConnectionStatus

virtual ThunderConnectionStatus getConnectionStatus();

Get the current network connection status.

Return

IThunderEngine::enableCaptureVolumeIndication

virtual int enableCaptureVolumeIndication(int interval, int moreThanThd, int lessThanThd, int smooth);

Enable callback of volume capture.

Parameters
ParameterTypeDescription
intervalIN<=0: disable volume prompt >0: callback interval (ms)
moreThanThdINCall back when =moreThanThd; <=0 invalid
lessThanThdINCall back when >=lessThanThd to <lessThanThd; <=0 invalid
smoothINReserved
Return

IThunderEngine::checkFeatureSupport

virtual bool checkFeatureSupport(FEATURE_SUPPORT flag);

Whether it supports a specific feature.

Parameters
ParameterTypeDescription
flagINFEATURE_SUPPORT a specific feature, for example, check whether it supports capturing Magnification API by calling FEATURE_SUPPORT_MAGAPI.
Return
  • true: support
  • false: not support

IThunderEngine::setCaptureExcludeWindowList

virtual int setCaptureExcludeWindowList(HWND* wndList, int count);

List of windows to be excluded when setting screen capture.

Notes:

  • Call this API after calling checkFeatureSupport to check whether it supports filtering windows.
Parameters
ParameterTypeDescription
wndListINList of windows to be excluded
countINNumber of windows to be excluded
Return

IThunderEngine::enableVoiceReverb

virtual int enableVoiceReverb(bool enabled);

Enable/disable local voice reverberation.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
enabledIN"true"-enable, "false"-disable (default)
Return

IThunderEngine::setReverbParameter

virtual int setReverbParameter(const ReverbParameter& parameter);

Sets the local voice reverberation parameters.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
parameterINReverberation parameters
Return

IThunderEngine::enableLimiter

virtual int enableLimiter(bool enabled);

Enable/disable the limiter.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
enabledIN"true"-enable, "false"-disable (default)
Return

IThunderEngine::setLimiterParameter

virtual int setLimiterParameter(const LimiterParameter& parameter);

Set limiter parameters.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
parameterINLimiter parameters, see details in LimiterParameter
Return

IThunderEngine::enableEqualizer

virtual int enableEqualizer(bool enabled);

Enable or disable the equalizer.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
enabledIN"true"-enable, "false"-disable(default)
Return

IThunderEngine::setEqualizerParameter

virtual int setEqualizerParameter(const EqualizerParameter& parameter);

Set equalizer parameters.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
parameterINEqualizer parameters, see details in EqualizerParameter
Return

IThunderEngine::setVoicePitch

virtual int setVoicePitch(float pitch);

Set voice pitch parameters.

Note:

  • This API should be called after initialization and reset by calling destroyEngine.
  • The samller the value, the lower the pitch.
Parameter
ParameterTypeDescription
pitchINVoice pitch, range: [-12, 12], default: 0
Return

IThunderEngine::enableHowlingDetector

virtual int enableHowlingDetector(bool enabled);

Enable or disable howling detection.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
enabledINWhether to enable howling detection: "true"-enable, "false"-diable (default)
Return

IThunderEngine::enableEchoDetector

virtual int enableEchoDetector(bool enabled);

Enable/disable echo detection.

Note:

This API should be called after initialization and reset by calling destroyEngine.

Parameter
ParameterTypeDescription
enabledINWhether to enable echo detection: "true"-enable, "false"(default)-disable
Return

IAudioDeviceManager

IAudioDeviceManager::enumInputDevices

virtual int Thunder::IAudioDeviceManager::enumInputDevices(AudioDeviceList& devices);

Enumerate audio input devices.

Notes:

Parameters
ParameterTypeDescription
devicesOUTAudio device information. See details in AudioDeviceList.
Return

IAudioDeviceManager::setInputtingDevice

virtual int Thunder::IAudioDeviceManager::setInputtingDevice(GUID& id);

Set audio input devices.

Notes:

Parameters
ParameterTypeDescription
idINUnique descriptor for a device
Return

IAudioDeviceManager::getInputtingDevice

virtual int Thunder::IAudioDeviceManager::getInputtingDevice(GUID& id);

Get the currently selected input device.

Notes:

Parameters
ParameterTypeDescription
idOUTUnique descriptor for a device
Return

IAudioDeviceManager::setInputtingVolume

virtual int Thunder::IAudioDeviceManager::setInputtingVolume(int volume);

Set volume of the current audio input device.

Notes:

Parameters
ParameterTypeDescription
volumeINVolume, range [0-400]
Return

IAudioDeviceManager::getInputtingVolume

virtual int Thunder::IAudioDeviceManager::getInputtingVolume(int volume);

Get volume of the current audio input device.

Notes:

Parameters
ParameterTypeDescription
volumeOUTVolume, range [0-400]
Return

IAudioDeviceManager::setInputtingMute

virtual int Thunder::IAudioDeviceManager::setInputtingMute(bool mute);

Mute the current audio input device.

Notes:

Parameters
ParameterTypeDescription
muteINtrue: mute; false: unmute
Return

IAudioDeviceManager::getInputtingMute

virtual int Thunder::IAudioDeviceManager::getInputtingMute(bool& mute);

Get mute status of the current audio input device.

Notes:

Parameter
ParameterTypeDescription
muteOUTtrue: mute; false: unmute
Return

IAudioDeviceManager::startInputDeviceTest

virtual int Thunder::IAudioDeviceManager::startInputDeviceTest(int indicationInterval);

Enable the current audio input device testing.

Notes:

Parameters
ParameterTypeDescription
indicationIntervalINCheck interval. The default value is 0.
Return

IAudioDeviceManager::stopInputDeviceTest

virtual int Thunder::IAudioDeviceManager::stopInputDeviceTest();

Disable the current audio input device testing.

Notes:

Return

IAudioDeviceManager::enumOutputDevices

virtual int Thunder::IAudioDeviceManager::enumOutputDevices(AudioDeviceList& devices);

Enumerate audio playback devices.

Notes:

Parameters
ParameterTypeDescription
devicesOUTAudio playing devices. See details in AudioDeviceList.
Return

IAudioDeviceManager::setOutputtingDevice

virtual int Thunder::IAudioDeviceManager::setOutputtingDevice(GUID& id);

Specify the audio playback device.

Notes:

Parameters
ParameterTypeDescription
idINUnique descriptor for a device
Return

IAudioDeviceManager::getOutputtingDevice

virtual int Thunder::IAudioDeviceManager::getOutputtingDevice(GUID& id);

Get the current audio playback device.

Notes:

Parameters
ParameterTypeDescription
idOUTUnique descriptor for a device
Return

IAudioDeviceManager::setOuttingVolume

virtual int Thunder::IAudioDeviceManager::setOuttingVolume(int volume);

Set volume of the current playback device.

Notes:

Parameters
ParameterTypeDescription
volumeINVolume, range [0-100]
Return

IAudioDeviceManager::getOuttingVolume

virtual int Thunder::IAudioDeviceManager::getOuttingVolume(int& volume);

Get volume of the current playing device.

Notes:

Parameters
ParameterTypeDescription
volumeOUTVolume, range [0-100]
Return

IAudioDeviceManager::setOutputtingMute

virtual int Thunder::IAudioDeviceManager::setOutputtingMute(bool mute);

Mute/unmute the current playback device.

Notes:

Parameters
ParameterTypeDescription
muteINtrue: mute; false: unmute
Return

IAudioDeviceManager::getOutputtingMute

virtual int Thunder::IAudioDeviceManager::getOutputtingMute(bool& mute);

Get mute status of the current playing device.

Notes:

Parameters
ParameterTypeDescription
muteOUTtrue: mute;
false: unmute
Return

IAudioDeviceManager::startOutputDeviceTest

virtual int Thunder::IAudioDeviceManager::startOutputDeviceTest(int indicationInterval, const char* audioFileName);

Enable the current playing device testing.

Notes:

Parameters
ParameterTypeDescription
indicationIntervalINCheck interval. The default value is 0.
audioFileNameINThe complete path of the audio file playing. Win7 and higher support mp3, aac, and wave formats while systems earlier than Win7 support only the wav format.
Return

IAudioDeviceManager::stopOutputDeviceTest

virtual int Thunder::IAudioDeviceManager::stopOutputDeviceTest();

Disable the current playing device testing.

Notes:

Parameters
ParameterTypeDescription
roomIdINRoom ID [which only supports a combination of characters such as [A,Z],[a,z],[0,9],-,_, and cannot exceed 64 bytes]
uidINUser ID
Return

IAudioDeviceManager::enableMicEnhancement

virtual int Thunder::IAudioDeviceManager::enableMicEnhancement(bool enabled);

Enable/disable microphone enhancement.

Notes:

Parameters
ParameterTypeDescription
enabledINtrue: enable microphone enhancement; false: disable microphone enhancement. The default value is false.
Return

IAudioDeviceManager::enableMicDenoise

virtual int Thunder::IAudioDeviceManager::enableMicDenoise(bool enabled);

Enable/disable microphone noise reduction.

Notes:

Parameters
ParameterTypeDescription
enabledINtrue: enable microphone noise reduction; false: disable microphone noise reduction. The default value is false.
Return

IAudioDeviceManager::enableAEC

virtual int Thunder::IAudioDeviceManager::enableAEC(bool enabled);

Enable/disable echo cancellation.

Notes:

Parameters
ParameterTypeDescription
enabledINtrue: enable echo cancellation; false: disable echo cancellation. The default value is false.
Return

IAudioDeviceManager::enableAGC

virtual int Thunder::IAudioDeviceManager::enableAGC(bool enabled);

Enable/disable Automatic Gain Control (AGC).

Notes:

Parameters
ParameterTypeDescription
enabledINtrue: enable echo cancellation; false: disable echo cancellation. The default value is false.
Return

IThunderAudioPlayer

IThunderAudioPlayer::open

virtual bool Thunder::IThunderAudioPlayer::open(const char* path);

Open a specified file.

Parameters
ParameterTypeDescription
pathAbsolute file path
Return
  • true: opening file succeeded
  • false: opening file failed

IThunderAudioPlayer::close

virtual void Thunder::IAudioDeviceManager::close();

Close the current file.


IThunderAudioPlayer::play

virtual void Thunder::IAudioDeviceManager::play();

Play the file opened.

Notes:

  • Call IThunderAudioPlayer::open to open a file before playing.

IThunderAudioPlayer::stop

virtual void Thunder::IAudioDeviceManager::stop();

Stop playing.


IThunderAudioPlayer::pause

virtual void Thunder::IAudioDeviceManager::pause();

Pause playing the file opened.


IThunderAudioPlayer::resume

virtual void Thunder::IAudioDeviceManager::resume();

Pause playing the file opened.


IThunderAudioPlayer::seek

virtual void Thunder::IAudioDeviceManager::seek(unsigned int timeMS);

Skip to play from a specified time.

Notes:

  • Ensure that the file is in being played.
  • The value cannot be greater than that obtained by getTotalPlayTimeMS.
Parameters
ParameterTypeDescription
timeMSINSpecified time (ms)

IThunderAudioPlayer::getTotalPlayTimeMS

virtual unsigned int Thunder::IAudioDeviceManager::getTotalPlayTimeMS();

Get the total playing duration of a file.

Notes:

  • Call IThunderAudioPlayer::open to open the file first.
Return
  • The total playing duration of the file.

IThunderAudioPlayer::getCurrentPlayTimeMS

virtual unsigned int Thunder::IAudioDeviceManager::getCurrentPlayTimeMS();

Get current elapsed play time.

Notes:

  • Call IThunderAudioPlayer::open to open the file and play it.
Return
  • The current elapsed play time.

IThunderAudioPlayer::setPlayerLocalVolume

virtual int Thunder::IAudioDeviceManager::setPlayerLocalVolume(int volume);

Adjust music files' local volume.

Parameters
ParameterTypeDescription
volumeINPlay volume, range [0-100]
Return

IThunderAudioPlayer::setPlayerPublishVolume

virtual int Thunder::IAudioDeviceManager::setPlayerPublishVolume(int volume);

Adjust music files' publishing volume.

Parameters
ParameterTypeDescription
volumeINPlay volume, range [0-100]
Return

IThunderAudioPlayer::getPlayerLocalVolume

virtual int Thunder::IAudioDeviceManager::getPlayerLocalVolume();

Get music files' local volume. The value matches the ones that configured by setPlayerLocalVolume. The range is [0-100].

Notes:

  • Call IThunderAudioPlayer::open to open the file and play it.
Return
  • Music files' local volume.

IThunderAudioPlayer::getPlayerPublishVolume

virtual int Thunder::IAudioDeviceManager::getPlayerPublishVolume();

Get music files' publishing volume. The value matches the ones configured by setPlayerPublishVolume. The range is [0-100].

Notes:

  • Call IThunderAudioPlayer::open to open the file and play it.
Return
  • Music files' publishing volume.

IThunderAudioPlayer::setLooping

virtual int Thunder::IAudioDeviceManager::setLooping(int cycle);

Set loop playback timing.

Parameters
ParameterTypeDescription
cycleIN-1: indicates infinite loop; 0: no loop (default value);positive integer: loop count
Return

IThunderAudioPlayer::setSemitone

virtual void setSemitone(int val);

Set the audio playback tone.

Parameters
ParameterTypeDescription
valINTone value: -5, -4, -3, -2, -1, 0(normal), 1, 2, 3, 4, 5

IThunderAudioPlayer::setTempo

virtual void setTempo(float val);

Set the audio playback speed.

Parameters
ParameterTypeDescription
valINSpeed: 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0

IThunderAudioPlayer::setPosition

virtual void setPosition(int azimuth);

Set the audio playback direction.

Parameters
ParameterTypeDescription
azimuthINPlayback direction, -90~90

IThunderAudioPlayer::SetFilePlayerNotify

virtual void Thunder::IAudioDeviceManager::void SetFilePlayerNotify(IThunderAudioPlayerNotify* notify);

Set playing callback.

Parameters
ParameterTypeDescription
notifyINAPI class of playing callback. See details in IThunderAudioPlayerNotify.

IVideoDeviceManager

IVideoDeviceManager::enumVideoDevices

virtual int Thunder::IVideoDeviceManager::enumVideoDevices(VideoDeviceList& devices);

Enumerate video input devices.

Notes:

Parameters
ParameterTypeDescription
devicesOUTList of video input devices. See details in VideoDeviceList.
Return

IVideoDeviceManager::startVideoDeviceCapture

virtual int Thunder::IVideoDeviceManager::startVideoDeviceCapture(int index);

Enable video input device and capture.

Notes:

Parameters
ParameterTypeDescription
indexINDevice index
Return

IVideoDeviceManager::stopVideoDeviceCapture

virtual int Thunder::IVideoDeviceManager::stopVideoDeviceCapture();

Disable video device capture.

Notes:

Return

IVideoDeviceManager::enumMonitorDevices

virtual int Thunder::IVideoDeviceManager::enumMonitorDevices(MonitorDeviceList& devices);

Enumerate monitor input devices.

Notes:

Parameters
ParameterTypeDescription
devicesOUTReturned list of video input devices. See details in MonitorDeviceList
Return

IVideoDeviceManager::startDeviceTest

virtual int startDeviceTest(int index, HWND hwnd);

Start testing the video capture device.

Note:

  • Ather start testing the video capture device by calling this API, you should stop the test by calling stopDeviceTest; and it cannot be called with startVideoDeviceCapture to open the same device.
Parameter
ParameterTypeDescription
deviceIdxINVideo device No.,which can be obtained by calling enumVideoDevices
hwndINvideo rendering window, which cannot be set to NULL, otherwise, error code may be returned
Return

IVideoDeviceManager::stopDeviceTest

virtual int stopDeviceTest();

Stop video capture device test.

Note:

  • You can call this API stop testing video devices after calling startDeviceTest.
Return

IVideoDeviceManager::getVideoDeviceCapture

virtual int getVideoDeviceCapture(int& deviceIdx);

Get video device No.

Note:

  • This API should be called after initialization.
Parameter
ParameterTypeDescription
deviceIdxOUTVideo device No., see details in enumVideoDevices
Return

Enumeration & Structure

AREA_TYPE

enum Thunder::AREA_TYPE

Area type.

Enumeration ValueDescription
AREA_DEFAULT(0)Domestic, default value
AREA_FOREIGN(1)Overseas
AREA_RESERVED(2)Reserved

THUNDER_PROFILE

enum Thunder::THUNDER_PROFILE

Media mode.

Enumeration ValueDescription
PROFILE_DEFAULT(0)Default mode (audio/video mode)
PROFILE_NORMAL(1)Audio/video mode
PROFILE_ONLY_AUDIO(2)Audio-only mode, applicable to audio-only optimization

ROOM_CONFIG_TYPE

enum Thunder::ROOM_CONFIG_TYPE

Media mode.

Enumeration ValueDescription
ROOM_CONFIG_LIVE(0)Live streaming mode, where quality is prioritized and latency is high. Applicable to viewer or audience scenarios. When an audience starts to stream and becomes an anchor, the value changes to the communication mode.
ROOM_CONFIG_COMMUNICATION(1)Communication mode with smooth connection and low latency, which is applicable for one-to-one communication and group conversation.
ROOM_CONFIG_MultiAudioRoom(4)Audio room mode with low latency and low bandwidth occupation, which is applicable for group voice chatroom

AUDIO_PROFILE_TYPE

enum Thunder::AUDIO_PROFILE_TYPE

Audio types

Enumeration ValueDescription
AUDIO_PROFILE_DEFAULT(0)Default type: "NET_AAC_ELD"(default)-sampling rate: 44.1 kHz, dual channel, code rate: 40 kbps; 1-audio mode, 3-live streaming mode
AUDIO_PROFILE_SPEECH_STANDARD(1)Specify a 16 kHz sampling rate, audio encoding, single channel, and an encoding bit rate of about 18 kbps
AUDIO_PROFILE_MUSIC_STANDARD_STEREO(2)Specify a 44.1 kHz sampling rate, music encoding, dual channel, and an encoding bit rate of about 24 kbps. Relatively high encoding delay
AUDIO_PROFILE_MUSIC_STANDARD(3)Specify a 44.1 kHz sampling rate, music encoding, dual channel, and an encoding bit rate of about 48 kbps. Relatively low encoding delay
AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(4)Specify a 44.1 kHz sampling rate, music encoding, dual channel, and an encoding bit rate of about 128 kbps
AUDIO_PROFILE_MUSIC_HIGHER_QUALITY = 5Specify a 44.1 kHz sampling rate, music encoding, dual channel, and an encoding bit rate of about 192 kbps

COMMUT_MODE

enum Thunder::COMMUT_MODE

Interactive mode

Enumeration ValueDescription
COMMUT_MODE_DEFAULT(0)Default type: COMMUT_MODE_DEFAULT.
COMMUT_MODE_HIGH(1)Strong interaction mode
COMMUT_MODE_LOW(2)Weak interaction mode

SCENARIO_MODE

enum Thunder::SCENARIO_MODE

Scenario mode.

Enumeration ValueDescription
SCENARIO_MODE_DEFAULT(0)Default type: SCENARIO_MODE_STABLE_FIRST.
SCENARIO_MODE_STABLE_FIRST(1)Smoothness priority: stable, recommended for education
SCENARIO_MODE_QUALITY_FIRST(2)Tone quality priority: recommended for shows with few or no co-hosting

ThunderSourceType

enum Thunder::ThunderSourceType

Audio publishing mode.

Enumeration ValueDescription
THUNDER_AUDIO_MIC(0)Microphone-only
THUNDER_AUDIO_FILE(1)File-only
THUNDER_AUDIO_MIX(2)Microphone and file
THUNDER_AUDIO_TYPE_NONE(10)Stop all uplink audio data

AUDIO_RECORDING_FILE_TYPE

enum Thunder::AUDIO_RECORDING_FILE_TYPE

Audio publishing mode.

Enumeration ValueDescription
AUDIO_RECORDING_WAV(0)WAV format
AUDIO_RECORDING_AAC(1)AAC format
AUDIO_RECORDING_MP3(2)MP3 format

AUDIO_RECORDING_QUALITY_TYPE

enum Thunder::AUDIO_RECORDING_QUALITY_TYPE

Audio publishing mode.

Enumeration ValueDescription
AUDIO_RECORDING_QUALITY_LOW(0)Low audio quality
AUDIO_RECORDING_QUALITY_MEDIUM(1)Medium audio quality
AUDIO_RECORDING_QUALITY_HIGH(2)High audio quality

ThunderAudioRawFrameOperationMode

enum Thunder::ThunderAudioRawFrameOperationMode

Audio publishing mode.

Enumeration ValueDescription
THUNDER_AUDIO_RAW_FRAME_OPERATION_MODE_READ_ONLY(1)Read-only mode. The user only gets data from AudioFrame
THUNDER_AUDIO_RAW_FRAME_OPERATION_MODE_WRITE_ONLY(2)Write-only mode. The user replaces data in AudioFrame for encoding transmission of the SDK
THUNDER_AUDIO_RAW_FRAME_OPERATION_MODE_READ_WRITE(3)Read/write mode. The user gets and modifies data from AudioFrame and return them to the SDK for encoding and transmission.

LOG_FILTER

enum Thunder::LOG_FILTER

Audio publishing mode.

Enumeration ValueDescription
LOG_LEVEL_TRACE(0)TRACE
LOG_LEVEL_DEBUG(1)DEBUG
LOG_LEVEL_INFO(2)INFO
LOG_LEVEL_WARN(3)WARN
LOG_LEVEL_ERROR(4)ERROR
LOG_LEVEL_RELEASE (10)RELEASE

VideoEncoderConfiguration

struct Thunder::VideoEncoderConfiguration
{
 VideoPublishPlayType playType;
 VideoPublishMode publishMode;
};

Video encoding configuration.

MemberDescription
VideoPublishPlayTypePublishing types
VideoPublishModePublishing brackets

ThunderVideoEncodeParam

struct Thunder::ThunderVideoEncodeParam
{
  int width; // Width
  int height; // Height
  int frameRate; // Frame rate
  int codeRate; // Bit rate
};

Video encoding parameters.


VideoPublishPlayType

enum Thunder::VideoPublishPlayType

Audio publishing mode.

Enumeration ValueDescription
VIDEO_PUBLISH_PLAYTYPE_SINGLE(0)Single publishing
VIDEO_PUBLISH_PLAYTYPE_INTERACT(1)Co-hosting video publishing
VIDEO_PUBLISH_PLAYTYPE_SCREENCAP(2)Screen recording publishing

VideoPublishMode

enum Thunder::VideoPublishMode

Audio publishing mode

Enumeration ValueDescription
VIDEO_PUBLISH_MODE_DEFAULT(-1)Undefined. The publishing definition is determined by configuration
VIDEO_PUBLISH_MODE_SMOOTH_DEFINITION(1)Smooth
VIDEO_PUBLISH_MODE_NORMAL_DEFINITION(2)Standard definition
VIDEO_PUBLISH_MODE_HIGH_DEFINITION(3)High definition
VIDEO_PUBLISH_MODE_SUPER_DEFINITION(4)Ultra high-definition
VIDEO_PUBLISH_MODE_BLUERAY(5)Blue ray

VideoCanvas

#define MAX_THUNDER_UID_LEN 65 // UID length

struct Thunder::VideoCanvas
{
 HWND hWnd;
 VideoRenderMode renderMode;
 char uid[MAX_THUNDER_UID_LEN];
};

Video encoding configuration.

MemberDescription
HWNDVideo rendering window
VideoRenderModeVideo rendering mode
char uid[MAX_THUNDER_UID_LEN]User ID

VideoRenderMode

enum Thunder::VideoRenderMode

Video rendering mode.

Enumeration ValueDescription
VIDEO_RENDER_MODE_FILL(0)Pulled to full screen
VIDEO_RENDER_MODE_ASPECT_FIT(1)Adapt to the window
VIDEO_RENDER_MODE_CLIP_TO_BOUNDS(2)Clipped to full screen

ThunderVideoMirrorMode

enum Thunder::ThunderVideoMirrorMode

Mirror mode for local preview video and stream pushing video.

Enumeration ValueDescription
THUNDER_VIDEO_MIRROR_MODE_PREVIEW_MIRROR_PUBLISH_NO_MIRROR(0)Preview is mirrored, but stream pushing is not mirrored
THUNDER_VIDEO_MIRROR_MODE_PREVIEW_PUBLISH_BOTH_MIRROR(1)Both preview and stream pushing are monitored
THUNDER_VIDEO_MIRROR_MODE_PREVIEW_PUBLISH_BOTH_NO_MIRROR(2)Neither preview nor stream pushing is mirrored
THUNDER_VIDEO_MIRROR_MODE_PREVIEW_NO_MIRROR_PUBLISH_MIRROR(3)Preview is mirrored, but stream pushing is mirrored

ThunderBoltImage

#define MAX_THUNDER_URL_LEN 512 // url length

struct Thunder::ThunderBoltImage
{
  int x; // Take the upper left corner as the original point, horizontal coordinate
  int y; // Take the upper left corner as the original point, vertical coordinate
  int width; // Width
  int height; // Height
  char url[MAX_THUNDER_URL_LEN]; // Absolute path address or HTTP, HTTPs address of local picture
};

Picture information.


CustomAudioOptions

struct CustomAudioOptions
{
  int sampleRate; // Sampling rate (48k,44.1,16k,8k)
  int channels; // Audio channel
  int bitpersample; // Bit width of sampling point (currently only 16 available)
  bool bMixSdkCapture; // Whether to synthesize the capture of SDK itself
};

External audio capture parameters.


CustomVideoOptions

struct CustomVideoOptions
{
  enum CustomVideoSrcDataType
  {
    DATA_TYPE_I420 = 0,
    DATA_TYPE_NV12 = 1,
    DATA_TYPE_BGR24 = 2,
    DATA_TYPE_BGRA = 3,
  };

  int srcWidth; // Width and height of input source [dynamic update not available]
  int srcHeight; // Height of input source [dynamic update not available]
  int destWidth; // Width and height of output stream [this parameter has been deprecated and needs to be set according to the API setVideoEncoderConfig]
  int destHeight; // Width and height of output stream [this parameter has been deprecated and needs to be set according to the API setVideoEncoderConfig]
  int codeRate; // Specific value of bit rate (kbps) [this parameter has been deprecated and needs to be set according to the API setVideoEncoderConfig]
  CustomVideoSrcDataType srcDataType; // Data type of source stream
};

External video capture parameters.


LiveTranscoding

#define MAX_THUNDER_TRANSCODINGUSER_COUNT 9 // Number of users with maximum image transcoding
#define MAX_THUNDER_ROOMID_LEN 65 // Room ID length
#define MAX_THUNDER_UID_LEN 65 // User ID length

struct LiveTranscoding
{
  // Audio is unified by default to "encode": 1,"bitrate":128,"sample":44100,"channel":2
  enum TranscodingMode
  {
    TRANSCODING_MODE_320X180 = 1, // "encode":100,"bitrate":150,"fps":15,"gop":30,"height":180,"width":320
    TRANSCODING_MODE_320X240 = 2, // "encode":100,"bitrate":200,"fps":15,"gop":30,"height":240,"width":320
    TRANSCODING_MODE_640X360 = 3, // "encode":100,"bitrate":500,"fps":15,"gop":30,"height":360,"width":640
    TRANSCODING_MODE_640X480 = 4, // "encode":100,"bitrate":500,"fps":15,"gop":30,"height":480,"width":640
    TRANSCODING_MODE_960X544 = 5, // "encode":100,"bitrate":1000,"fps":24,"gop":48,"height":544,"width":960
    TRANSCODING_MODE_1280X720 = 6, // "encode":100,"bitrate":1600,"fps":24,"gop":48,"height":720,"width":1280
    TRANSCODING_MODE_1920X1080 = 7, // "encode":100,"bitrate":4500,"fps":24,"gop":48,"height":1080,"width":1920
  };

  LiveTranscoding() : transcodingMode(0), userCount(0) {}

  int transcodingMode; // Transcoding bracket (enum TranscodingMode)
  int userCount;
  TranscodingUser userList[MAX_THUNDER_TRANSCODINGUSER_COUNT];
  };

struct TranscodingUser
{
 TranscodingUser()
 : bStandard(false)
 , layoutX(0)
 , layoutY(0)
 , layoutW(0)
 , layoutH(0)
 , zOrder(0)
 , bCrop(false)
 , cropX(0)
 , cropY(0)
 , cropW(0)
 , cropH(0)
 , alpha(0)
 , audioChannel(0)
 {
 }

 bool bStandard; // Standard stream user or not
 int layoutX; // User's location x in video mixing canvas
 int layoutY; // User's location y in video mixing canvas
 int layoutW; // User's width in video mixing canvas
 int layoutH; // User's height in video mixing canvas
 int zOrder; // Layer number of the user’s video frame on the live video. The value range is the integer in [0, 100] (0 = lowest layer, 1 = first layer from bottom to top, and so on)
 bool bCrop; // 0: display in the middle after zooming, mend black edges on the upper and lower / left and right sides; 1: crop in the middle after zooming, and clip the upper and lower / left and right extra regions
 int cropX; // X-coordinate of clipping region, left blank means default to center clipping
 int cropY; // Y-coordinate of clipping region
 int cropW; // Width of clipping region
 int cropH; // Height of clipping region
 float alpha; // Transparency of user video on the live video. The value range is [0.0, 1.0]. 0.0 indicates that the image in this region is completely transparent, while 1.0
 // indicates completely opaque. The default is 1.0
 int audioChannel; //Unrealized
 char uid[MAX_THUNDER_UID_LEN];
 char roomId[MAX_THUNDER_ROOMID_LEN];
};

Video mixing parameters.


AudioDeviceList

#define MAX_DEVICE_NAME_LEN 512 // Device name
#define MAX_DEVICE_DESC_LEN 512 // Device description
#define MAX_DEVICE_COUNT 16 // Maximum quantity of devices

struct GUID
{
 unsigned long Data1;
 unsigned short Data2;
 unsigned short Data3;
 unsigned char Data4[8];
};

struct AudioDeviceInfo // Information about audio device
{
 GUID id; // Identification of audio device
 char name[MAX_DEVICE_NAME_LEN]; // Name of audio device
 char desc[MAX_DEVICE_DESC_LEN]; // Description of audio device
};

struct AudioDeviceList
{
 AudioDeviceInfo device[MAX_DEVICE_COUNT]; // List of audio devices
 int count; // Number of video devices
};

List of audio devices.


MonitorDeviceList

#define MAX_DEVICE_NAME_LEN 512 // Device name
#define MAX_DEVICE_COUNT 16 // Maximum quantity of devices

struct RECT
{
 long left;
 long top;
 long right;
 long bottom;
};

struct MonitorDeviceInfo
{
 int index; // Acquired device number
 int flags; // Flags for screen attributes. The following table lists the possible values:
 // 0: This screen is not the home screen.
 // 1: This screen is the home screen, and can also be identified by the macro MONITORINFOF_PRIMARY came with Windows
 void* handle; // pHandler to display monitor <==> HMONITOR
 RECT rcWork; // Rectangular working area of specified screen, represented in virtual screen coordinates
 RECT rcMonitor; // Rectangular specified screen, represented in virtual screen coordinates
 char name[MAX_DEVICE_NAME_LEN]; // Device name
};

struct MonitorDeviceList
{
 int count; // Number of video devices
 MonitorDeviceInfo device[MAX_DEVICE_COUNT]; // List of video devices
};

List of displayer information.


VideoDeviceList

struct VideoDeviceList
{
  VideoDeviceInfo device[MAX_DEVICE_COUNT]; // List of video devices
  int count; // Number of video devices
};

List of video devices.


VideoDeviceInfo

struct VideoDeviceInfo
{
  char name[MAX_DEVICE_NAME_LEN]; // Name of video device
  int index; // Index of video device
};

Video device information.


FEATURE_SUPPORT

enum Thunder::FEATURE_SUPPORT

System features.

Enumeration ValueDescription
FEATURE_SUPPORT_MAGAPI(0)Mag API capture

ReverbParameter

struct ReverbParameter
{
  float roomSize; // Room size, range: [0~100]
  float preDelay; // Pre-delay, range: [0~200], unit: ms
  float reverberance; // Reverberance, range: [0~100]
  float hfDamping; // Damping, range: [0~100]
  float toneLow; // Low tone, range: [0~100]
  float toneHigh; // High tone, range: [0~100]
  float wetGain; // Wet gain, range: [-20~10], unit: dB
  float dryGain; // Dry gain, range: [-20~10], unit: dB
  float stereoWidth; // Stereo width, range: [0~100]
};

Reverberation parameters.


LimiterParameter

struct LimiterParameter
{
  float ceiling; // Target threshold, range: [-30 ~ 0]
  float threshold; // Threshold, range: [-10 ~ 0]
  float preGain; // Pre-gain, range: [0 ~ 30]
  float release; // Release time, range: [0 ~ 1000]
  float attack; // Attack time, range: [0 ~ 1000]
  float lookahead; //  ook-ahead value, range: [0 ~ 8]
  float lookaheadRatio; // Look-ahead ratio, range: [0.5 ~ 2]
  float rootMeanSquare; // Root mean square值, range: [0 ~ 100]
  float stLink; // Stereo, range: [0 ~ 1]
};

Limiter parameters.


EqualizerParameter

struct EqualizerParameter
{
  float amplitudeGain; // Amplitude gain, range: [-12 ~ 12], unit: dB
  float gains[10]; // Band gain list,range of each band: [-12 ~ 12]
                   // The center frequency of each band is 31 Hz, 62 Hz, 125 Hz, 250 Hz, 500 Hz, 1000 Hz, 2000 Hz, 4000 Hz, 8000 Hz, 16000 Hz
};

Equalizer parameters.


Was this page helpful?

Helpful Not helpful
Submitted! Your feedback would help us improve the website.
Feedback
Top