Package com.shixing.sxedit
Class SXAudioManager
- java.lang.Object
-
- com.shixing.sxedit.SXAudioManager
-
public class SXAudioManager extends java.lang.Object
音频管理器
-
-
Constructor Summary
Constructors Constructor Description SXAudioManager(long nativeAudioManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getCurrentTime()
获取当前的播放时间double
getDuration()
获取音轨时长double
getMaxTrackOutPoint()
获取音轨中音频结束时间点最大的时间double
getOutputChannelCount()
获取音轨输出音频的声道数double
getOutputSampleRate()
获取音轨输出音频的采样率void
seek(double time)
当前时间跳到time对应的时间void
setDuration(double duration)
设置音频的时长,如不设置则取maxTrackOutPoint()的值
-
-
-
Method Detail
-
setDuration
public void setDuration(double duration)
设置音频的时长,如不设置则取maxTrackOutPoint()的值- Parameters:
duration
- 时长,单位为秒
-
getDuration
public double getDuration()
获取音轨时长- Returns:
- 单位为秒
-
getMaxTrackOutPoint
public double getMaxTrackOutPoint()
获取音轨中音频结束时间点最大的时间- Returns:
- 单位为秒
-
seek
public void seek(double time)
当前时间跳到time对应的时间- Parameters:
time
- 单位为秒
-
getCurrentTime
public double getCurrentTime()
获取当前的播放时间- Returns:
- 单位为秒
-
getOutputSampleRate
public double getOutputSampleRate()
获取音轨输出音频的采样率- Returns:
- 采样率
-
getOutputChannelCount
public double getOutputChannelCount()
获取音轨输出音频的声道数1. 默认双声道
- Returns:
- 声道数
-
-