Overview
GTT can let external tools interact with device. The requests from external tuning tools will come to GTT and GTT will forward it to the device. This is enabled through a WCF service endpoint that external tools can tap into.
Setup
GTT needs a minimum setup for external endpoints to function.
- GTT should have project open. Only external audio objects can be retrieved and operated from external tools. So, the project should have signal flow with audio objects in external category in toolbox.
- GTT should be connected to device. The device can be a virtual device or physical amplifier board.
- External endpoint should be opened. Note: To use this feature, license is needed. Talk to Audioworx admin for enabling the feature.
Supported features
GTT supports the following 3 methods for tuning data.
- GetExternalAudioObjects – This method will return all the 3rd party audio objects in the device.
- SendTuningDataAsync– This method should be used to send tuning data to audio object.
- ReceiveTuningDataAsync – This method should be used for receiving tuning data from an audio object.
To support control data tuning, GTT has the following methods
- SendControlDataAsync – This method should be used to send control data by mentioning the control id and control data. Note that control data supports only 16 bits currently.
- ReceiveControlDataAsync – This method can be used for retrieving control data by providing control id.
GTT also supports streaming with following methods.
- EstablishSocketConnection– This method should be called first for streaming to perform. 3rd party tool should first create a socket connection and then make a call with the port number where it is listening. GTT will connect to that port. This is socket connection.
- DisconnectSocketConnection– This method will unsubscribe all the subscriptions and close the socket connection.
- SubscribeForStreamDataAsync– This method subscribe for stream data for an audio object.
- UnSubscribeForStreamData– This method stops/unsubscribes the stream data.
Start / Stop Endpoint
Once points 1 and 2 in Setup is completed. Endpoint has to be started for external tool communication and stopped when this has to be stopped. External endpoint can be started by clicking the button marked below. The same button works as a toggle switch to enable and disable endpoint.

External tool interaction
Following are the steps to integrate with GTT.
GTT will host the endpoint at the following URI.
http://localhost:8080/XtpHandlerService
Discover the service using this URL using known tool. Create a service reference for the same.
Then using the service reference call the APIs for different operations.
API signatures
List<ExternalAudioObject> GetExternalAudioObjects();
The function should be used to send data to the specified audio object. There is no parameters for this API. It will return a list of ExternalAudioObjects.
Task<byte[]> SendTuningDataAsync(ExternalAudioObject audioObject, int subBlock, int offset, byte[] data);
This function will query the external audio object for data. This takes the object that needs to be queried, subblock and offset id and the number of bytes of data to be retrieved. It will return list of bytes that is received from the audio object.
Task<byte[]> ReceiveTuningDataAsync(ExternalAudioObject audioObject,int subBlock, int offset, byte[] size);
This API will send the bytes to the audio object mentioned in audioObject, subblock and offset.
bool EstablishSocketConnection(int port);
This API will be called by 3rd party application to start a socket connection which will be used by the streaming service to send continuous data. It takes a port number where the client (external tool) is listening.
bool DisconnectSocketConnection(int port);
This function will close all the subscriptions for streaming. It will close the socket connection and return status to client.
Task<SubscriptionResponse> SubscribeForStreamDataAsync(ExternalAudioObject audioObject, int subBlock, int offset, int messagePerSecond, bool beforeCalc);
This function can be used to subscribe for streaming of a particular data from audio object. Parameters include audio object, its subblock and offset. There is an option to send the number of messages to be streamed per second and if the streaming data to be retrieved before calc or after calc. All this needs to be supported by the audio object. Once the subscription is complete, subscriptionid and status is returned in an object.
bool UnSubscribeForStreamData(Guid subscriptionId);
This function can be used to unsubscribe a particular subscription or all subscription by passing -1
Control data support
GTT supports sending and receiving control data. Here are the 2 methods supported by the end point. To send control data, user should know the control Ids in the signal flow. Also the data range should be known before hand. With this information, the following functions can be called.
Task<Byte[]> SendControlDataAsync(int ControlId, byte[] data);
Task<Byte[]> ReceiveControlDataAsync(int ControlId, byte[] data);