Retrieves a copy of a sample's data.
This overload uses a managed short[] to reference the buffer data as 16-bit! 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, short[] buffer )
Parameters
- handle
- Type: SystemInt32
The sample handle. - buffer
- Type: SystemInt16
The array (short[]) to receive the data, do not use BASS_SAMPLE_FLOAT or BASS_SAMPLE_8BITS when creating the sample!
Return Value
Type: BooleanIf successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_UNKNOWN | Some other mystery problem! |
Examples
BASS_SAMPLE info = Bass.BASS_SampleGetInfo(sample); short[] buffer = new short[info.length/2]; Bass.BASS_SampleGetData(sample, buffer);
See Also