The CPU usage of a channel.
BASS_ChannelGetAttribute( DWORD handle, BASS_ATTRIB_CPU, float *cpu );
|handle||The channel handle... a HMUSIC or HSTREAM.|
|cpu||The CPU usage.|
Like BASS_GetCPU, this function does not strictly tell the CPU usage, but rather how timely the processing is. For example, if it takes 10ms to generate 100ms of data, that would be 10%. If the reported usage exceeds 100%, that means the channel's data is taking longer to generate than to play. The duration of the data is based on the channel's current sample rate (BASS_ATTRIB_FREQ).
A channel's CPU usage is updated whenever it generates data. That could be during a playback buffer update cycle, or a BASS_Update call, or a BASS_ChannelUpdate call. For a decoding channel, it would be in a BASS_ChannelGetData or BASS_ChannelGetLevel call.
This attribute is read-only, so cannot be modified via BASS_ChannelSetAttribute.