Retrieves a copy of a sample's data.

BOOL BASS_SampleGetData(
    HSAMPLE handle,
    void *buffer


handleThe sample handle.
bufferPointer to a buffer to receive the data.

Return value

If successful, TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_UNKNOWNSome other mystery problem!


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

See also

BASS_ChannelGetData, BASS_SampleSetData