Complete reference for all Echo API functions. See EchoAIOInterface.h for the authoritative C/C++ header.
Initialize the API library. Must be called before any other API functions.
void AIO_initialize();Shutdown the API library. Should be called before program exit to release resources.
void AIO_shutdown();Get the library version string.
void AIO_getLibraryVersion(char* text, size_t textBufferBytes);Parameters:
text- Buffer to receive the version stringtextBufferBytes- Size of the buffer in bytes
Get a human-readable error message for the most recent error.
void AIO_getErrorString(char* text, size_t textBufferBytes);Parameters:
text- Buffer to receive the error stringtextBufferBytes- Size of the buffer in bytes
Check if an Echo AIO device is connected.
int AIO_isAIOConnected();Returns: Non-zero if an AIO device is connected, zero otherwise.
Check if an Echo ATS device is connected.
int AIO_isATSConnected();Returns: Non-zero if an ATS device is connected, zero otherwise.
Get the total number of input channels.
int AIO_getNumInputChannels();Returns: Number of input channels.
Get the total number of output channels.
int AIO_getNumOutputChannels();Returns: Number of output channels.
Get the module type installed in a slot (AIO only).
int AIO_getModuleType(int moduleSlot);Parameters:
moduleSlot- 0 for center slot, 1 for outer slot
Returns: Module type code:
| Value | Module |
|---|---|
| -1 | Unknown |
| 0 | None |
| 1 | AIO-A (analog mic) |
| 2 | AIO-S (speaker monitor) |
| 3 | AIO-L (line) |
| 4 | AIO-C (combo) |
| 5 | AIO-H (headphone) |
| 6 | AIO-T (TDM) |
| 7 | AIO-B (Bluetooth) |
| 8 | ATS analog |
| 9 | ATS digital |
Check if a slot has an AIO-C (combo) module.
int AIO_hasComboModule(int moduleSlot);Check if a slot has an AIO-T (TDM) module.
int AIO_hasTModule(int moduleSlot);Check if a slot has an AIO-B (Bluetooth) module.
int AIO_hasBluetoothModule(int moduleSlot);Check if an input channel has gain control.
int AIO_hasInputGainControl(int inputChannel);Returns: Non-zero if channel has gain control.
Get the current gain for an input channel.
int AIO_getInputGain(int inputChannel, int* gain);Parameters:
inputChannel- Channel number (0-based)gain- Pointer to receive gain value
Returns: ECHO_AIO_OK on success, negative error code on failure.
Gain Values:
- AIO: 1, 10, or 100 (multiplier)
- ATS: 1, 3, 10, 31, or 100 (multiplier)
Set the gain for an input channel.
int AIO_setInputGain(int inputChannel, int gain);Parameters:
inputChannel- Channel number (0-based)gain- Gain value
Returns: ECHO_AIO_OK on success.
Set the input gain using direct multiplier values. Recommended for ATS devices.
int AIO_setInputGainDirect(int inputChannel, int gain);Parameters:
inputChannel- Channel number (0-based)gain- Gain multiplier (ATS: 1/3/10/31/100, AIO: 1/10/100)
Returns: ECHO_AIO_OK on success, ECHO_AIO_INVALID_VALUE for invalid gain.
Check if an input channel has constant current power (CCP/IEPE) control.
int AIO_hasConstantCurrentControl(int inputChannel);Get the CCP state for an input channel.
int AIO_getConstantCurrentState(int inputChannel, int* enabled);Parameters:
inputChannel- Channel number (0-based)enabled- Pointer to receive state (0=disabled, 1=enabled)
Set the CCP state for an input channel.
int AIO_setConstantCurrentState(int inputChannel, int enabled);Parameters:
inputChannel- Channel number (0-based)enabled- 0 to disable, 1 to enable
Check if an input channel supports TEDS.
int AIO_hasTEDS(int inputChannel);Read TEDS data from a microphone and return as JSON.
int AIO_getTEDSProperties(int inputChannel, char* jsonText,
size_t jsonBufferBytes, size_t* jsonBytesRequired);Parameters:
inputChannel- Channel number (0-based)jsonText- Buffer for JSON output (can be NULL)jsonBufferBytes- Buffer sizejsonBytesRequired- Receives required buffer size
Check if an output channel has gain control.
int AIO_hasOutputGainControl(int outputChannel);Get the gain for an output channel.
int AIO_getOutputGain(int outputChannel, int* gain);Parameters:
outputChannel- Channel number (0-based)gain- Pointer to receive gain value (0-255)
Set the gain for an output channel.
int AIO_setOutputGain(int outputChannel, int gain);Parameters:
outputChannel- Channel number (0-based)gain- Gain value (0-255)
Get an integer parameter for an input channel.
int AIO_getInputChannelIntParameter(int inputChannel, int parameter, int* value);Set an integer parameter for an input channel.
int AIO_setInputChannelIntParameter(int inputChannel, int parameter, int value);Get an integer parameter for an output channel.
int AIO_getOutputChannelIntParameter(int moduleSlot, int outputChannel,
int parameter, int* value);Set an integer parameter for an output channel.
int AIO_setOutputChannelIntParameter(int moduleSlot, int outputChannel,
int parameter, int value);Get an integer parameter for a module.
int AIO_getModuleIntParameter(int moduleSlot, int parameter, int* value);Set an integer parameter for a module.
int AIO_setModuleIntParameter(int moduleSlot, int parameter, int value);Get a floating-point parameter for a module.
int AIO_getModuleDoubleParameter(int moduleSlot, int parameter, double* value);Set a floating-point parameter for a module.
int AIO_setModuleDoubleParameter(int moduleSlot, int parameter, double value);Apply TDM module parameter changes to hardware.
int AIO_updateTDM(int moduleSlot);Get an integer device-level parameter.
int AIO_getDeviceIntParameter(int parameter, int* value);Set an integer device-level parameter.
int AIO_setDeviceIntParameter(int parameter, int value);Clock Source Parameter (0xd000):
| Value | Source |
|---|---|
| 0 | Internal |
| 1 | USB |
| 2 | Center module |
| 3 | Outer module |
Get the ASIO preferred buffer size.
int AIO_getASIOPreferredBufferSize();Returns: Buffer size in samples.
Set the ASIO preferred buffer size.
int AIO_setASIOPreferredBufferSize(int bufferSize);Get the current sample rate.
int AIO_getSampleRate();Returns: Sample rate in Hz.
Set the sample rate.
int AIO_setSampleRate(int sampleRate);Check if WASAPI support is enabled.
int AIO_isWASAPIEnabled();Enable or disable WASAPI support.
int AIO_setWASAPIEnabled(int enabled);These functions are only available when an ATS device is connected.
Get the ATS device serial number.
int ATS_getSerialNumber(unsigned int* serialNumber);Write data via I2C.
int ATS_writeI2C(int sdaSelect, int i2cAddress, int registerAddress,
int registerLength, unsigned char* data);Read data via I2C.
int ATS_readI2C(int sdaSelect, int i2cAddress, int registerAddress,
int registerLength, unsigned char* data);Get or set the AUX output state (4-bit bitmask).
int ATS_getAuxOut(unsigned char* bits);
int ATS_setAuxOut(unsigned char bits);Read the AUX input state.
int ATS_getAuxIn(unsigned char* bits);Get or set the digital I/O mode (0=S/PDIF, 1=Word Clock).
int ATS_getDigitalIOMode(unsigned char* mode);
int ATS_setDigitalIOMode(unsigned char mode);Get or set word clock termination state.
int ATS_getWordClockTerminated(int* terminated);
int ATS_setWordClockTerminated(int terminated);Get or set impedance measurement mode.
int ATS_getImpedanceMode(int* enabled);
int ATS_setImpedanceMode(int enabled);Get or set analog input mode (0=Loopback, 1=Analog).
int ATS_getAnalogInputMode(int channel, int* mode);
int ATS_setAnalogInputMode(int channel, int mode);Parameters:
channel- Input channel (0-7)mode- 0=Loopback (output to input), 1=Analog connector
Get or set analog output mode.
int ATS_getAnalogOutputMode(int channel, int* mode);
int ATS_setAnalogOutputMode(int channel, int mode);Parameters:
channel- Output channel (0-3)mode- 0=Line, 1=Amplifier, 2=Headphone
| Code | Constant | Description |
|---|---|---|
| 0 | ECHO_AIO_OK | Success |
| -1 | ECHO_AIO_NOT_INITIALIZED | Library not initialized |
| -2 | ECHO_AIO_INVALID_INPUT_CHANNEL | Invalid input channel |
| -3 | ECHO_AIO_INVALID_OUTPUT_CHANNEL | Invalid output channel |
| -4 | ECHO_AIO_INVALID_PARAMETER | Invalid parameter ID |
| -5 | ECHO_AIO_INVALID_BUFFER_SIZE | Buffer too small |
| -6 | ECHO_AIO_NOT_FOUND | Resource not found |
| -7 | ECHO_AIO_USB_COMMAND_FAILED | USB error |
| -8 | ECHO_AIO_INVALID_MODULE_SLOT | Invalid slot (0 or 1) |
| -9 | ECHO_AIO_NOT_SUPPORTED | Feature not supported |
| -10 | ECHO_AIO_TEDS_DEVICE_NOT_FOUND | No TEDS microphone |
| -11 | ECHO_AIO_INVALID_VALUE | Value out of range |
| -12 | ECHO_AIO_MISSING_PARAMETER | Required param missing |
| -13 | ECHO_AIO_TIMEOUT | Operation timed out |
| -14 | ECHO_AIO_INVALID_POINTER | Null pointer |
| Constant | Value | Description |
|---|---|---|
| AIO_COMBO_MODULE_PARAMETER_FIRMWARE_VERSION | 0xc0000 | Read-only firmware version |
| AIO_COMBO_MODULE_PARAMETER_SERIAL_NUMBER | 0xc0001 | Read-only serial number |
| AIO_COMBO_MODULE_PARAMETER_AUX_OUT | 0xc0002 | AUX output pin state |
| AIO_COMBO_MODULE_PARAMETER_AUX_IN | 0xc0003 | Read-only AUX input state |
| AIO_COMBO_MODULE_PARAMETER_5VDC_ENABLE | 0xc0004 | 5V power supply enable |
| AIO_COMBO_MODULE_PARAMETER_VARIABLE_DC_POWER_ENABLE | 0xc0005 | Variable power enable |
| AIO_COMBO_MODULE_PARAMETER_VARIABLE_DC_POWER_TARGET_MILLIVOLTS | 0xc0006 | Target voltage (600-5000 mV) |
| AIO_COMBO_MODULE_PARAMETER_VARIABLE_DC_POWER_MEASURED_MILLIVOLTS | 0xc0007 | Read-only measured voltage |
| AIO_COMBO_MODULE_PARAMETER_VARIABLE_DC_POWER_MEASURED_CURRENT | 0xc0008 | Read-only measured current (double) |
| AIO_COMBO_MODULE_PARAMETER_MEASURED_CURRENT_RANGE | 0xc0009 | Current measurement range |
| AIO_COMBO_MODULE_PARAMETER_OVER_CURRENT_THRESHOLD | 0xc000a | Over-current threshold (double) |
| AIO_COMBO_MODULE_PARAMETER_OVER_CURRENT_CONDITION | 0xc000b | Over-current status |
| Constant | Value | Description |
|---|---|---|
| AIO_T_MODULE_PARAMETER_FIRMWARE_VERSION | 0xd000 | Read-only firmware version |
| AIO_T_MODULE_PARAMETER_BITS_PER_WORD | 0xd001 | Bits per word (01=24, 10=32) |
| AIO_T_MODULE_PARAMETER_BITS_PER_FRAME | 0xd002 | Bits per frame |
| AIO_T_MODULE_PARAMETER_FSYNC_PHASE_DELAY | 0xd003 | FSYNC phase delay |
| AIO_T_MODULE_PARAMETER_INVERT_SCLK | 0xd004 | Invert SCLK signal |
| AIO_T_MODULE_PARAMETER_SHIFT_ENABLED | 0xd005 | Enable shift |
| AIO_T_MODULE_PARAMETER_CLOCK_SINK | 0xd006 | Clock sink mode |
| AIO_T_MODULE_PARAMETER_AUDIO_DATA_SHIFT_BITS | 0xd007 | Shift bits (0-7) |
| AIO_T_MODULE_PARAMETER_LOGIC_LEVEL | 0xd008 | Logic level |
| AIO_T_MODULE_PARAMETER_FSYNC_POSITION | 0xd009 | FSYNC start position |
| AIO_T_MODULE_PARAMETER_FSYNC_WIDTH | 0xd00a | FSYNC width |