Copyright © 2001-2019 MultiMedia Soft

Waveform.PeaksBufferLengthGet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Given a range in milliseconds, obtains the size in bytes required by the buffer in order to store related waveform peaks. Once the size is known, you may allocate a buffer to pass to the Waveform.PeaksBufferGet method.

 

Before calling this method it's mandatory performing a previous sound's analysis through a call to the Waveform.AnalyzeFullSound method and waiting its completion through the WaveAnalysisDone event.

 

For further details about generating a waveform bitmap of the loaded sound, before starting its playback, refer to the How to obtain the sound's waveform tutorial.

 

 

Syntax

 

[Visual Basic]

control.Waveform.PeaksBufferLengthGet (

nPlayer as Integer,

nStartPos as Long,

nEndPos as Long,

nBufferLength as Long

) as enumErrorCodes


 

[C++]

short control.Waveform.PeaksBufferLengthGet (

short nPlayer,

long nStartPos,

long nEndPos,

long nBufferLength

);


 

 

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the player that will use the Waveform

nStartPos

Number representing the start position, expressed in milliseconds, where we want to get waveform's peaks.

The value 0 represents the sound's beginning.

nEndPos

Number representing the end position, expressed in milliseconds, where we want to get waveform's peaks.

The value -1 represents the sound's end.

nBufferLength

Reference that, on return from the method call, will contain the size in bytes needed for storing requested peaks into a buffer.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful