BASS.NET API for the Un4seen BASS Audio Library

WaveFormWaveFormLoadFromMemory Method (Byte, Boolean)

BASS.NET API for the Un4seen BASS Audio Library
Loads a rendered WaveForm from a byte array.

Namespace:  Un4seen.Bass.Misc
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public bool WaveFormLoadFromMemory(
	byte[] data,
	bool binary
)

Parameters

data
Type: SystemByte
The byte array to load the rendered data from (e.g. created with WaveFormSaveToMemory).
binary
Type: SystemBoolean
If the WaveForm will be loaded from a binary format - else standard deserialization will be carried out.

Return Value

Type: Boolean
on success, else .
Remarks

The binary format is much more compact and faster, so it is advised to use this format. Note, that you must load the WaveForm in the same format as it was saved.
Examples

C#
private byte[] waveformSave;
...
// save the wave form to a byte array
waveformSave = WF.WaveFormSaveToMemory();
..
// load the wave form to a byte array
WF = new Un4seen.Bass.Misc.WaveForm();
WF.WaveFormLoadFromMemory( waveformSave );
WF.DrawMarker = WaveForm.MARKERDRAWTYPE.Line | WaveForm.MARKERDRAWTYPE.Name | WaveForm.MARKERDRAWTYPE.NamePositionAlternate;
this.pictureBox1.BackgroundImage = WF.CreateBitmap( this.pictureBox1.Width, this.pictureBox1.Height, -1, -1, true);
See Also

Reference