MeiCam SDK For iOS  3.14.0
Instance Methods | Properties | List of all members
NvsAudioClip Class Reference

Audio clip, description of the audio file. More...

#import <NvsAudioClip.h>

Inheritance diagram for NvsAudioClip:
NvsClip NvsObject

Instance Methods

(NvsAudioFx *) - appendFx:
 Appends special effects at the end of the clip. More...
 
(NvsAudioFx *) - insertFx:fxIndex:
 Inserts a special effect at the index of the specified effect on the clip. More...
 
(NvsAudioFx *) - appendCustomFx:
 Appends custom audio effect to the clip. More...
 
(NvsAudioFx *) - insertCustomFx:fxIndex:
 Inserts a custom audio effect at the specified effect index on the clip. More...
 
(BOOL) - removeFx:
 Removes the special effect from the specified index,The subsequent audioFx index moves forward. More...
 
(NvsAudioFx *) - getFxWithIndex:
 Gets the special effect by index. More...
 
(BOOL) - removeAllFx
 Remove all the effects. More...
 
- Instance Methods inherited from NvsClip
(NvsTimeline *) - getInternalTimeline
 Get the internal timeline object from the clip. More...
 
(BOOL) - changeFilePath:
 Change the clip file path. More...
 
(int64_t) - changeTrimInPoint:affectSibling:
 Change the trimming in point of the clip. More...
 
(BOOL) - moveTrimPoint:
 Move trim points of clip(in microseconds) More...
 
(int64_t) - changeTrimOutPoint:affectSibling:
 Change the trimming out point of the clip. More...
 
(double) - getSpeed
 Get the playback speed of the clip. More...
 
(void) - changeSpeed:
 Change the playback speed of the clip. More...
 
(void) - changeSpeed:keepAudioPitch:
 Change the playback speed of the clip. More...
 
(BOOL) - isKeepAudioPitch
 Get Audio Pitch State. More...
 
(BOOL) - changeCurvesVariableSpeed:keepAudioPitch:
 Changes the playback speed of the clip by curves(only support for video clip). More...
 
(NSString *) - getClipVariableSpeedCurvesString
 get current variable speed curves of clip. More...
 
(int64_t) - getClipPosByTimelinePosCurvesVariableSpeed:
 Gets the pos in clip by current timeline pos when used curves variable speed. More...
 
(int64_t) - getTimelinePosByClipPosCurvesVariableSpeed:
 Gets the pos in timeline by current clip pos when used curves variable speed. More...
 
(void) - setVolumeGain:rightVolumeGain:
 Set the channels (left and right). More...
 
(void) - getVolumeGain:rightVolumeGain:
 Get the channel values (left and right) More...
 
(void) - getRealVolumeAtTime:rightVolumeGain:time:
 Get the real-time volume at a specified time point. More...
 
(void) - setLoopAudio:
 Sets whether to loop audio if the clip' trim out go beyond its audio stream's duration. More...
 
(BOOL) - getLoopAudio
 Gets whether to loop audio if the clip' trim out go beyond its audio stream's duration. More...
 
(NvsAudioFx *) - getAudioVolumeFx
 Gets the audio volume effect of the clip. More...
 
- Instance Methods inherited from NvsObject
(void) - setAttachment:forKey:
 Adds an attachment to the NvsObject object to identify the object of the NvsObject or for other purposes. More...
 
(void) - setTemplateAttachment:forKey:
 Adds additional template data to the NvsObject object to identify the NvsObject template object. More...
 
(NSObject *) - getAttachment:
 Gets attached attachments. More...
 
(NSString *) - getTemplateAttachment:
 Gets an template attachment to NvsObject. More...
 

Properties

int64_t fadeInDuration
 Fade in duration (in microseconds), 0 means no fade-in.Duration must >= 0. More...
 
int64_t fadeOutDuration
 Fade out duration (in microseconds), 0 means no fade-out.Duration must >= 0. More...
 
- Properties inherited from NvsClip
int64_t trimIn
 Clip triming in point (in microseconds). More...
 
int64_t trimOut
 Clip triming out point (in microseconds). More...
 
int64_t inPoint
 The in point of the clip on the timeline (in microseconds). More...
 
