BASS.NET API for the Un4seen BASS Audio LibraryWaveFormWaveFormSaveToMemory Method (Boolean)BASS.NET API for the Un4seen BASS Audio Library
Saves a rendered WaveForm to a byte array.

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

public byte[] WaveFormSaveToMemory(
	bool binary


Type: SystemBoolean
If the WaveForm will be saved in binary format - else standard serialization will be carried out.

Return Value

Type: Byte
The byte array containing the serialized data of the wave form.

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

private byte[] waveformSave;
// save the wave form to a byte array
waveformSave = WF.WaveFormSaveToMemory(true);
// load the wave form to a byte array
WF = new Un4seen.Bass.Misc.WaveForm();
WF.WaveFormLoadFromMemory( waveformSave, true );
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