ASIO.DeviceLatencyGet method |
|
Remarks
Obtains the latency, expressed in samples per second, of input or output channels belonging to the given ASIO device.
For input channels the latency is the delay between the sound being recorded and finally reaching the encoder while, for output channels, is the delay between the sample data being extracted from the decoding buffer and currently being heard. The latency is dependant on the buffer size of the ASIO device: the buffer size can be modified through the control panel provided by the driver of the ASIO device itself and accessible through the ASIO.ControlPanelDisplay method.
For further details about the use of ASIO drivers see the ASIO object section and the How to manage ASIO drivers tutorial.
Syntax
[Visual Basic] control.ASIO.DeviceLatencyGet ( nDeviceIndex as Integer, bInputChannel as enumBoolean ) as Long |
[C++] long control.ASIO.DeviceLatencyGet ( short nDeviceIndex, short bInputChannel ); |
Parameter |
Description |
|||||||||
|
|
|||||||||
nDeviceIndex |
Number representing the zero-based index of the ASIO device. This index is related to available ASIO devices so it must be the related to the enumeration performed through the ASIO.DeviceGetCount and ASIO.DeviceGetDesc methods: it must not be confused with indexes related to generic input devices enumerated through the GetInputDevicesCount and GetInputDeviceDesc methods which may contain both DirectSound and ASIO devices. |
|||||||||
bInputChannel |
Boolean value that specifies if the we want to obtain the latency of input or of output channels. Supported values are the following:
|
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred (see the LastError property for further error details) |
> 0 |
Latency expressed in samples per second |