BASS.NET API for the Un4seen BASS Audio Library

BassBASS_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.17.5
Syntax

[DllImportAttribute("bass")]
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:
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