BASS.NET API for the Un4seen BASS Audio Library

BassBASS_SampleGetData Method (Int32, Int32)

BASS.NET API for the Un4seen BASS Audio Library
Retrieves a copy of a sample's data.

This overload uses a managed int[] to reference the buffer data (Note: if we expect to receive 16-bit data, a single Int32 value will contain 2 x 16-bit, left and right channel)! SHOULD ONLY BE USED, if the sample was created WITHOUT BASS_SAMPLE_FLOAT or BASS_SAMPLE_8BITS!

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

[DllImportAttribute("bass")]
public static bool BASS_SampleGetData(
	int handle,
	int[] buffer
)

Parameters

handle
Type: SystemInt32
The sample handle.
buffer
Type: SystemInt32
The array (int[]) to receive the data, e.g. when creating the sample with default setting, meaning 16-bit samples, an Int32 value contains 2 channels (left and right)!

Return Value

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

The buffer must be big enough to receive the sample's data, the size of which can be retrieved via BASS_SampleGetInfo(Int32, BASS_SAMPLE).

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_UNKNOWNSome other mystery problem!

See Also

Reference