Namespaces | |
liteav | |
Data Structures | |
class | ITXMusicPlayObserver |
class | AudioMusicParam |
class | ITXAudioEffectManager |
Macros | |
#define | __ITXAUDIOEFFECTMANAGER_H__ |
Tencent Cloud Audio Effect Management Module.
Module: management class for background music, short audio effects, and voice effects Description: sets background music, short audio effects, and voice effects
class liteav::ITXMusicPlayObserver |
Public Member Functions | |
virtual | ~ITXMusicPlayObserver () |
virtual void | onStart (int id, int errCode)=0 |
virtual void | onPlayProgress (int id, long curPtsMS, long durationMS)=0 |
virtual void | onComplete (int id, int errCode)=0 |
|
inlinevirtual |
|
pure virtual |
Background music ended.
|
pure virtual |
Playback progress of background music.
|
pure virtual |
Background music started.
class liteav::AudioMusicParam |
Background music playback information
The information, including playback ID, file path, and loop times, is passed in the startPlayMusic API.
class liteav::ITXAudioEffectManager |
Protected Member Functions | |
ITXAudioEffectManager () | |
virtual | ~ITXAudioEffectManager () |
Voice effect APIs | |
virtual void | setVoiceReverbType (TXVoiceReverbType type)=0 |
virtual void | setVoiceCaptureVolume (int volume)=0 |
virtual void | setVoicePitch (double pitch)=0 |
Background music APIs | |
virtual void | setMusicObserver (int musicId, ITXMusicPlayObserver *observer)=0 |
virtual void | startPlayMusic (AudioMusicParam musicParam)=0 |
virtual void | stopPlayMusic (int id)=0 |
virtual void | pausePlayMusic (int id)=0 |
virtual void | resumePlayMusic (int id)=0 |
virtual void | setAllMusicVolume (int volume)=0 |
virtual void | setMusicPublishVolume (int id, int volume)=0 |
virtual void | setMusicPlayoutVolume (int id, int volume)=0 |
virtual void | setMusicPitch (int id, float pitch)=0 |
virtual void | setMusicSpeedRate (int id, float speedRate)=0 |
virtual long | getMusicCurrentPosInMS (int id)=0 |
virtual long | getMusicDurationInMS (char *path)=0 |
virtual void | seekMusicToPosInTime (int id, int pts)=0 |
|
inlineprotected |
|
inlineprotectedvirtual |
|
pure virtual |
Getting the playback progress (ms) of background music
id | Music ID |
|
pure virtual |
Getting the total length (ms) of background music
path | Path of the music file. |
|
pure virtual |
Pausing background music
id | Music ID |
|
pure virtual |
Resuming background music
id | Music ID |
|
pure virtual |
Setting the playback progress (ms) of background music
id | Music ID |
pts | Unit: millisecond |
|
pure virtual |
Setting the local and remote playback volume of background music
This API is used to set the local and remote playback volume of background music.
volume | Volume. Value range: 0-100; default: 100 |
|
pure virtual |
Setting the background music callback
Before playing background music, please use this API to set the music callback, which can inform you of the playback progress.
musicId | Music ID |
observer | For more information, please see the APIs defined in ITXMusicPlayObserver . |
|
pure virtual |
Adjusting the pitch of background music
id | Music ID |
pitch | Pitch. Value range: floating point numbers in the range of [-1, 1]; default: 0.0f |
|
pure virtual |
Setting the local playback volume of a specific music track
This API is used to control the local playback volume (the volume heard by anchors) of a specific music track.
id | Music ID |
volume | Volume. Value range: 0-100. default: 100 |
|
pure virtual |
Setting the remote playback volume of a specific music track
This API is used to control the remote playback volume (the volume heard by audience) of a specific music track.
id | Music ID |
volume | Volume. Value range: 0-100; default: 100 |
|
pure virtual |
Changing the speed of background music
id | Music ID |
speedRate | Music speed. Value range: floating point numbers in the range of [0.5, 2]; default: 1.0f |
|
pure virtual |
Setting speech volume
This API is used to set the volume of speech. It is often used together with the music volume setting API setAllMusicVolume to balance between the volume of music and speech.
volume | Volume. Value range: 0-100; default: 100 |
|
pure virtual |
Setting speech pitch
This API is used to set the pitch of speech.
pitch | Ptich,Value range: -1.0f~1.0f; default: 0.0f。 |
|
pure virtual |
Setting voice reverb effects
This API is used to set reverb effects for human voice. For the effects supported, please see TXVoiceReverbType.
|
pure virtual |
Starting background music
You must assign an ID to each music track so that you can start, stop, or set the volume of music tracks by ID.
musicParam | Music parameter |
startBlock | Callback of starting music |
progressBlock | Callback of playback progress |
completeBlock | Callback of ending music |
|
pure virtual |
Stopping background music
id | Music ID |
#define __ITXAUDIOEFFECTMANAGER_H__ |