Contact us

tel:15797766463

mail:business@seeshiontech.com

中文
English
中文
登录/注册

{user.username}

ID: {user.id}

<span><a href="/docs/index.html">首页</a> > <a href="/docs/en-us/editor/group_123.html">SDK</a> > <a href="/docs/en-us/editor/group_129.html">iOS SDK</a> > SXAudioItem</span>

SXAudioItem

Update time : 2020-08-14 10:53:16

SXAudioItem is similar to SXTrack but there is no need to add it to any group. It is managed by SXEditManager directly.

//example:
SXAudioItem *audioItem = [_editManager createAudioItem:musicPath inPoint:inPoint];
if (audioItem) {

}
// The start time and end time of the audio track. 
@property (nonatomic, assign) float startTime;
/// The insertion time of audio track.
@property (nonatomic, assign) float inPoint;
/// The duration of audio track. 
@property (nonatomic, assign) float duration;
/// Volume. 
@property (nonatomic, assign) float gain;
/// Fade-in duration. 
@property (nonatomic, assign) float fadeIn;
/// Fade-out duration. 
@property (nonatomic, assign) float fadeOut;
/// The speed coefficient. 
@property (nonatomic, assign) float speed;
/// The coefficient of changing tone.
@property (nonatomic, assign) float pitch;
/// Loop or not. 
@property (nonatomic, assign) BOOL loop;

A. SXAudioThumbnailCache SXAudioThumbnailCache will manage the data of audio waves to be drawn based on the path.

B. SXAudioThumbnail The image data can be gotten via audio path.

_thumbnail = [[SXAudioThumbnail  alloc] initWithPath:_model.audioItem.filePath cache:_audioCache singleSamples:512];
_thumbnail.delegate = self;

- (NSArray *)getThumbDataStartTime:(NSTimeInterval)startTime duration:(NSTimeInterval)duration;