MeiCam SDK For Android  3.14.0
Public Member Functions | Protected Member Functions | List of all members
com.meicam.sdk.NvsWaveformView Class Reference

Audio waveform display. More...

Inheritance diagram for com.meicam.sdk.NvsWaveformView:

Public Member Functions

 NvsWaveformView (Context context)
 
 NvsWaveformView (Context context, AttributeSet attrs)
 
 NvsWaveformView (Context context, AttributeSet attrs, int defStyleAttr)
 
 NvsWaveformView (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
 
void setAudioFilePath (String audioFilePath)
 Sets the audio file path. More...
 
String getAudioFilePath ()
 Gets the audio file path. More...
 
void setTrimIn (long trimIn)
 Sets the trim-in point of the audio file. More...
 
long getTrimIn ()
 Gets the trim-in point of the audio file. More...
 
void setTrimOut (long trimOut)
 Sets the trim-out point of the audio file. More...
 
long getTrimOut ()
 Gets the trim-in point of the audio. More...
 
void setWaveformColor (int waveformColor)
 Sets the color of the audio waveform. More...
 
int getWaveformColor ()
 Gets the color of the audio waveform. More...
 
void setSingleChannelMode (boolean singleChannelMode)
 Sets the single channel waveform mode. More...
 
boolean getSingleChannelMode ()
 Gets the info about whether the single channel waveform mode is started. More...
 
void onWaveformDataReady (long taskId, String audioFilePath, long audioFileSampleCount, long samplesPerGroup, byte[] leftWaveformData, byte[] rightWaveformData)
 
void onWaveformDataGenerationFailed (long taskId, String audioFilePath, long samplesPerGroup)
 

Protected Member Functions

void onSizeChanged (int w, int h, int oldw, int oldh)
 
void onDraw (Canvas canvas)
 
void onAttachedToWindow ()
 
void onDetachedFromWindow ()
 

Detailed Description

Audio waveform display.

Class for displaying waveform of audio files

Since
2.0.0

Constructor & Destructor Documentation

◆ NvsWaveformView() [1/4]

com.meicam.sdk.NvsWaveformView.NvsWaveformView ( Context  context)
inline

◆ NvsWaveformView() [2/4]

com.meicam.sdk.NvsWaveformView.NvsWaveformView ( Context  context,
AttributeSet  attrs 
)
inline

◆ NvsWaveformView() [3/4]

com.meicam.sdk.NvsWaveformView.NvsWaveformView ( Context  context,
AttributeSet  attrs,
int  defStyleAttr 
)
inline

◆ NvsWaveformView() [4/4]

com.meicam.sdk.NvsWaveformView.NvsWaveformView ( Context  context,
AttributeSet  attrs,
int  defStyleAttr,
int  defStyleRes 
)
inline

Member Function Documentation

◆ getAudioFilePath()

String com.meicam.sdk.NvsWaveformView.getAudioFilePath ( )
inline

Gets the audio file path.

Returns
Returns the string value of the audio file path.
See also
setAudioFilePath

◆ getSingleChannelMode()

boolean com.meicam.sdk.NvsWaveformView.getSingleChannelMode ( )
inline

Gets the info about whether the single channel waveform mode is started.

Returns
Returns a Boolean value indicating whether the single channel waveform mode is on.
See also
setSingleChannelMode

◆ getTrimIn()

long com.meicam.sdk.NvsWaveformView.getTrimIn ( )
inline

Gets the trim-in point of the audio file.

Returns
Returns the trim-out point of the audio file(in microseconds).
See also
setTrimIn

◆ getTrimOut()

long com.meicam.sdk.NvsWaveformView.getTrimOut ( )
inline

Gets the trim-in point of the audio.

Returns
Returns the trim-in point of the audio in microseconds.
See also
setTrimOut

◆ getWaveformColor()

int com.meicam.sdk.NvsWaveformView.getWaveformColor ( )
inline

Gets the color of the audio waveform.

Returns
Returns Color of the audio waveform.
See also
setWaveformColor

◆ onAttachedToWindow()

void com.meicam.sdk.NvsWaveformView.onAttachedToWindow ( )
inlineprotected

◆ onDetachedFromWindow()

void com.meicam.sdk.NvsWaveformView.onDetachedFromWindow ( )
inlineprotected

◆ onDraw()

void com.meicam.sdk.NvsWaveformView.onDraw ( Canvas  canvas)
inlineprotected

◆ onSizeChanged()

void com.meicam.sdk.NvsWaveformView.onSizeChanged ( int  w,
int  h,
int  oldw,
int  oldh 
)
inlineprotected

◆ onWaveformDataGenerationFailed()

void com.meicam.sdk.NvsWaveformView.onWaveformDataGenerationFailed ( long  taskId,
String  audioFilePath,
long  samplesPerGroup 
)
inline

◆ onWaveformDataReady()

void com.meicam.sdk.NvsWaveformView.onWaveformDataReady ( long  taskId,
String  audioFilePath,
long  audioFileSampleCount,
long  samplesPerGroup,
byte[]  leftWaveformData,
byte[]  rightWaveformData 
)
inline

◆ setAudioFilePath()

void com.meicam.sdk.NvsWaveformView.setAudioFilePath ( String  audioFilePath)
inline

Sets the audio file path.

After audio file is set, the in-point and out-point will be automatically set to 0 and the file length separately!

Parameters
audioFilePathAudio file path
See also
getAudioFilePath

◆ setSingleChannelMode()

void com.meicam.sdk.NvsWaveformView.setSingleChannelMode ( boolean  singleChannelMode)
inline

Sets the single channel waveform mode.

In single channel mode, only one channel of waveform will be drawn even if the audio file is stereo.

Parameters
singleChannelModeWhether to turn on single channel waveform mode
See also
setSingleChannelMode

◆ setTrimIn()

void com.meicam.sdk.NvsWaveformView.setTrimIn ( long  trimIn)
inline

Sets the trim-in point of the audio file.

Parameters
trimInThe trim-in point of the audio file(in microseconds)
See also
getTrimIn

◆ setTrimOut()

void com.meicam.sdk.NvsWaveformView.setTrimOut ( long  trimOut)
inline

Sets the trim-out point of the audio file.

Parameters
trimOutThe trim-out point of the audio file(in microseconds)
See also
getTrimOut

◆ setWaveformColor()

void com.meicam.sdk.NvsWaveformView.setWaveformColor ( int  waveformColor)
inline

Sets the color of the audio waveform.

Parameters
waveformColorColor of the audio waveform
See also
setWaveformColor

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