BASS.NET API for the Un4seen BASS Audio LibraryBassBASS_SampleFree Method BASS.NET API for the Un4seen BASS Audio Library
Frees a sample's resources.

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

[DllImportAttribute("bass.dll", CharSet = CharSet.Unicode)]
public static bool BASS_SampleFree(
	int handle
)

Parameters

handle
Type: SystemInt32
The sample handle.

Return Value

Type: Boolean
If successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.

Examples

Play a sample with it's default settings:
VB
Dim sample As Integer = Bass.BASS_SampleLoad("test.wav", 0L.ToUInt32(), 0, 1, BASSFlag.BASS_DEFAULT)
Dim channel As Integer = Bass.BASS_SampleGetChannel(sample, False) ' get a sample channel
Bass.BASS_ChannelPlay(channel, False) ' play it
...
' when done
Bass.BASS_SampleFree(sample)
int sample = Bass.BASS_SampleLoad("test.wav", 0L, 0, 1, BASSFlag.BASS_DEFAULT);
int channel = Bass.BASS_SampleGetChannel(sample, false); // get a sample channel
Bass.BASS_ChannelPlay(channel, false); // play it
...
// when done
Bass.BASS_SampleFree(sample);
See Also

Reference