Sets a sample's data.

BOOL BASS_SampleSetData(
    HSAMPLE handle,
    void *buffer


handleThe sample handle.
bufferPointer to 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 required length and format of the data can be retrieved via BASS_SampleGetInfo.

A sample's data can be set at any time, including during playback.

See also

BASS_SampleCreate, BASS_SampleGetData