Due to INIC
internal routing and network setup, audio data can have different delay times from source to sink for diverse routes. These delay between source and sink is called ATD
(Audio Transportation Delay). There are application scenarios of audio data processing where it is essential to know the ATD
value of the routes, for example Beam Forming or Noise Canceling. In such applications it is required that all simultaneously recorded samples from multiple microphones are processed together. Therefore the time shift between the microphones can be determined with the use of the ATD module.
The ATD
calculation is implemented as an additional feature of the Route Management. It can be enabled for desired routes. The class CAtd calculates the audio transportation delay for the corresponding route and keeps the value ready for user requests. Also the user gets notified, if the ATD
value changes due to a network event.
The initialization of the ATD class is done by the Routing Management. Desired routes can be signed in for ATD calculation by setting the atd_enabled
flag to true
and the clock_config to the corresponding streaming port clock speed of the source endpoint.
This ATD configuration could look like the example below. The required values are set in the AtdSetup structure and included in the route structure.
The ATD module acts as a subclass of the Routes Management. Direct interaction between the API and ATD class is not needed. However, the API gets notified if the ATD value has changed due to an MPR change event or new route build event. This notification is realized by a call of the App_OnRoutingResult() function. Through the given route info it can be distinguish whether it is an ATD update available, an ATD error occurred or an other routes event occurred. If an updated ATD value is available for a route, the user can get if by calling the Routing Management function Ucs_Rm_GetAtdValue().
The following also illustrates the interaction between these objects within the "ATD calculation process" use case.
The code example below shows how the CAtd class is used from the API using the routing management.