BASS_WASAPI_PutData
Adds sample data to an output device buffer.
DWORD BASS_WASAPI_PutData( void *buffer, DWORD length );
Parameters
buffer | Pointer to the sample data. |
length | The amount of data in bytes. |
Return value
If successful, the amount of data used is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.Error codes
BASS_ERROR_INIT | BASS_WASAPI_Init has not been successfully called. |
BASS_ERROR_NOTAVAIL | The device is being fed by a WASAPIPROC callback function, or it is an input device. |
BASS_ERROR_ILLPARAM | length is not valid, it must equate to a whole number of samples. |
BASS_ERROR_UNKNOWN | Some other mystery problem! |
Remarks
As much data as possible will be placed in the device's buffer; this function will have to be called again for any remainder.Data should be provided at a rate sufficent to sustain playback. If the buffer gets exhausted, output will stall until more data is provided. BASS_WASAPI_GetData (BASS_DATA_AVAILABLE) can be used to check how much data is buffered.