Copyright © 2005-2018 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 using the embedded Waveform refer to the Waveform class section.

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]

Public Function PeaksBufferLengthGet (

nPlayerIndex as Int16,

nStartPos as Int32,

nEndPos as Int32,

ByRef nBufferLength as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes PeaksBufferLengthGet (

Int16 nPlayerIndex,

Int32 nStartPos,

Int32 nEndPos,

ref Int32 nBufferLength

);


 

[C++]

public: enumErrorCodes PeaksBufferLengthGet (

Int16 nPlayerIndex,

Int32 nStartPos,

Int32 nEndPos,

Int32 __gc[] *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 (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.