Copyright © 2005-2018 MultiMedia Soft

Waveform.PeaksLoadFromMemory method

Previous pageReturn to chapter overviewNext page



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.





[Visual Basic]

Public Function PeaksLoadFromMemory (

nPlayerIndex as Int16,

pBuffer() as Byte,

nBufferLength as Int32

) as enumErrorCodes



public enumErrorCodes PeaksLoadFromMemory (

Int16 nPlayerIndex,

byte[] pBuffer,

Int32 nBufferLength




public: enumErrorCodes PeaksLoadFromMemory (

Int16 nPlayerIndex,

unsigned char __gc[] pBuffer,

Int32 nBufferLength









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


Buffer containing waveform peaks previously loaded in memory.


Length in bytes of the given buffer


Return value






Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.