int64_t outPoint
 The out point of the clip on the timeline (in microseconds). More...
 
NvsClipType type
 Clip type (video, audio). More...
 
unsigned int index
 The index of the clip on the track. More...
 
NSString * filePath
 File path of clip. More...
 
unsigned int fxCount
 The count of special effects on the clip. More...
 

Detailed Description

Audio clip, description of the audio file.

For audio clips, users can set its triming in-point and out-point, play speed, etc. Users can also add, insert, remove, and acquire multiple audio effects.

Warning
In the NvsAudioClip class, all public APIs are used in the UI thread! ! !

Method Documentation

◆ appendCustomFx:

- (NvsAudioFx *) appendCustomFx: (id< NvsCustomAudioFxRenderer >)  customAudioFxRender

Appends custom audio effect to the clip.

Parameters
NvsCustomAudioFx.RendererUser-implemented custom audio effect renderer interface.
Returns
Returns the appended audio effect object.
Warning
This interface causes the streaming engine state to jump to the engine stop state. For more infomations please refer to Engine Changes.

◆ appendFx:

- (NvsAudioFx *) appendFx: (NSString *)  fxName

Appends special effects at the end of the clip.

Parameters
fxNameThe name of special effect,please refer to getAllBuiltinAudioFxNames() or The List of Built-in Effect Name.
Returns
Returns the appended NvsAudioFx object.
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine
See also
- insertFx:fxIndex:
- removeFx:
- getFxWithIndex:

◆ getFxWithIndex:

- (NvsAudioFx *) getFxWithIndex: (unsigned int)  fxIndex

Gets the special effect by index.

Parameters
fxIndexThe index of the special effect. Range [0, getFxCount())
Returns
Returns the acquired NvsAudioFx object.
See also
- appendFx:
- insertFx:fxIndex:
- removeFx:

◆ insertCustomFx:fxIndex:

- (NvsAudioFx *) insertCustomFx: (id< NvsCustomAudioFxRenderer >)  customAudioFxRender
fxIndex: (unsigned int)  fxIndex 

Inserts a custom audio effect at the specified effect index on the clip.

Parameters
NvsCustomAudioFx.RendererUser-implemented custom audio effect renderer interface.
fxIndexaudio effects' index to insert at.Range [0, getFxCount() - 1 ). If index is outOfRange,It will be add in the end.
Returns
Returns the inserted audio effect object.
Warning
This interface will cause the streaming engine state to jump to the engine stop state. For more information, please refer to Engine Change.

◆ insertFx:fxIndex:

- (NvsAudioFx *) insertFx: (NSString *)  fxName
fxIndex: (unsigned int)  fxIndex 

Inserts a special effect at the index of the specified effect on the clip.

Parameters
fxNameThe name of special effect,please refer to getAllBuiltinAudioFxNames() or The List of Built-in Effect Name.
fxIndexThe index of the specified effect. Range [0, getFxCount() - 1 ). If index is outOfRange,It will be add in the end.
Returns
Returns the inserted NvsAudioFx object.
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.
See also
- appendFx:
- removeFx:
- getFxWithIndex:

◆ removeAllFx

- (BOOL) removeAllFx

Remove all the effects.

Returns
Determines whether the removal is successful. YES means that it's successful; NO means it fails.
See also
- removeFx:

◆ removeFx:

- (BOOL) removeFx: (unsigned int)  fxIndex

Removes the special effect from the specified index,The subsequent audioFx index moves forward.

Parameters
fxIndexThe index of the special effect. Range [0, getFxCount())
Returns
Returns BOOL value. If the value is YES, the removal is successful, and the NO means it fails.
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.
See also
- appendFx:
- insertFx:fxIndex:
- getFxWithIndex:

Property Documentation

◆ fadeInDuration

- (int64_t) fadeInDuration
readwritenonatomicassign

Fade in duration (in microseconds), 0 means no fade-in.Duration must >= 0.

Since
1.16.0

◆ fadeOutDuration

- (int64_t) fadeOutDuration
readwritenonatomicassign

Fade out duration (in microseconds), 0 means no fade-out.Duration must >= 0.

Since
1.16.0

The documentation for this class was generated from the following file: