Copyright © 2005-2019 MultiMedia Soft

Waveform.PeaksLoadFromMemory method

Previous pageReturn to chapter overviewNext page

Remarks

 

Loads the analyzed sound's peaks from a file of type PKW generated by a previous call to the Waveform.PeaksSave method and stored into a memory buffer: this avoids the need to perform a new time consuming full analysis of the sound's waveform for a sound file whose contents have not been changed.

 

This method will cause the CallbackForPlayersEvents delegate to be invoked with the nEvent parameter set to EV_WAVE_ANALYSIS_START and EV_WAVE_ANALYSIS_DONE as seen when calling the Waveform.AnalyzeFullSound method.

 

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 PeaksLoadFromMemory (

nPlayerIndex as Int16,

pBuffer() as Byte,

nBufferLength as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes PeaksLoadFromMemory (

Int16 nPlayerIndex,

byte[] pBuffer,

Int32 nBufferLength

);


 

[C++]

public: enumErrorCodes PeaksLoadFromMemory (

Int16 nPlayerIndex,

unsigned char __gc[] pBuffer,

Int32 nBufferLength

);


 

 

Parameter

Description

 

 

nPlayerIndex

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

pBuffer

Buffer containing waveform peaks previously loaded in memory.

nBufferLength

Length in bytes of the given 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.