Constructor
new TRTCAudioEffectParam(effectId, path, loopCount, publish, volume)
"Sound effects" in TRTC refer to some short audio files (usually only a few seconds), such as "applause" and "laughter".
This parameter is used to specify the path and number of playback times of a sound effect file (short audio file) in the sound effect playback API playAudioEffect
on legacy versions.
After v7.3, the sound effect API has been replaced by a new startPlayMusic
API.
When you specify the AudioMusicParam
parameter of startPlayMusic
, if isShortFile
is set to true
, the file is a "sound effect" file.
Parameters:
Name | Type | Description |
---|---|---|
effectId |
Number |
required
[Field description] sound effect ID |
path |
String |
required
[Field description] sound effect file path. Supported file formats include AAC, MP3, and M4A. |
loopCount |
Number |
required
[Field description] number of times the sound effect is looped |
publish |
Boolean |
required
[Field description] whether the sound effect is upstreamed |
volume |
Number |
required
[Field description] sound effect volume |