Retrieves the latency of input or output channels.
DWORD BASS_ASIO_GetLatency(
BOOL input
);
| input | Get the input latency? Else, the output latency. |
| BASS_ERROR_INIT | BASS_ASIO_Init has not been successfully called. |
| BASS_ERROR_UNKNOWN | Some other mystery problem! |
The latency time can by calculated be dividing the sample latency by the device sample rate. When a channel is being resampled, the sample latency will change, but the effective latency time remains constant.
double rate = BASS_ASIO_GetRate(); // get the sample rate
printf("input latency = %g ms\n", BASS_ASIO_GetLatency(TRUE) * 1000 / rate);
printf("output latency = %g ms\n", BASS_ASIO_GetLatency(FALSE) * 1000 / rate);