Retrieves the immediate sample data or an FFT representation of it.
DWORD BASS_WASAPI_GetData( void *buffer, DWORD length );
|Pointer to a buffer to receive the data.
|Number of bytes wanted, and/or the BASS_ChannelGetData flags.
Return valueIf an error occurs, -1 is returned, use BASS_ErrorGetCode to get the error code. When requesting FFT data, the number of bytes read from the device buffer (to perform the FFT) is returned. When requesting sample data, the number of bytes written to buffer will be returned. When using the BASS_DATA_AVAILABLE flag, the number of bytes in the device's buffer is returned.
|BASS_WASAPI_Init has not been successfully called.
|The BASS_WASAPI_BUFFER flag was not specified in the device's initialization.
RemarksThis function uses BASS_ChannelGetData internally, so it has the same options available.
The BASS_WASAPI_BUFFER flag needs to have been specified in the device's initialization to enable the use of this function, except for with the BASS_DATA_AVAILABLE flag.
With an output device, the BASS_DATA_AVAILABLE return value may be larger than the buffer size indicated by BASS_WASAPI_GetInfo due to additional latency in the device/driver. When a mixer is feeding an output device, the BASS_DATA_AVAILABLE return value can be used with the BASS_ATTRIB_MIXER_LATENCY attribute and/or the BASS_Mixer_ChannelGetPositionEx function, to have the mixer account for the latency in its source position reporting and data/level retrieval.