/*****************************************************************************************
* $Header: /home/eliot/asi/repo/cvsrepo/Repository/apps/asx/asx.h,v 1.691 2012/01/23 04:12:48 as-sgt Exp $
*
* ASX.H
* Definitions for cross platform/API audio class library
*
* Copyright (C) AudioScience 2003
*****************************************************************************************/

#ifndef _ASX_H_
#define _ASX_H_

#if ASX_USE_WX_THREADS
#error Your Makefile is defining the obsolete ASX_USE_WX_THREADS symbol, please use ASX_USE_PTHREADS.
#endif

#if ASX_USE_PTHREADS
#include <time.h>
#define TRUE 1
#define FALSE 0
#define TEXT
#endif

#ifndef ARRAY_SIZE
#define  ARRAY_SIZE(X) (sizeof(X)/sizeof(X[0]))
#endif

/*! \mainpage notitle

<center>
\htmlonly
<img align=center src="..\asilogo.gif"
     width=444 height=278 alt="asi"><br>
\endhtmlonly
</center>

\section title ASX Reference Manual

Table of contents


- \ref intro
- \ref OS
- \ref conventions
- \ref compile
- <a class="el" href="modules.html">Functions</a>
- <a class="el" href="examples.html">Example code</a>
- \ref PCX
- <a class="el" href="deprecated.html">Deprecated</a>


\section intro Introduction

ASX is an audio API designed to work on both Windows and Linux operating systems.
It is "high level", in that unlike say the Windows WAVE or Direct Sound APIs,
which are "buffer based", it deals with audio files.

At a lower level, ASX supports the AudioScience HPI API (Windows and Linux) as
well as WAVE and DirectSound (Windows) and ALSA (Linux).

The API is a C function library.  This means it can be used from many languages
including C, C++, C#, Java, Visual Basic and Delphi.

<center>
\image latex Fig1.eps "ASX interface under Windows and Linux." width=12cm
\htmlonly
<img align=center src="..\fig1.bmp"
     width=819 height=555 alt="asi"><br>
\endhtmlonly
</center>

\section OS Installation and Usage

\subsection win32 Windows XP and Windows 7

-# Make sure you have an AudioScience WAVE,WDM or Combo driver installed and
working with at least one audio adapter. The driver install will
install both ASX32.DLL which implements the ASX interface documented here and ASICTRL.EXE which is a
Win32 application that uses the ASX interface to control ASI adapters.
-# Obtain the ASX SDK executable file from the applications section of the AudioScience web site
(<http://www.audioscience.com/>). The file is named ASX_SDK_WIN_XXXXX.EXE, where XXXXX is the version number.
-# Run the ASX_SDK_WIN_XXXXX.EXE application to install asx.h, code examples and asx32.lib.

\subsection linux Linux

ToDo

\section compile Compiling applications that use the ASX interface

The various interface files required to interface with asx32.dll are typically installed in
c:\\Program Files\\AudioScience\\ASX\\lib
directory.

Applications can make use of asx.h and asxstring.h header files and should link
against asx.32lib.

\section debug Debugging ASX calls under Windows

ASX ships with the capability of outputting debug information to a Third Party debug viewer.

DbgView should be used to display the debug messages. It is available from Microsoft and the
simplest method of locating it is to just Google "DbgView". Download and install this on the
PC you wish to test on.

The appliction being debugged should call \ref ASX_System_SetMessageLogging to turn on
error logging. Setting the error level to  asxMSG_LOGGING_DEBUG will record all ASX calls
and output other information as well.

\section model ASX Object Model

In ASX, the underlying audio hardware is grouped into "adapters".  An adapter is typically
a soundcard (i.e. AudioScience ASI6114).

Each adapter has a "mixer".  The mixer contains source and destination "nodes".
A node represents a point at which audio comes in (source) or leaves (destination) the mixer.

Source nodes include:
- playback streams from the computer (usually from a file).
- physical audio inputs like an analog line input or AES/EBU input.

Destination nodes include:
- record streams to the computer (usually to a file).
- physical audio outputs like an analog line output or AES/EBU output.

Nodes are attached to "controls" which contain functionality to process the audio streams
passing through them.  Examples of controls include:
- Player control to play audio from a file on the computer.
- Recorder control to record audio to a file on the computer.
- Meter control to observe the audio signal's peak and RMS values.
- Volume control to alter the audio level.
- Channel Mode control to swap left and right channels on a stream.
- Level control to set the physical input and output levels on an analog node.
- AES/EBU control, which allows access to the channel status and user data.

The following diagram shows how ASX models a simple sound card:

\latexonly \vfill \endlatexonly

\image latex Fig2.eps "ASX controls within a sound card." width=12cm
<center>
\htmlonly
<img align=center src="..\fig2.bmp"
     width=745 height=381 alt="asi"><br>
\endhtmlonly
</center>

\section conventions Coding Conventions

Method names
- 1st letters are ASX_ int uppercase, i.e ASX_Adapter_GetMixer()

Variable names
use Hungarian notation, i.e.

- int - prefix with "n", i.e int nIndex
- long - prefix with "l", i.e long lIndex
- unsigned long - prefix with "dw", i.e unsigned long dwSampleRate;
- float - prefix with "f", i.e float fNumber;
- pointer - prefix with "p", i.e int* pnIndex
- reference - prefix with "r", i.e int& rnIndex
- string (char array) - prefix with "sz", i.e char szString[40];
- global var - prefix with "g", i.e int gnIndex
- static var - prefix with "s", i.e int snIndex
- member var - prefix with "m", i.e int mnIndex
- enum - prefix with "asx", then all capitals with "_" separators, i.e. asxERROR_INDEX_OUT_OF_RANGE

Return conventions
All functions return ASX_ERROR which equals 0 on success and non-zero on error.
*/

#ifdef __cplusplus
extern "C" {
#endif

// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the ASX32_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// ASX32_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef ASX32_EXPORTS
#define ASX32_API __declspec(dllexport)
#endif
#ifdef ASX32_IMPORTS
#define ASX32_API __declspec(dllimport)
#endif
#ifndef ASX32_API
#define ASX32_API
#endif

/**************************
 * Defines
 **************************/
/** @defgroup SubSystemTypes SubSystem types
 * The types of audio subsystems that can operate using the ASX interface.
 * @{
*/
#define ASX_SYSTEM_TYPE_HPI 0		///< Use this to select ASI's HPI interface when calling ASX_System_Create().
#define ASX_SYSTEM_TYPE_WAVE 1		///< Use this to select Microsoft's WAVE interface when calling ASX_System_Create().
#define ASX_SYSTEM_TYPE_ALSA 2		///< Use this to select the Linux ALSA interface when calling ASX_System_Create().
#define ASX_SYSTEM_TYPE_DIRECTX 3	///< Use this to select Microsoft's DirectX interface when calling ASX_System_Create().
#define ASX_SYSTEM_TYPE_PORTAUDIO 4	///< Use this to select the PortAudio interface when calling ASX_System_Create().
#define ASX_SYSTEM_TYPE_PCXTOOLS 5	///< Use this to select Digigram's PCX interface when calling ASX_System_Create().
#define ASX_SYSTEM_TYPE_SNMP 6		///< Use this to select Cobranet SNMP interface when calling ASX_System_Create().
#define ASX_SYSTEM_TYPE_HPIUDP 7	///< Use this to select ASI's HPI interface over UDP when calling ASX_System_Create().  Also supports HPI.
#define ASX_SYSTEM_TYPE_DUMMY  8	///< Dummy backend
#define ASX_SYSTEM_TYPE_ANY 9		///< Wild card - any subsystem (reserved).
#define ASX_SYSTEM_TYPE_ASIO 10		///< Use this to select Stienberg's ASIO interface when calling ASX_System_Create().
#define ASX_SYSTEM_TYPE_AVB_1722_1 11	///< Use this to select the IEEE 1722.1 system for controlling AVB devices when calling ASX_System_Create().
#define ASX_SYSTEM_TYPE_COUNT 12	///< Indicates the number of subsystems defined.
/** @} */ // end of SubSystemTypes group

#define ASX_SHORT_STRING 32		///< Short string size for adapter, node, control, enum translations.
#define ASX_LONG_STRING 128  		///< Long string size for error strings, filenames and PADs strings.
#define ASX_LONGLONG_STRING 256  	///< LongLong string size for PADs comment string.

#ifdef HPI_OS_WIN32_USER
#include <crtdbg.h>
#endif

#ifndef _RPT0
#define _RPT0(l,s) printf(s)		///< A debug helper function, 0 arguments.
#define _RPT1(l,s,d1) printf(s,d1)	///< A debug helper function, 1 argument.
#endif

/**************************
 * Enums
 **************************/

/// ASX error codes. These error codes are returned by most ASX functions.
enum asxERROR {
	asxERROR_NO_ERROR=0,			///< The success, or no error code is 0.
	// leave a gap here so that any 8-bit bit enums will never map to error codes.
	asxERROR_ASXOBJECT=256,			///< An attempt was made to call an ASX function with an incorrect object handle.
	asxERROR_INDEX_OUT_OF_RANGE=257,	///< The index passed in to the function is out of range.
	asxERROR_UNIMPLEMENTED=258,		///< An attempt was made to call an un-implemented function.
	asxERROR_COMMUNICATING_WITH_DEVICE=259,	///< Device communication error.
	asxERROR_STARTING_DEVICE=260,		///< Device would not start. Typically this is a driver installation or hardware problem.
	asxERROR_NOT_OPEN=261,			///< An attempt was made to manipulate and ASX object that requires opening before use.
	asxERROR_ALREADY_OPEN=262,		///< An attempt was made to open an object that is already open.
	asxERROR_INVALID_FORMAT=263,		///< The format is illegal on this adapter. It may be the sample rate or the compression format that is illegal.
	asxERROR_INTERNAL_BUFFERING_ERROR=264,	///< Buffering error internal to the ASX library occurred.
	asxERROR_AES18=265,			///< AES-18 signalling error.
	asxERROR_INVALID_OPERATION=266,		///< An attempt was made to perform an invalid operation.
	asxERROR_ENUMERATE_INDEX_OUT_OF_RANGE=267,///< The index passed in to the enumeration function is too large.
	asxERROR_BUFFER_TOO_SMALL=268,		///< A buffer was passed to a function that was too small to hold the requested data.
	asxERROR_OUTOFMEMORY=269,		///< An internal system call to allocate memory failed.
	asxERROR_DEPRECATED=270,		///< An attempt was made to call a deprecated function.
	asxERROR_TOO_MANY_CLIENTS=271,		///< Too many network clients communicating with the device.

	asxERROR_COBRANET_NODE_NOT_FOUND=272,	///< AsiCnDisco has not found this node.
	asxERROR_COBRANET_NODE_FOUND=273,	///< AsiCnDisco has found this node but hasn't assigned an IP address.
	asxERROR_NO_IP_ADDRESSES_AVAILABLE=274, ///< The entire range specified for IP autoassigment is in use.
	asxERROR_IP_ASSIGNED=275,		///< AsiCnDisco tried to assign an address to this CobraNet node.
	asxERROR_IP_CHANGED=276,		///< The IP address for this CobraNet node has changed, it should be non-zero.
	asxERROR_IP_AUTOASSIGN_DISABLED=277,	///< The IP address auto-assign feature is disabled.
	asxERROR_PCAP_ERROR=278,		///< The pcap driver failed to start.
	asxERROR_DISCO_DLL_NOT_FOUND=279,	///< The asicndiscoXX.dll failed to load.
	asxERROR_HOST_NOT_FOUND=280,		///< The specified host IP address is not in the list of available adapters.
	asxERROR_COBRANET_NODE_UNREACHABLE=281,	///< The node is on another subnet and is unreachable via SNMP.
	asxERROR_DUPLICATE_ADAPTER_INDEX=282,	///< The HPI adapter has a duplicate index.

	asxERROR_INVALID_CONTROL=304,			///< An attempt was made to use an invalid control.
	asxERROR_INVALID_CONTROL_VALUE=305,		///< An attempt was made to set a control to an invalid value.
	asxERROR_INVALID_CONTROL_NOT_FOUND=306,		///< The specified control could not be found.
	asxERROR_INVALID_NUMBER_OF_CHANNELS=307,	///< An invalid number of channels were passed in.
	asxERROR_INVALID_CONTROL_ATTRIBUTE=308, 	///< An attempt was made to set an attribute (or property) of a control that does not exist.
	asxERROR_UNSUPPORTED_CONTROL_ATTRIBUTE=309, 	///< Control attribute or function is not supported by this hardware.
	asxERROR_INVALID_CONTROL_OPERATION=310,		///< Control does not support the requested operation.
	asxERROR_CONTROL_NOT_READY=311,			///< Control is not ready for the requested operation.

	asxERROR_FILE_OPEN_FAILED=336,			///< File open failed.

	asxERROR_PLAYER_INTERNAL_STATE_FAILURE=384,	///< Player control had an internal state error - contact AudioScience.
	asxERROR_PLAYER_TIME_OUT=385,			///< Player control had an internal timeout error - contact AudioScience.
	asxERROR_PLAYER_OUT_OF_SEQUENCE_CALL=386,	///< An attempt was made to perform an operation that is illegal in the current player state.
	asxERROR_PLAYER_TWAV=387,			///< Internal player error.
	asxERROR_PLAYER_NOFILE=388,			///< Operation requires an open filehandle and no file is open.
	asxERROR_PLAYER_INVALIDFILEFORMAT=389,		///< File is invalid or corrupt.
	asxERROR_PLAYER_UNSUPPORTEDFORMAT=390,		///< File is in an unsupported format.
	asxERROR_PLAYER_FILEREADERROR=391,		///< An error occured when reading the file.
	asxERROR_PLAYER_FILEOPENERROR=392,		///< Could not open the file.  It may be missing.

	asxERROR_RECORDER_INTERNAL_STATE_FAILURE=448,	///< Recorder control had an internal state error - contact AudioScience.
	asxERROR_RECORDER_TIME_OUT=449,			///< Recorder control had an internal timeout error - contact AudioScience.
	asxERROR_RECORDER_OUT_OF_SEQUENCE_CALL=450,	///< An attempt was made to perform an operation that is illegal in the current recorder state.
	asxERROR_RECORDER_TWAV=451,			///< Internal recorder error.
	asxERROR_RECORDER_FILECREATEERROR=452,		///< Couldn't create file, could be write protected.
	asxERROR_RECORDER_FILEWRITEERROR=453,		///< An error occured when writing the file.
	asxERROR_RECORDER_FORMATMISMATCH=454,		///< Tried to append to a file with a different format.
	asxERROR_RECORDER_INVALIDFILENAME=455,		///< Tried to record a WAV file without the .WAV extension or tried to record a RAW file with the .WAV extention.

	asxERROR_MIXER_SAVECONTROLSTATE=460,		///< Mixer command to save controls on device failed.

	asxERROR_UNKNOWN=4095				///< Unknown error.
};

/// Node type identifiers. The nodes identify how controls are connected and located. This enum is used to identify node types.
enum asxNODE {
	asxNODE_NONE=0,			///< Node does not exist value.
	asxNODE_INVALID=400,		///< Node is invalid.

	asxNODE_ADAPTER=401,		///< An adapter node that contains controls like GPIO and NvMem.
	asxNODE_PLAYER=402,		///< A player source node. This node has the abiility to play audio files.
	asxNODE_LINE_IN=403,		///< An audio source coming from a line in audio connector.
	asxNODE_AESEBU_IN=404,		///< An audio source coming from a digital input. Typically this will be an AESEBU/SPDIF connection.
	asxNODE_TUNER_IN=405,		///< An audio source coming from a tuner.
	asxNODE_RADIO_FREQ_IN=406,	///< Not implemented.
	asxNODE_CLOCK_SOURCE_IN=407,	///< A source for of adapter sample clock generation.
	asxNODE_BITSTREAM_IN=408,	///< A raw, unformated bitstream. To date this has been used to represent an RS422 serial stream fed directly from a satellite receiver.
	asxNODE_MICROPHONE_IN=409,	///< An audio souce coming from a microphone.
	asxNODE_COBRANET_IN=410,	///< An audio source coming from a Cobranet audio routing channel.
	asxNODE_COBRANET_RECEIVER=411,	///< An Cobranet receiver.
	asxNODE_ANALOG_IN=412,		///< An Analog input.
	asxNODE_SDI_IN=413,		///< An 3G/HD/SD-SDI input.
	asxNODE_RTP_DESTINATION_IN=414,	///< An RTP stream destination.
	asxNODE_INTERNAL_IN=416,	///< An audio node internal to the device.
	asxNODE_AVB_IN_STREAM=417,	///< An AVB input stream.
	asxNODE_BLULINK_IN=418,	        ///< A BLU link input node
	asxNODE_AVB_IN_AUDIO = 419,	///< AVB input audio

	asxNODE_LAST_SOURCE_NODE=420,	///< A placekeeper marking the last source node.

	asxNODE_FIRST_DEST_NODE=450,	///< A placekeeper marking the last source node.
	asxNODE_RECORDER=450,		///< A destination that indicates a path for recording audio to the host.
	asxNODE_LINE_OUT=451,		///< A destination that outputs to a line out audio connector.
	asxNODE_AESEBU_OUT=452,		///< A destination that outputs to a digital out audio connector. Typically this will be an AESEBU/SPDIF connection.
	asxNODE_RADIO_FREQ_OUT=453,	///< Not implemented.
	asxNODE_SPEAKER_OUT=454,	///< A destination that outputs to a speaker.
	asxNODE_COBRANET_OUT=455,	///< A destination Cobranet audio routing channel.
	asxNODE_COBRANET_TRANSMITTER=456,///< A Cobranet transmitter.
	asxNODE_ANALOG_OUT=457,		///< An Analog output.
	asxNODE_SDI_OUT=458,		///< An 3G/HD/SD-SDI output.
	asxNODE_RTP_SOURCE_OUT=459,	///< An RTP stream source.
	asxNODE_AVB_OUT_STREAM=460,	///< An AVB output stream.
	asxNODE_INTERNAL_OUT=461,	///< An internal output node
	asxNODE_BLULINK_OUT=462,        ///< An BLU link output.
	asxNODE_AVB_OUT_AUDIO = 463,	///< AVB output audio

	asxNODE_LAST_DEST_NODE=464	///< A placekeeper marking the last destination node.
};

/// Control type identifiers. The control types are used to differentiate control capabilities.
enum asxCONTROL {
	asxCONTROL_INVALID=500,			///< Placeholder that indicates an error.

	asxCONTROL_CONNECTION=501,		///< Documents a connection, no functionality.
	asxCONTROL_VOLUME=502,			///< A volume control. A large number of volume controls are used to control audio routing and mixing.
	asxCONTROL_METER=503,			///< A meter control. This is used to implement peak meter functionality.
	asxCONTROL_MUTE=504,			///< A mute control.
	asxCONTROL_MULTIPLEXER=505,		///< A multiplexer control allows the selection of a single audio source from many possible sources.
	asxCONTROL_AESEBU_TRANSMITTER=506,	///< An AESEBU transmitter control.
	asxCONTROL_AESEBU_RECEIVER=507,		///< An AESEBU receiver control.
	asxCONTROL_LEVEL=508,			///< A level/trim control for adjusting input and output levels.
	asxCONTROL_TUNER=509,			///< A tuner control.
	asxCONTROL_RDS=510,			///< An FM RDS/RBDS control
	asxCONTROL_VOX=511,			///< A Vox control used to set record trigger level.
	asxCONTROL_AES18_TRANSMITTER=512,	///< An AES18 transmitter control.
	asxCONTROL_AES18_RECEIVER=513,		///< An AES18 receiver control.
	asxCONTROL_AES18_BLOCK_GENERATOR=514,	///< An AES18 block generator control.
	asxCONTROL_CHANNEL_MODE=515,		///< A channel mode control for adjusting audio routing.
	asxCONTROL_BIT_STREAM=516,		///< A bitstream control for setting raw bitstream clocking parameters.
	asxCONTROL_SAMPLE_CLOCK=517,		///< A sample clock control.
	asxCONTROL_MICROPHONE=518,		///< A microphone control.
	asxCONTROL_PARAMETRIC_EQ=519,		///< A parametric EQ control.
	asxCONTROL_COMPANDER=520,		///< A compander control.
	asxCONTROL_COBRANET=521,		///< A cobranet control.
	asxCONTROL_PLAYER=522,			///< A player control that can play audio files from disk.
	asxCONTROL_RECORDER=523,		///< A recorder control that can record audio files to disk.
	asxCONTROL_GPIO=524,			///< A general purpose input/output control that typically would manipulate relays and read opto inputs.
	asxCONTROL_RESERVED_525=525,		///< Reserved for future use.
	asxCONTROL_RESERVED_526=526,		///< Reserved for future use.
	asxCONTROL_RESERVED_527=527,		///< Reserved for future use.
	asxCONTROL_RESERVED_528=528,		///< Reserved for future use.
	asxCONTROL_GENERIC=529,			///< A generic control used as a placeholder during development.
	asxCONTROL_TONEDETECTOR=530,		///< A tone detector control.
	asxCONTROL_SILENCEDETECTOR=531,		///< A Silence detector control.
	asxCONTROL_COBRANET_TRANSMITTER=532,	///< A Cobranet transmitter control.
	asxCONTROL_COBRANET_RECEIVER=533,	///< A Cobranet receiver control.
	asxCONTROL_PAD=534,			///< A Program Auxilary Data including RBDS control.
	asxCONTROL_SRC=535,			///< Samplerate converter control.
	asxCONTROL_BLOCK=536,			///< Block control.

	asxCONTROL_LAST_CONTROL=537
};

/****************************************
 * Various control enums
*****************************************/

/// volume autofade profiles
enum asxVOLUME_AUTOFADE {
	asxVOLUME_AUTOFADE_LOG,		///< Log fade causes dB level to fade linearly over time.
	asxVOLUME_AUTOFADE_LINEAR	///< Linear fade causes amplitude to fade linearly over time.
};

/// Peak meter type to read.
enum asxMETER_TYPE {
	asxMETER_PEAK,	///< The peak level of the signal.
	asxMETER_RMS	///< The RMS level of the signal.
};

/// Channel mode settings
enum asxCHANNELMODE {
	asxCHANNELMODE_ILLEGAL=1000,		///< Illegal channel mode.
	asxCHANNELMODE_NORMAL=1001,		///< Normal mode. Left goes to left and right goes to right.
	asxCHANNELMODE_SWAP=1002,		///< Channels are swapped. Left goes to right and right goes to left.
	asxCHANNELMODE_STEREOTOLEFT=1003,	///< Both left and right channels are merged and output on left channel.
	asxCHANNELMODE_STEREOTORIGHT=1004,	///< Both left and right channels are merged and output on the right channel.
	asxCHANNELMODE_LEFTTOSTEREO=1005,	///< The left channel is converted to a stereo output. Right input channel is discarded.
	asxCHANNELMODE_RIGHTTOSTEREO=1006	///< The right channel is converted to a stereo output. Left input channel is discarded.
};
/// Adapter mode settings
enum asxADAPTERMODE {
	asxADAPTERMODE_ILLEGAL=1100,		///< Illegal adapter mode.
	asxADAPTERMODE_4_PLAY=1101,		///< Adapter has 4 playback streams.
	asxADAPTERMODE_6_PLAY=1102,		///< Adapter has 6 playback streams.
	asxADAPTERMODE_8_PLAY=1103,		///< Adapter has 8 playback streams.
	asxADAPTERMODE_9_PLAY=1104,		///< Adapter has 9 playback streams.
	asxADAPTERMODE_12_PLAY=1105,		///< Adapter has 12 playback streams.
	asxADAPTERMODE_16_PLAY=1106,		///< Adapter has 16 playback streams.
	asxADAPTERMODE_1_PLAY=1107,		///< Adapter has 1 playback streams.
	asxADAPTERMODE_MODE_1=1108,		///< Adapter mode 1. Exact meaning depends on the adapter.
	asxADAPTERMODE_MODE_2=1109,		///< Adapter mode 2. Exact meaning depends on the adapter.
	asxADAPTERMODE_MODE_3=1110,		///< Adapter mode 3. Exact meaning depends on the adapter.
	asxADAPTERMODE_MULTICHANNEL=1111,	///< Adapter set to handle streams with more than 2 channels.
	asxADAPTERMODE_MONO=1112,		///< Adapter set to handle mono streams, including physical I/O.
	asxADAPTERMODE_LOW_LATENCY=1113, ///< Adapter set to low latency mode.
	asxADAPTERMODE_24_PLAY=1114,		///< Adapter has 24 plabck streams.
	asxADAPTERMODE_32_PLAY = 1115		///< Adapter has 32 plabck streams.
};
/// Tuner band settings
// NOTE - the order of these enums MUST match the order of the HPI band enums or the code will FAIL!!
enum asxTUNERBAND {
	asxTUNERBAND_AM=1200,		///< Tuner band AM.
	asxTUNERBAND_FM=1201,		///< Tuner band FM.
	asxTUNERBAND_TV=1202,		///< Tuner band TV (NTSC North America).
	asxTUNERBAND_FM_STEREO=1203,	///< Tuner band stereo FM.
	asxTUNERBAND_AUX=1204,		///< Tuner band auxilary - input from the 50 pin header.
	asxTUNERBAND_TV_PAL_BG=1205,	///< Tuner band TV PAL-BG
	asxTUNERBAND_TV_PAL_I=1206,	///< Tuner band TV PAL-I
	asxTUNERBAND_TV_PAL_DK=1207,	///< Tuner band TV PAL-DK
	asxTUNERBAND_TV_SECAM_L=1208,	///< Tuner band TV SECAM
	asxTUNERBAND_DAB=1209
};
/// Tuner FM de-emphasis settings
enum asxTUNERDEEMPHASIS {
	asxTUNERDEEMPHASIS_50=1240,	///< Tuner de-emphasis of 50us (Europe).
	asxTUNERDEEMPHASIS_75=1241,	///< Tuner de-emphasis of 75us (USA).
	asxTUNERDEEMPHASIS_NONE=1242,	///< Tuner no de-emphasis setting.
};
/// Tuner mode settings
enum asxTUNERMODE {
	asxTUNERMODE_RSS=1250,		///< Tuner mode RSS.
	asxTUNERMODE_RSS_ENABLE=1251,	///< Tuner mode RSS is enabled.
	asxTUNERMODE_RSS_DISABLE=1252	///< Tuner mode RSS is disabled.
};
/// Tuner program settings
enum asxTUNERPROGRAM {
	asxTUNERPROGRAM_NONE=1260,	///< Tuner program 1.
	asxTUNERPROGRAM_1=1261,		///< Tuner program 1.
	asxTUNERPROGRAM_2=1262,		///< Tuner program 2.
	asxTUNERPROGRAM_3=1263,		///< Tuner program 3.
	asxTUNERPROGRAM_4=1264,		///< Tuner program 4.
	asxTUNERPROGRAM_5=1265,		///< Tuner program 5.
	asxTUNERPROGRAM_6=1266,		///< Tuner program 6.
	asxTUNERPROGRAM_7=1267,		///< Tuner program 7.
	asxTUNERPROGRAM_8=1268,		///< Tuner program 8.
};
/// Tuner HD Radio blend settings
enum asxTUNERHDBLEND {
	asxTUNERHDBLEND_AUTO=1280,	///< Auto blend between analog and digital.
	asxTUNERHDBLEND_ANALOG=1281,	///< Force analog.
};


/// Sample clock source options
enum asxSAMPLE_CLOCK_SOURCE {
	asxSAMPLE_CLOCK_SOURCE_ADAPTER=1400,	///< /deprecated Use asxSAMPLE_CLOCK_SOURCE_LOCAL
	asxSAMPLE_CLOCK_SOURCE_AESEBUSYNC=1401,	///< Sample clock source is derived from an AESEBU sync input.
	asxSAMPLE_CLOCK_SOURCE_WORD=1402,	///< Sample clock source is derived from external word clock connector.
	asxSAMPLE_CLOCK_SOURCE_WORD_HEADER=1403,///< Sample clock source is derived from word clock header on the adapter.
	asxSAMPLE_CLOCK_SOURCE_SMPTE=1404,	///< Sample clock source is derived from SMPTE.
	asxSAMPLE_CLOCK_SOURCE_NETWORK=1405,	///< Sample clock source is derived from the network.
	asxSAMPLE_CLOCK_SOURCE_AESEBUAUTO=1406,	///< Sample clock source is derived from the first AESEBU input with valid input.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT1=1407,///< Sample clock source is derived from AESEBU input 1.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT2=1408,///< Sample clock source is derived from AESEBU input 2.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT3=1409,///< Sample clock source is derived from AESEBU input 3.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT4=1410,///< Sample clock source is derived from AESEBU input 4.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT5=1411,///< Sample clock source is derived from AESEBU input 5.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT6=1412,///< Sample clock source is derived from AESEBU input 6.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT7=1413,///< Sample clock source is derived from AESEBU input 7.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT8=1414,///< Sample clock source is derived from AESEBU input 8.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT9=1415,///< Sample clock source is derived from AESEBU input 9.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT10=1416,///< Sample clock source is derived from AESEBU input 10.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT11=1417,///< Sample clock source is derived from AESEBU input 11.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT12=1418,///< Sample clock source is derived from AESEBU input 12.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT13=1419,///< Sample clock source is derived from AESEBU input 13.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT14=1420,///< Sample clock source is derived from AESEBU input 14.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT15=1421,///< Sample clock source is derived from AESEBU input 15.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT16=1422,///< Sample clock source is derived from AESEBU input 16.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT17=1423,///< Sample clock source is derived from AESEBU input 17.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT18=1424,///< Sample clock source is derived from AESEBU input 18.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT19=1425,///< Sample clock source is derived from AESEBU input 19.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT20=1426,///< Sample clock source is derived from AESEBU input 20.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT21=1427,///< Sample clock source is derived from AESEBU input 21.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT22=1428,///< Sample clock source is derived from AESEBU input 22.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT23=1429,///< Sample clock source is derived from AESEBU input 23.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT24=1430,///< Sample clock source is derived from AESEBU input 24.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT25=1431,///< Sample clock source is derived from AESEBU input 25.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT26=1432,///< Sample clock source is derived from AESEBU input 26.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT27=1433,///< Sample clock source is derived from AESEBU input 27.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT28=1434,///< Sample clock source is derived from AESEBU input 28.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT29=1435,///< Sample clock source is derived from AESEBU input 29.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT30=1436,///< Sample clock source is derived from AESEBU input 30.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT31=1437,///< Sample clock source is derived from AESEBU input 31.
	asxSAMPLE_CLOCK_SOURCE_AESEBUINPUT32=1438,///< Sample clock source is derived from AESEBU input 32.
	asxSAMPLE_CLOCK_SOURCE_LOCAL=1439,        ///< Sample clock source is local PLL.
	asxSAMPLE_CLOCK_SOURCE_PREV_MODULE=1440,  ///< Sample clock source is previous module daisy-chain
	asxSAMPLE_CLOCK_SOURCE_UNDEFINED=1441,	///< Sample clock source is undefined
	asxSAMPLE_CLOCK_SOURCE_LIVEWIRE=1442,	///< /deprecated Use asxSAMPLE_CLOCK_SOURCE_NETWORK.
	asxSAMPLE_CLOCK_SOURCE_BLULINK=1443	///< Sample clock source is generated by blu link
};

/// Digital mode settings
enum asxAESEBU_FORMAT {
	asxAESEBU_FORMAT_AESEBU=1450,		///< AES/EBU format is set to AES/EBU (professional)
	asxAESEBU_FORMAT_SPDIF=1451,		///< AES/EBU format is set to S/PDIF (consumer)
	asxAESEBU_FORMAT_UNDEFINED=1452		///< AES/EBU format is undefined
};
/// Parametric equalizer band type settings
enum asxEQBANDTYPE {
	asxEQBANDTYPE_BYPASS=1460,		///< Bypass
	asxEQBANDTYPE_LOWSHELF=1461,		///< Low Shelf - programmed gain below freq, unity gain above
	asxEQBANDTYPE_HIGHSHELF=1462,		///< High Shelf - programmed gain above freq, unity gain below
	asxEQBANDTYPE_EQUALIZER=1463,		///< Equalizer - programmed gain in passband, unity gain outside passband
	asxEQBANDTYPE_LOWPASS=1464,			///< Low Pass - unity gain below freq, attanuated above
	asxEQBANDTYPE_HIGHPASS=1465,		///< High Pass - unity gain above freq, attanuated below
	asxEQBANDTYPE_BANDPASS=1466,		///< Band Pass - unity gain in passband, attanuated outside passband
	asxEQBANDTYPE_BANDSTOP=1467,		///< Band Stop - attenuated in passband, unity gain outside passband
};
/// Cobranet mode settings (deprecated!)
enum asxCOBRANET_MODE {
	asxCOBRANET_MODE_NETWORK=1470,		///< Cobranet mode is set to networked
	asxCOBRANET_MODE_TETHERED=1471		///< Cobranet mode is set to tethered
};
/// Adapter property enumerate mode settings
enum asxADPROPENUM_MODE {
	asxADPROPENUM_MODE_PROPERTIES=1480,	///< Enumerate adapter properties
	asxADPROPENUM_MODE_SETTINGS=1481	///< Enumerate adapter property settings
};
/// Adapter property SSX2 enumerate settings
enum asxADPROPENUM_SSX2 {
	asxADPROPENUM_SSX2_OFF=1488,		///< SSX2 off
	asxADPROPENUM_SSX2_ON=1489		///< SSX2 on
};
/// Cobranet latency settings
enum asxCOBRANET_LATENCY {
	asxCOBRANET_LATENCY_133ms=1490,		///< Cobranet latency of 1 1/3 ms.
	asxCOBRANET_LATENCY_266ms=1491,		///< Cobranet latency of 2 2/3 ms.
	asxCOBRANET_LATENCY_533ms=1492		///< Cobranet latency of 5 1/3 ms.
};
/****************************************
 * Various player and recorder enums
*****************************************/

/// File Formats
enum asxFILE_FORMAT {
	asxFILE_FORMAT_WAV=10000,	///< Standard Windows .WAV soundfile.
	asxFILE_FORMAT_RAW=10001	///< Raw binary data (no format header).
};
/// File Mode
enum asxFILE_MODE {
	asxFILE_MODE_CREATE=10100,	///< File is created, if it exists it is overwritten.
	asxFILE_MODE_APPEND=10101	///< File is appended if it exists, created if it doesn't.
};
/// Audio Formats
enum asxAUDIO_FORMAT {
	asxAUDIO_FORMAT_PCM8=10200,		///< 8-bit PCM, unsigned.
	asxAUDIO_FORMAT_PCM16=10201,		///< 16-bit PCM, signed.
	asxAUDIO_FORMAT_PCM24=10202,		///< 24-bit PCM, signed.
	asxAUDIO_FORMAT_PCM32=10203,		///< 32-bit PCM, signed.
	asxAUDIO_FORMAT_PCM32_FLOAT=10204,	///< 32-bit PCM in IEEE float format.
	asxAUDIO_FORMAT_MPEG_L2=10205,		///< MPEG-1, Layer-II.
	asxAUDIO_FORMAT_MPEG_L3=10206,		///< MPEG-1, Layer-III, or "mp3".
	asxAUDIO_FORMAT_MPEG_AACPLUS=10207,	///< AAC+.
	asxAUDIO_FORMAT_DOLBY_AC2=10208,	///< Dolby AC-2.
	asxAUDIO_FORMAT_PCM20=10209,		///< 20-bit PCM, signed.
	asxAUDIO_FORMAT_NONE=10210		///< Unspecified or invalid audio format.
};


/// Record Mode
enum asxRECORD_MODE {
	asxRECORD_MODE_STEREO=10300,		///< MPEG-1 Layer-2 mode stereo.
	asxRECORD_MODE_JOINT_STEREO=10301,	///< MPEG-1 Layer-2 mode joint stereo. This allows channels to be merged at some frequencies.
	asxRECORD_MODE_DUAL_MONO=10302,		///< MPEG-1 Layer-2 mode dual mono. Maintain left and right channel separation. Requires a higher bitrate.
	asxRECORD_MODE_MONO=10303,		///< MPEG-1 Layer-2 mode mono.
	asxRECORD_MODE_DONT_CARE=10304		///< Use this mode for PCM files and formats that don't have a "mode".
};
/// Player States
enum asxPLAYER_STATE{
	asxPLAYER_INIT=10400,			///< Initialized state.
	asxPLAYER_OPEN=10401,			///< Player is open.
	asxPLAYER_PREFILL=10402,		///< Buffer prefill state.
	asxPLAYER_RUNNING=10403,		///< Player is running, i.e. audio is playing.
	asxPLAYER_PAUSED=10404,			///< Player is paused.
	asxPLAYER_DONE=10405,			///< Player has completed playing a file.
	asxPLAYER_DESTROY=10406			///< Player is being destroyed.
};
/// Recorder States
enum asxRECORDER_STATE{
	asxRECORDER_INIT=10500,			///< Initialized state.
	asxRECORDER_OPEN=10501,			///< Recorder is open.
	asxRECORDER_RUNNING=10502,		///< Recorder is recording to a file.
	asxRECORDER_PAUSED=10503,		///< Recorder is paused.
	asxRECORDER_DONE=10504,			///< Recorder is halted and is no longer recording.
	asxRECORDER_DESTROY=10505		///< Recorder is being destroyed.
};

/// TimeScale type identifiers
enum asxTIMESCALE {
	asxTIMESCALE_INVALID=10600,			///< Placeholder that indicates an error.
	asxTIMESCALE_BYTES=10601,			///< Time scale is represented in bytes.
	asxTIMESCALE_MILLISECONDS=10602,		///< Time scale is represented in milli-seconds.
	asxTIMESCALE_SAMPLES=10603,			///< Time scale is represented in samples.
	asxTIMESCALE_BYTES_REMAINING=10604,		///< Time scale is represented in bytes remaining.
	asxTIMESCALE_MILLISECONDS_REMAINING=10605,	///< Time scale is represented in milli-seconds remaining.
	asxTIMESCALE_SAMPLES_REMAINING=10606		///< Time scale is represented in samples remaining.
};

/// Sample rate options
enum asxSAMPLE_RATE {
	asxSAMPLE_RATE_8000=10700,
	asxSAMPLE_RATE_11025=10701,
	asxSAMPLE_RATE_16000=10702,
	asxSAMPLE_RATE_22050=10703,
	asxSAMPLE_RATE_24000=10704,
	asxSAMPLE_RATE_32000=10705,
	asxSAMPLE_RATE_44100=10706,
	asxSAMPLE_RATE_48000=10707,
	asxSAMPLE_RATE_64000=10708,
	asxSAMPLE_RATE_88200=10709,
	asxSAMPLE_RATE_96000=10710,
	asxSAMPLE_RATE_192000=10711,
	asxSAMPLE_RATE_12000=10712,
	asxSAMPLE_RATE_176400=10713,
	asxSAMPLE_RATE_UNDEFINED=10799
};

/// Error logging control. Uses DbgView under Windows to log messages.
enum asxMSG_LOGGING {
	asxMSG_LOGGING_DISABLE=10800,	///< Disable all message logging.
	asxMSG_LOGGING_ERROR=10801,	///< Enable logging of error messages.
	asxMSG_LOGGING_WARNING=10802,	///< Enable logging of warning and error messsages.
	asxMSG_LOGGING_NOTICE=10803,	///< Enable logging of notice (ASX function error returns), warning and error messages.
	asxMSG_LOGGING_INFO=10804,	///< Enable logging of info (ASX function calls), notice, warning and error messages.
	asxMSG_LOGGING_DEBUG=10805,	///< Enable logging of debug, info, notice, warning and error messages.
	asxMSG_LOGGING_VERBOSE=10806	///< Enable logging of all messages.
};

/******************************************************************************************************
 * The following enums apply to bitfields and other settings and therefore not translatable by #ASXSTRING_EnumToString();
 ******************************************************************************************************/
/// Player callback flags that form a bitmask. ie they are numbered 1,2,4,8 etc.
enum asxPLAYER_FLAGS {
	asxPLAYER_FILE_COMPLETE=1,		///< A single playback file has completed.
	asxPLAYER_FILELIST_COMPLETE=2,		///< A playlist has completed.
	asxPLAYER_FILE_START=4,			///< A single playback file has started.
};

/// Tuner status bitfields. Not translatable to strings.
enum asxTUNER_STATUS {
	asxTUNER_STATUS_VIDEO_VALID=1,				///< Video valid.
	asxTUNER_STATUS_VIDEO_COLOR_PRESENT=2,			///< Color present.
	asxTUNER_STATUS_VIDEO_IS_60HZ=4,			///< Video is 60 Hz.
	asxTUNER_STATUS_VIDEO_HORZ_SYNC_MISSING=8,		///< Horizontal sync is missing.
	asxTUNER_STATUS_PLL_LOCKED=16,				///< The tuners PLL is locked onto a signal.
	asxTUNER_STATUS_FM_STEREO=32,				///< An FM stereo signal has been detected.
	asxTUNER_STATUS_DIGITAL=64,				///< An digital channel has been detected.
	asxTUNER_STATUS_MULTIPROGRAM=128,			///< An multi-program channel has been detected.
	asxTUNER_STATUS_FIRMWARE_LOADING=256			///< tuner firmware is loading
};

/// Tuner PSD/PAD/RDS/RBDS type. Not translatable to strings.
enum asxTUNER_RDS_TYPE {
	asxTUNER_RDS_TYPE_RDS=0,		///< RDS data.
	asxTUNER_RDS_TYPE_RBDS=1,		///< RBDS data (USA) and HD Radio PSD.
};

/// AESEBU status bitfields. Not translatable to strings.
enum asxAESEBU_STATUS {
	asxAESEBU_ERROR=0x01,				///< AESEBU error.
	asxAESEBU_ERROR_NOT_LOCKED=0x02,		///< AESEBU not locked to input signal.
	asxAESEBU_ERROR_POOR_QUALITY=0x04,		///< AESEBU signal is poor quality.
	asxAESEBU_ERROR_PARITY_ERROR=0x08,		///< AESEBU parity error was detected.
	asxAESEBU_ERROR_BIPHASE_VIOLATION=0x10,		///< AESEBU Biphase violation.
	asxAESEBU_ERROR_VALIDITY=0x20,			///< AESEBU validity error.
	asxAESEBU_ERROR_CHANNELSTATUS_CRC=0x40		///< AESEBU channel status error.
};

/// Compander control indicies
enum asxCOMPANDER_INDEX {
	asxCOMPANDER_INDEX_NOISEGATE=0,	///< Noise gate index.
	asxCOMPANDER_INDEX_COMPANDER=1	///< Compander index.
};

/// Handle type enums returned from ASX_Handle_GetType().
enum asxHANDLE_TYPE {
	asxHANDLE_INVALID,	///< Invalid handle.
	asxHANDLE_SYSTEM,	///< Handle to ASX system.
	asxHANDLE_ADAPTER,	///< Hanlde to ASX adapter.
	asxHANDLE_MIXER,	///< Handle to ASX mixer.
	asxHANDLE_NODE,		///< Handle to ASX node.
	asxHANDLE_CONTROL,	///< Handle to ASX control.
	asxHANDLE_LAST		///< Last handle placeholder.
	};

/// Universal control parameter types
enum asxUCONTROL_PTYPE {
	asxPARAM_TYPE_NONE       = 0,
	asxPARAM_TYPE_INTEGER    = 3,
	asxPARAM_TYPE_FLOAT      = 4,
	asxPARAM_TYPE_DOUBLE     = 5,
	asxPARAM_TYPE_STRING     = 6,
	//asxPARAM_TYPE_ENUMERATED = 7
	asxPARAM_TYPE_IP4_ADDRESS= 8,
	asxPARAM_TYPE_IP6_ADDRESS= 9,
	asxPARAM_TYPE_MAC_ADDRESS= 10,
	asxPARAM_TYPE_BOOLEAN= 11
};

/// Universal control range types
enum asxUCONTROL_RTYPE {
	asxPARAM_RANGE_NONE			= 0,
	asxPARAM_RANGE_STEPPED_INTEGER		= 1,
	asxPARAM_RANGE_STEPPED_FLOAT		= 2,
	asxPARAM_RANGE_ENUMERATED_INTEGER	= 3,
	asxPARAM_RANGE_ENUMERATED_FLOAT		= 4,
	asxPARAM_RANGE_ENUMERATED		= 5,
	asxPARAM_RANGE_STRING_LENGTH		= 6,
	asxPARAM_RANGE_NUMBER_OF_BITS		= 7
};

/// Universal control flags
enum asxUCONTROL_PFLAGS {
	asxPARAM_FLAG_WRITEABLE   = 1, /**< The control can be set. */
	asxPARAM_FLAG_READABLE    = 2, /**< The control can be read (most controls). */
	asxPARAM_FLAG_VOLATILE    = 4 /**< The control changes its own value (e.g. meter). */
};

/// Cobranet If status bitfields. Not translatable to strings.
enum asxCOBRANET_IFSTATUS {
	asxCOBRANET_IFSTATUS_LINK_ESTABLISHED=0x01,	///< Ethernet link established.
	asxCOBRANET_IFSTATUS_FULL_DUPLEX=0x02,		///< Connection is full-duplex.
	asxCOBRANET_IFSTATUS_ACTIVE_CONNECTION=0x04	///< Packets being received at least every other second.
};

/// AVDECC notification code
enum asxAVDECC_NOTIFY {
	asxAVDECC_NOTIFY_NO_MATCH_FOUND = 0,                ///< A command or response is not implemented
	asxAVDECC_NOTIFY_END_STATION_CONNECTED = 1,         ///< An AVDECC End Station is discovered and connected
	asxAVDECC_NOTIFY_END_STATION_DISCONNECTED = 2,      ///< An AVDECC End Station is disconnected
	asxAVDECC_NOTIFY_COMMAND_TIMEOUT = 3,               ///< A command is sent, but the response is not received within a timeout period
	asxAVDECC_NOTIFY_RESPONSE_RECEIVED = 4,             ///< A response is received after sending a command
	asxAVDECC_NOTIFY_END_STATION_READ_COMPLETED = 5,    ///< An AVDECC End Station has finished internal READ_DESCRIPTOR processing for all top level descriptors
	asxAVDECC_NOTIFY_UNSOLICITED_RESPONSE_RECEIVED = 6, ///< An unsolicited response is received
	asxAVDECC_NOTIFY_UNKNOWN = 7,                       ///< An unknown notification
	asxAVDECC_NOTIFY_TOTAL_NUM_OF_NOTIFICATIONS = 8
};

/// Properties for use with ASX_Adapter_ReadProperty and ASX_Adapter_WriteProperty
enum asxADAPTER_PROPERTY {
        asxADAPTER_PROPERTY_ERRATA_1=1, ///< true if errata_1 workaround for 6100 cards is turned on.
        asxADAPTER_PROPERTY_SSX2_SETTING=2, ///< true when SSX2 is on
        asxADAPTER_PROPERTY_SYNC_HEADER_CONNECTIONS=3, ///< (read-only),  the number of headers connected.
        asxADAPTER_PROPERTY_SUPPORT_SSX2=4, ///< (read-only), returns true or false.
        asxADAPTER_PROPERTY_SUPPORTS_FW_UPDATE=5, ///< (read-only), device supports firmware updating
        asxADAPTER_PROPERTY_FIRMWARE_ID=6, ///<(read-only), firmware ID
	asxADAPTER_PROPERTY_SUPPORTS_SNMP = 7 ///<(read-only), device supports SNMP
};

/**************************
 * Typedefs
 **************************/

typedef void *ASX_HANDLE;		///< Generic handle used to represent all ASX objects.
typedef enum asxERROR ASX_ERROR;	///< Error type used to return error codes from all functions.
typedef enum asxNODE ASX_NODE;		///< Node type enum.
typedef int ASX_TIME;			///< Timescale.
/// An error handling callback function.
typedef void ASX_ERROR_CALLBACK(
		ASX_HANDLE hASX_Object,
		const char *pszCallingFunction,
		void *pUser1,
		void *pUser2);
/// An AVDECC notificaiton handling callback function.
typedef void ASX_AVDECC_NOTFICATION_CALLBACK(
		ASX_HANDLE hASX_Object,
		enum asxAVDECC_NOTIFY notify,
		const char *pszMsg,
		void *pUser1,
		void *pUser2);
/// A playback callback function.
typedef void ASX_PLAYER_CALLBACK(
		ASX_HANDLE hASX_Player_Object,
		const enum asxPLAYER_FLAGS flags,
		void *pUser1);

struct asxParameterRangeInfo_NamedEnumerated {
		int value;
		char name[ASX_SHORT_STRING];
};

struct asxParameterRangeInfo {
	enum asxUCONTROL_RTYPE type;
	union {
		struct {
			int min;
			int max;
			int step;
		} integer;
		struct {
			unsigned int count;
			int *value;
		} enumerated_integer;
		struct {
			unsigned int count;
			float *value;
		} enumerated_float;
		struct {
			unsigned int count;
			struct asxParameterRangeInfo_NamedEnumerated *enums;
		} enumerated;
		struct {
			float fmin;
			float fmax;
			float fstep;
		} floating;
		struct {
			unsigned int max_len;
		} string;
	} u;
};

struct asxParameterValue {
	enum asxUCONTROL_PTYPE eType;
	unsigned int uItems;
	size_t size;
	void *value;
};

struct asxCobranetIpAutoassignParameters {
	char addr_start[20];
	char addr_end[20];
	int autoassign;
};

#ifndef ASX_H_DEFS_ONLY
/**************************************************************************************
 * Functions
 **************************************************************************************/

/*******************************************************************/
/** @defgroup System System functions
 * @{
 *******************************************************************/


/** Query ASX library for subsystem support.
 * Indicate if this instance of ASX library supports the given subsystem type.
 * @param asxSystemType The ASX system type to query. One of \ref SubSystemTypes
 * defines above.
 * @return 1 if asxSystemType type supported, 0 if asxSystemType is not supported.
 */
ASX32_API int ASX_System_SupportsSubSystem(const int asxSystemType);

/**
 * Create a complete ASX system. This function creates a complete ASX interface of the type specified
 * by asxSystemType.
 * If more than one system type is needed use ASX_System_CreateSubSystem() instead.
 * @param asxSystemType The ASX system type to open. One of \ref SubSystemTypes
 * defines above.
 * @param phSystem Pointer to the returned system handle.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_System_Create( const int asxSystemType, ASX_HANDLE *phSystem );

/**
 * Creates an ASX sub system and adds it to the existing system, if any.
 * Use this function when creating more than one subsystem.
 * @note Starting with driver version 4.18.00 when this function is called to create the HPI UDP subsystem
 * it will only add one found adapter before returning; call ASX_System_GetAdapterCount() to add more.
 * @param asxSystemType The ASX system type to open. One of \ref SubSystemTypes
 * defines above.
 * @param pio_hSystem Pointer to the system handle.  Should be a pointer to NULL for the first call.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_System_CreateSubSystem( const int asxSystemType, ASX_HANDLE *pio_hSystem );

/**
 * Set the interface ASX should use when communicating with network devices.
 * This function should be called before ASX_System_Create().
 * @param szInterface The network interface to use. For Windows this is the IP address of the form "192.168.1.13".
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_System_SetHostNetworkInterface( const char *szInterface );

/**
* Set the interface ASX should use when initializing the AVDECC controller.
* This function should be called before ASX_System_Create().
* @param szInterface The AVDECC interface string to use.
* @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
*/
ASX32_API ASX_ERROR ASX_System_SetAvdeccInterface(const char *szInterface);

/**
 * Delete a complete ASX system. The delete function should be called using a previously
 * opened ASX system handle prior to closing an application. Note that when an ASI2416
 * CobraNet device is in use a call to ASX_System_Delete() triggers a save
 * to ASI2416 flash of any control parameters that might have changed. If this fails
 * for any reason an asxERROR_MIXER_SAVECONTROLSTATE error is returned.
 * @param hSystem The asx system handle.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_System_Delete( ASX_HANDLE hSystem );

/**
 * Register a callback function that should be called when an error is detected.
 * Note that using this function is optional. #ASX_Error_GetLast() can be used after each
 * call, or the error return value of each call may be checked. The callback function itself
 * should use #ASX_Error_GetLast() to figure out what error was actually generated.
 * @param hSystem A handle to an ASX system object.
 * @param pCallback A pointer to a callback of type ASX_ERROR_CALLBACK.
 * @param pUser1 A user defined pointer that is passed back when an error occurs.
 * @param pUser2 A user defined pointer that is passed back when an error occurs.
 * @note An error of type \ref asxERROR_INVALID_CONTROL_ATTRIBUTE returned by control
 * operations that attempt to accesses functionality not supported by the control
 * will not cause a callback to pCallback routine.
 */
ASX32_API ASX_ERROR ASX_System_RegisterErrorCallback(	ASX_HANDLE hSystem,
							ASX_ERROR_CALLBACK *pCallback,
							void *pUser1,
							void *pUser2);

/**
* Register an AVDECC notification callback function that it called by AVDECC library events.
* Note that using this function is optional.
* @param hSystem A handle to an ASX system object.
* @param pCallback A pointer to a callback of type ASX_AVDECC_NOTFICATION_CALLBACK.
* @param pUser1 A user defined pointer that is passed back when a callback occurs.
* @param pUser2 A user defined pointer that is passed back when an callback occurs.
*/
ASX32_API ASX_ERROR ASX_System_RegisterAvdeccNotificationCallback(ASX_HANDLE hSystem,
	ASX_AVDECC_NOTFICATION_CALLBACK *pCallback,
	void *pUser1,
	void *pUser2);

/**
 * Gets the name of the ASX system.
 * This function returns the name of the audio substem currently being used underneath ASX,
 * for example, "HPI" would be returned if ASX was being run using the AudioScience HPI driver.
 * @param hSystem The asx system handle.
 * @param pszName The string to use to copy the returned adapter name to. Typical return values are:
 * - "HPI"
 * - "Wave"
 * - "DirectX"
 * - "PortAudio"
 * - "ALSA"
 *
 * @param nStringLength The length of the string szString that was passed in.
 * @param pnRequiredLength The minimum required length in bytes of szString.
 * @note This function can be called will szString=0 and nStringLength=0 to retrieve the string
 * size required.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_System_GetName(	ASX_HANDLE hSystem,
					char *pszName,
					const int nStringLength,
					int *pnRequiredLength );
/**
 * Get ASX system version information. This function returns version information in two strings.
 * @param hSystem A handle to an ASX system object.
 * @param pszSystemVersion The ASX version returned as a string.
 * @param nSystemVersionLength The length of pszSystemVersion in bytes.
 * @param pnRequiredSystemVersionLength The minimum required length of pszSystemVersion in bytes.
 * @param pszSubSystemVersion The ASX subsystem version returned as a string. This is the version number of the HPI,Wave or ALSA (etc.) driver.
 * @param nSubSystemVersionLength The length in bytes of pszSubSystemVersion.
 * @param pnRequiredSubSystemVersionLength The minimum required length in bytes of pszSubSystemVersion.
 * @note This function can be called with string pointers set to zero to determine the size
 * of strings to allocate.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_System_GetVersion( ASX_HANDLE hSystem,
					  char *pszSystemVersion,
					  const int nSystemVersionLength,
					  int *pnRequiredSystemVersionLength,
					  char *pszSubSystemVersion,
					  const int nSubSystemVersionLength,
					  int *pnRequiredSubSystemVersionLength);
/**
 * Get the number of adapters. This function returns the number of recognized sound cards installed in the computer.
 * @note Starting with driver version 4.18.00 the HPI UDP subsystem will only add one found network adapter at a time
 * before returning from this call; call it repeatedly (until the count stops incrementing) to find all networked adapters
 * and periodically thereafter to detect new network adapter connections
 * @param hSystem A handle to an ASX system object.
 * @param pnCount The returned number of adapters.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_System_GetAdapterCount( ASX_HANDLE hSystem, int *pnCount );
/**
 * Get a handle to a specific adapter. This function returns a handle to an adapter object that can then be used to access functionality of the adapter.
 * @param hSystem A handle to an ASX system object.
 * @param nAdapter The index of the adapter.
 * @param p_hAdapter The retuned adapter handle.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_System_GetAdapter( ASX_HANDLE hSystem, const int nAdapter, ASX_HANDLE *p_hAdapter );
/**
 * Set the message logging level for ASX.
 * @param hSystem A handle to an ASX system object.
 * @param eLog The error logging level to set.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_System_SetMessageLogging( ASX_HANDLE hSystem, const enum asxMSG_LOGGING eLog);
/**
 * Get the message logging level for ASX.
 * @param hSystem A handle to an ASX system object.
 * @param eLog The error logging level.  see #asxMSG_LOGGING for options
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_System_GetMessageLogging( ASX_HANDLE hSystem, enum asxMSG_LOGGING *eLog);
/**
 * Set the IP address range that will be used for assigning IP addresses to cobranet devices.
 * This function should be called before the ASX_SYSTEM_TYPE_SNMP is create with #ASX_System_Create() or
 * #ASX_System_CreateSubSystem().
 * @param pCAP Pointer to the #asxCobranetIpAutoassignParameters structure that contains the IP autoassign parameters.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_System_SetCobranetAutoassignParms( const struct asxCobranetIpAutoassignParameters *pCAP );
/**
 * Get the IP address range that will be used for assigning IP addresses to cobranet devices.
 * @param pCAP Pointer to the #asxCobranetIpAutoassignParameters structure that receives the IP autoassign parameters.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_System_GetCobranetAutoassignParms( struct asxCobranetIpAutoassignParameters *pCAP );

/** @} */ // end of System group


/*******************************************************************
 * Handle functions
 */
/** @defgroup Handle Handle functions
 * The error functions operate on all ASX objects to collect, report and clear errors.
 * @{
 *******************************************************************/
/**
 * Get the handle type.
 * @param hHandle A handle to any type of ASX object.
 * @return Returns one of asxHANDLE_TYPE.
 */
ASX32_API enum asxHANDLE_TYPE ASX_Handle_GetType(ASX_HANDLE hHandle);
/** @} */ // end of Handle group

/*******************************************************************
 * Error functions
 */
/** @defgroup ERROR_Base Error functions
 * The error functions operate on all ASX objects to collect, report and clear errors.
 * @{
 *******************************************************************/

/**
 * Get the last error. This function returns error information for the last error generated by hASXObject.
 * @param hASXObject The ASX object handle that generated the error. This can be any ASX object.
 * @param pnAsxErrorCode The returned ASX error code. If this parameter is set to 0, it will be ignored.
 * @param pnAsxSubSystemErrorCode The returned SubSystem error code. This code will be an HPI error if the HPI subsystem
 * is being used, or a MMSYSTEM error if MMSYSTEM is being use. If this parameter is set to 0, it will be ignored.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Error_GetLast(
							ASX_HANDLE hASXObject,
							ASX_ERROR *pnAsxErrorCode,
							int *pnAsxSubSystemErrorCode);

/**
 * Get the last error string information. This function returns error information for the last error generated by hASXObject.
 * Note that errors are automatically cleared the next time any operation is performed using hASXObject.
 * @param hASXObject The ASX object handle that generated the error. This can be any ASX object.
 * @param pszAsxErrorString The returned ASX error string. If this parameter is set to 0, it will be ignored.
 * @param nAsxErrorStringLength The length of pszAsxErrorString on bytes.
 * @param pnRequiredAsxErrorStringLength The required length of pszAsxErrorString in bytes.
 * @param pszAsxSubSystemErrorString The returned SubSystem error string. This string will describe an HPI error if the HPI subsystem
 * is being used, or a MMSYSTEM error if MMSYSTEM is being use. If this parameter is set to 0, it will be ignored.
 * @param nAsxSubSystemErrorStringLength The length of pszAsxSubSystemErrorString in bytes.
 * @param pnRequiredAsxSubSystemErrorStringLength The required length of pszAsxSubSystemErrorString in bytes.
 * @note This function can be called with string pointers set to zero to determine the size
 * of strings to allocate.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Error_GetLastString(
							ASX_HANDLE hASXObject,
							char *pszAsxErrorString,
							const int nAsxErrorStringLength,
							int *pnRequiredAsxErrorStringLength,
							char *pszAsxSubSystemErrorString,
							const int nAsxSubSystemErrorStringLength,
							int *pnRequiredAsxSubSystemErrorStringLength);


/**
 * Clears the last error. This function clears error information for the last error generated by hASXObject.
 * @param hASXObject The ASX object handle.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Error_Clear(
							ASX_HANDLE hASXObject);

/** @} */ // end of Error group

/** \example system/main.c
 * This is an example of how to use the ASX System functions.
 */

/*******************************************************************
 * Adapter functions
 */
/** @defgroup Adapter Adapter functions
 * The adapter functions are used to obtain adapter information and access the mixer.
 * @{
 *******************************************************************/

/**
 * Returns the status of the various sub-systems that interface to the adapter.
 * This function is primarily implemented to provide feedback on whether adapters (or subsystems) that
 * a network interface are working correctly. The bit masks used in this function consist of
 * 1<<ASX_SYSTEM_TYPE_xxxx.
 * @param hAdapter A handle to an ASX adapter object.
 * @param pnSubSystemMask A bit mapped mask of the subsystems that interface to this adapter.
 * @param pnSubSystemOkMask A bit mapped result indicating that a particular interface is ok.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Adapter_CheckSubSystems(
		ASX_HANDLE hAdapter,
		unsigned int *pnSubSystemMask,
		unsigned int *pnSubSystemOkMask);


/**
 * Gets the name of the adapter.
 * This function returns the name of the audio adapter referenced by hAdapter.
 * An example return string would be "ASI6114" for and AudioScience ASI6114
 * adapter.
 *
 * Note that some adapters have plug in modules and will return addition module
 * code characters following the adapter name. For example a ASI8920 with two
 * modules would return "ASI8920-1100", indicating that module positions
 * 1 and 2 are populated with modules of type "1". The device datasheet,
 * in this case the ASI8900, should be consulted to translate the module
 * code to a module type.
 * @code
// an example of the "compact" calling method would be
char szName[ASX_SHORT_STRING];

ASX_Adapter_GetName(hAdapter,szName,ASX_SHORT_STRING,NULL);

 * @endcode
 * @param hAdapter A handle to an ASX adapter object.
 * @param pszName The string to use to copy the returned adapter name to.
 * @param nStringLength The length of szString in bytes.
 * @param RequiredLength The minimum required length of szString in bytes. This can be set to NULL if the calling
 *        passes in a string of length ASX_SHORT_STRING.
 * @note This function can be called will szString=0 and nStringLength=0 to retrieve the required string
 * size in bytes.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Adapter_GetName(
							ASX_HANDLE hAdapter,
							char *pszName,
							const int nStringLength,
							int *RequiredLength );

/**
 * Gets an adapter's index.
 * This function returns the hardware index of the audio adapter referenced by hAdapter. All
 * AudioScience adapters have unique indexes assigned by a hardware jumper/switch (sound cards)
 * or programmed into non-volatile memory (network devices).
 * Indexes in the range of 1..99 are used for sound cards or other bus based devices
 * Indexes in the range of 100..9999 are used for network devices
 * Indexes of 10000 and higher are used to auto-assign indexes to network devices that don't have an index programmed yet
 * Note that the hardware index is not the same as the ASX adapter index passed to ASX_System_GetAdapter()
 * @param hAdapter A handle to an ASX adapter object.
 * @param pnIndex The returned index.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 *
 * @todo This function is currently not implemented, and always returns nIndex=0
 * @todo and returns asxERROR_UNIMPLEMENTED
 */
ASX32_API ASX_ERROR ASX_Adapter_GetIndex(
							ASX_HANDLE hAdapter,
							int *pnIndex );

/**
* Gets an adapter's AVDECC Controller object.
* This function returns the controller object used by adapters of subsystem type 1722.1
* @param hAdapter A handle to an ASX adapter object.
* @param controller The returned controller object.
* @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
*/
ASX32_API ASX_ERROR ASX_Adapter_GetAVDECCController(ASX_HANDLE hAdapter, void ** controller_obj);

/**
* This function returns the system object used by adapters of subsystem type 1722.1
* @param hAdapter A handle to an ASX adapter object.
* @param controller The returned system object.
* @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
*/
ASX32_API ASX_ERROR ASX_Adapter_GetAVDECCSystem(ASX_HANDLE hAdapter, void ** sys);

/**
 * Gets an adapter's serial number.
 * This function returns the serial number of the audio adapter referenced by hAdapter. All
 * AudioScience adapters have unique serial numbers assigned during manufacturing.
 * @param hAdapter A handle to an ASX adapter object.
 * @param pdwSerialNumber The returned serial number.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Adapter_GetSerialNumber(
							ASX_HANDLE hAdapter,
							unsigned long *pdwSerialNumber );

/**
 * Gets an adapter's hardware revision.
 * This function returns the revision of the audio adapter referenced by hAdapter. The
 * revision indicates the hardware revision of the adapter. An example of a revision string
 * is "A0". The first character is a letter (A-Z) inticating the major revision number and the
 * second character is a digit (0-9) indicating the minor revision number.
 * @note This function is currently only supported by the ASX_SYSTEM_TYPE_HPI interface.
 * @param hAdapter A handle to an ASX adapter object.
 * @param pszRevision A pointer to a char array of length ASX_SHORT_STRING to return the revision string.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
 ASX32_API ASX_ERROR ASX_Adapter_GetHardwareRevision(
							ASX_HANDLE hAdapter,
							char *pszRevision);

/**
 * Gets an adapter's firmware revision.
 * This function returns the revision of the firmware running on an audio adapter referenced by hAdapter.
 * An example of a revision string is "v1.25".
 * @note This function is currently only supported by the ASX_SYSTEM_TYPE_HPI interface.
 * @param hAdapter A handle to an ASX adapter object.
 * @param pszRevision A pointer to a char array of length ASX_SHORT_STRING to return the revision string.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
 ASX32_API ASX_ERROR ASX_Adapter_GetFirmwareRevision(
							ASX_HANDLE hAdapter,
							char *pszRevision);

/**
 * Gets an adapter's ethernet MAC address.
 * For network devices, this function returns the ethernet MAC address of the Adapter.
 * The MAC address is returned as a string representing the 12 hex digits, with the format XXXX.XXXX.XXXX.
 * If the adapter does not have a MAC address (i.e if it was a sound card) then an error is returned.
 * @param hAdapter A handle to an ASX adapter object.
 * @param pszMAC A pointer to a char array of length ASX_SHORT_STRING to return the MAC address string.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
 ASX32_API ASX_ERROR ASX_Adapter_GetMacAddress(
							ASX_HANDLE hAdapter,
							char *pszMAC);

/**
 * Gets an adapter's network IP address.
 * For network devices, this function returns the IP address of the Adapter.
 * The IP address is returned as a string with the format XXX.XXX.XXX.XXX.
 * If the adapter does not have an IP address (i.e if it was a sound card) then an error is returned.
 * @param hAdapter A handle to an ASX adapter object.
 * @param pszIP A pointer to a char array of length ASX_SHORT_STRING to return the MAC address string.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
 ASX32_API ASX_ERROR ASX_Adapter_GetIpAddress(
							ASX_HANDLE hAdapter,
							char *pszIP);

/**
 * Gets an adapter's DSP utilization.
 * This function returns the DSP percentage utilization of the audio adapter referenced by hAdapter. The
 * utilization can be used to check the running algorithms do not over tax the DSP.
 * @note This function is currently only supported by the ASX_SYSTEM_TYPE_HPI interface.
 * @param hAdapter A handle to an ASX adapter object.
 * @param nDspIndex The DSP index. On adapters with more than one DSP, all DSPs can be accessed using this index field.
 * @param pnDspUtilization The returned DSP utilization in percent.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Adapter_GetDspUtilization(
							ASX_HANDLE hAdapter,
							const int nDspIndex,
							int *pnDspUtilization);

/**
 * Gets a handle to an adapter's mixer. This function returns a handle to a mixer object that can then
 * be used to access mixer nodes andcontrols.
 * @param hAdapter A handle to an ASX adapter object.
 * @param p_hMixer The retuned mixer handle.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Adapter_GetMixer(
							ASX_HANDLE hAdapter,
							ASX_HANDLE *p_hMixer );


/**
 * Enumerate each adapter mode option.
 * @param hAdapter A handle to an ASX adapter object.
 * @param nIndex The index of the adapter mode option to fetch.
 * @param peMode The returned adapter mode option.
 * @param pnCount The total number of available mode options. See #asxADAPTERMODE for available options.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Adapter_EnumerateMode( ASX_HANDLE hAdapter, const int nIndex, enum asxADAPTERMODE *peMode, int *pnCount);
/**
 * Get the current adapter mode.
 * @param hAdapter A handle to an ASX adapter object.
 * @param peMode The returned adapter mode. See #asxADAPTERMODE for different mode options.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Adapter_GetMode( ASX_HANDLE hAdapter, enum asxADAPTERMODE *peMode);
/**
 * Set the current adapter mode.
 * @param hAdapter A handle to an ASX adapter object.
 * @param eMode The adapter mode to set. This must be one of the options returned by calls to #ASX_Adapter_EnumerateMode().
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Adapter_SetMode( ASX_HANDLE hAdapter, const enum asxADAPTERMODE eMode);
/**
 * Enumerates adapter properties and settings.
 * @param hAdapter A handle to an ASX adapter object.
 * @param nIndex The property number.
 * @param eMode Enumeration mode (See asxADPROPENUM_MODE).
 * @param nSubIndex Subindex.
 * @param pdwSetting Returned setting.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Adapter_EnumerateProperty( ASX_HANDLE hAdapter, const int nIndex, const enum asxADPROPENUM_MODE eMode, const int nSubIndex, unsigned long *pdwSetting);
/**
 * Read an adapter's property value.
 * Current support property indexes are:
 * - 1 = ERRATA_1, returns whether errata_1 workaround for 6100 cards is turned on.
 * - 2 = SSX2_SETTING, returns whether SSX2 is on or off.
 * - 3 = SYNC_HEADER_CONNECTIONS (read-only), returns the number of headers connected.
 * - 4 = SUPPORT_SSX2 (read-only), returns true or false.
 * - 5 = SUPPORTS_FW_UPDATE (read-only), device supports firmware updating
 * - 6 = FIRMWARE_ID (read-only), firmware ID
 * @param hAdapter A handle to an ASX adapter object.
 * @param nIndex The index of the property to read.
 * @param pwParm1 Receives property specific value.
 * @param pwParm2 Receives property specific value.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Adapter_ReadProperty( ASX_HANDLE hAdapter, const int nIndex, unsigned short *pwParm1, unsigned short *pwParm2);
/**
 * Write an adapter property value.
 * @param hAdapter A handle to an ASX adapter object.
 * @param nIndex The property number.
 * @param wParm1 Property specific value.
 * @param wParm2 Property specific value.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Adapter_WriteProperty( ASX_HANDLE hAdapter, const int nIndex, const unsigned short wParm1, const unsigned short wParm2);
/**
 * Write a byte to the non-volatile memory.
 * @param hAdapter A handle to an ASX adapter object.
 * @param nAddress The address to write the byte to.
 * @param cValue The byte to write.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Adapter_WriteNvMem( ASX_HANDLE hAdapter, const int nAddress, const unsigned char cValue);
/**
 * Read a byte from the non-volatile memory.
 * @param hAdapter A handle to an ASX adapter object.
 * @param nAddress The address to read the byte from.
 * @param pcValue A pointer to the returned byte.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Adapter_ReadNvMem( ASX_HANDLE hAdapter, const int nAddress, unsigned char *pcValue);
/**
 * Get the number of bytes in the adapter's non-volatile memory.
 * @param hAdapter A handle to an ASX adapter object.
 * @param pnCount A pointer to the returned total number of bytes.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Adapter_GetNvMemSizeInBytes( ASX_HANDLE hAdapter, int *pnCount);


/** @} */ // end of Adapter group

/** \example adapter/main.c
 * This is an example of how to use the ASX Adapter functions.
 */

/*******************************************************************
 * Mixer functions
 */
/** @defgroup Mixer Mixer functions
 * The mixer functions are used to access mixer nodes and controls.
 * @{
 *******************************************************************/

/**
 * This function sets all the controls in the mixer to a known state.
 * - SampleClock is set to Local and 44.1kHz
 * - Volume controls on a single node are set to 0dB
 * - Channel Modes are set to Normal
 * - Volume controls between a src and dest node are set to 0dB if the node indexes match, otherwise -100db
 * - Multiplexers are set to LineIn
 * - Level controls are set to +14dBu.
 * - VOX control set to -100dB (off)
 *
 * @param hMixer A handle to an ASX mixer object.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Mixer_ResetControls(
					ASX_HANDLE hMixer);

/**
 * This function returns the nunber of source nodes in the mixer.
 * @param hMixer A handle to an ASX mixer object.
 * @param pnCount The retuned number of source nodes.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Mixer_GetSourceNodeCount(
					ASX_HANDLE hMixer,
					int *pnCount);

/**
 * This function gets the handle of a particular source node.
 * @param hMixer A handle to an ASX mixer object.
 * @param nSourceNode The index of the source node to get. This should be a number in the range of
 * 0 to the total count returned by #ASX_Mixer_GetSourceNodeCount().
 * @param p_hNode The returned source node handle.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Mixer_GetSourceNode(
					ASX_HANDLE hMixer,
					const int nSourceNode,
					ASX_HANDLE *p_hNode );


/**
 * This function returns the nunber of destination nodes in the mixer.
 * @param hMixer A handle to an ASX mixer object.
 * @param pnCount The retuned number of destination nodes.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Mixer_GetDestinationNodeCount(
					ASX_HANDLE hMixer,
					int *pnCount);

/**
 * This function gets the handle of the specified destination node.
 * @param hMixer A handle to an ASX mixer object.
 * @param nDestinationNode The index of the destination node to get. This should be a number in the range of
 * 0 to the total count returned by #ASX_Mixer_GetDestinationNodeCount().
 * @param p_hNode The returned destination node handle.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Mixer_GetDestinationNode(
					ASX_HANDLE hMixer,
					const int nDestinationNode,
					ASX_HANDLE *p_hNode );

/**
 * Get a node by type. This function searches all mixer nodes for a
 * node of a particular type and index. This function could be used to find a "LineOut" 1 node for example.
 * @param hMixer A handle to an ASX mixer object.
 * @param eType The node type to get. This should be set to one of #asxNODE.
 * @param nIndex The index of the node to get. If the adapter has 4 line outs, for example, and nType is
 * set to #asxNODE_LINE_OUT, then the valid range for nIndex would be 0-3.
 * @param p_hNode The returned destination node handle.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Mixer_GetNodeByType(
					ASX_HANDLE hMixer,
					const enum asxNODE eType,
					const int nIndex,
					ASX_HANDLE *p_hNode);

/**
 * Get the number of nodes of the specified type.
 * This function returns the number of nodes of the specified type in the mixer. For example, an adapter with 4
 * line outs would return 4 when nType is set to #asxNODE_LINE_OUT.
 * @param hMixer A handle to an ASX mixer object.
 * @param eType The node type to get. This should be set to one of #asxNODE.
 * @param pnCount The retunred number of nodes of type nType.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Mixer_GetNodeTypeCount(
					ASX_HANDLE hMixer,
					const enum asxNODE eType,
					int *pnCount);



/**
 * This function returns the total number of controls in the mixer.
 * @param hMixer A handle to an ASX mixer object.
 * @param pnControls The returned number of controls.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Mixer_GetControlCount(
					ASX_HANDLE hMixer,
					int *pnControls);

/**
 * Given a control index, this function returns a handle to the specified control.
 * @param hMixer A handle to an ASX mixer object.
 * @param nControl The index of the control handle to return.
 * @param p_hControlBase The returned ASX control handle.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Mixer_GetControl(
					ASX_HANDLE hMixer,
					const int nControl,
					ASX_HANDLE *p_hControlBase );

/**
 * Given source and destination node handles as well as the control type, return the specified control.
 * @param hMixer A handle to an ASX mixer object.
 * @param hSourceNode A handle to an ASX source node object. This handle may be set to #asxNODE_NONE (or 0) if the requested
 * control does not have a source node.
 * @param hDestinationNode A handle to an ASX destination node object. This handle may be set to #asxNODE_NONE (or 0) if the requested
 * control does not have a destination node.
 * @param eControlType The control type. Should be set to one of #asxCONTROL.
 * @param p_hControlBase The returned ASX control handle.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Mixer_GetControlByNode(
					const ASX_HANDLE hMixer,
					const ASX_HANDLE hSourceNode,
					const ASX_HANDLE hDestinationNode,
					const enum asxCONTROL eControlType,
					ASX_HANDLE *p_hControlBase );

/**
 * Given source and destination node specifications as well as the control type, return the specified control.
 * @param hMixer A handle to an ASX mixer object.
 * @param nSourceNodeType The type of the ASX source node object. Typically this will be set to one of #asxNODE.
 *  The type may be set to #asxNODE_NONE (or 0) if the requested control does not have a source node.
 * @param nSourceIndex The source node index. This may be set to 0 if the requested control does not have a source node.
 * @param nDestinationNodeType The type of the ASX destination node object. Typically this will be set to one of #asxNODE.
 *  The type may be set to #asxNODE_NONE (or 0) if the requested control does not have a destination node.
 * @param nDestinationIndex The destination node index. This may be set to 0 if the requested control does not have a destination node.
 * @param eControlType The control type. Should be set to one of #asxCONTROL.
 * @param p_hControlBase The returned ASX control handle.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Mixer_GetControlByNodeTypeAndIndex(
					ASX_HANDLE hMixer,
					const enum asxNODE nSourceNodeType,
					const int nSourceIndex,
					const enum asxNODE nDestinationNodeType,
					const int nDestinationIndex,
					const enum asxCONTROL eControlType,
					ASX_HANDLE *p_hControlBase );

/**
 * Given source and destination node specifications as well as the block control name, return the specified control.
 * @param hMixer A handle to an ASX mixer object.
 * @param nSourceNodeType The type of the ASX source node object. Typically this will be set to one of #asxNODE.
 *  The type may be set to #asxNODE_NONE (or 0) if the requested control does not have a source node.
 * @param nSourceIndex The source node index. This may be set to 0 if the requested control does not have a source node.
 * @param nDestinationNodeType The type of the ASX destination node object. Typically this will be set to one of #asxNODE.
 *  The type may be set to #asxNODE_NONE (or 0) if the requested control does not have a destination node.
 * @param nDestinationIndex The destination node index. This may be set to 0 if the requested control does not have a destination node.
 * @param pszBlockName The block control name.
 * @param p_hControlBase The returned ASX control handle.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Mixer_GetBlockControlByNodeTypeAndIndex(
				ASX_HANDLE hMixer,
				const enum asxNODE nSourceNodeType,
				const int nSourceIndex,
				const enum asxNODE nDestinationNodeType,
				const int nDestinationIndex,
				const char *pszBlockName,
				ASX_HANDLE *p_hControlBase );

/** @} */ // end of Mixer group

/*******************************************************************
 * Node functions
 */
/** @defgroup Node Node functions
 * The node functions are used to access nodes objects. The node objects as they are
 * implemented in ASX are really just placeholders. These functions allow an application to
 * query node information, including the node type, index and name. Often these functions will be
 * called after after the source and/or destination nodes of a particular control have been
 * obtained.
 * @{
 *******************************************************************/
/**
 * Returns the node type of the given node.
 * @param hNode A handle to an ASX node object.
 * @param peType The returned ASX node type. This will below to one of #asxNODE.
 * If hNode is null, *peNode=asxNODE_NONE - this is not an error.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Node_GetType(
					ASX_HANDLE hNode,
					enum asxNODE *peType);

/**
 * Returns the index of the given node.
 * @param hNode A handle to an ASX node object.
 * @param pnIndex The returned ASX node index. For example, if the hNode object represented the second
 * line out, pnIndex would return 1. Index 0 would be the first line out, so index 1 is the second line out.
 * Also returns 0 if hNode=asxNODE_NONE.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Node_GetIndex(
					ASX_HANDLE hNode,
					int *pnIndex);

/**
  * Returns the location of the given node in terms of module slots and position on the module
  * that contains the node.
  * @param hNode A handle to an ASX node object.
  * @param pnModuleSlot The returned module's slot number.
  * @param pnNodeIndexOnSlot The returned node's index on the module.
  * @param pszModuleName The returned module name. This wil be something like "ASI1441".
  * The string passed in should be of length ASX_SHORT_STRING.
  * @param nStringLength The length of the passed in string.
  * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
  */
ASX32_API ASX_ERROR ASX_Node_GetLocation(
					ASX_HANDLE hNode,
					int *pnModuleSlot,
					int *pnNodeIndexOnSlot,
					char *pszModuleName,
					const int nStringLength);

/**
 * Returns the sub system handle of the given node.
 * @param hNode A handle to an ASX node object.
 * @param p_nSubSystem The returned ASX sub system type.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Node_GetSubSystem(
					ASX_HANDLE hNode,
					int *p_nSubSystem);

/**
 * Get the name of the node.
 * @param hNode A handle to an ASX node object.
 * @param pszNodeName The string buffer of size nStringLength allocated by the caller.
 * @param nStringLength The length of the pszNodeName buffer. Should be ASX_LONG_STRING.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Node_GetName(
			ASX_HANDLE hNode,
			char *pszNodeName,
			const int nStringLength
			);

/**
 * @deprecated This function has been superseded by ASX_Node_GetType()
 */
ASX32_API ASX_ERROR ASX_Mixer_GetNodeType(
					ASX_HANDLE hNode,
					enum asxNODE *peType);

/**
 * @deprecated This function has been superseded by ASX_Node_GetIndex()
 */
ASX32_API ASX_ERROR ASX_Mixer_GetNodeIndex(
					ASX_HANDLE hNode,
					int *pnIndex);

/** @} */ // end of Node group

/** \example mixer/main.c
 * This is an example of how to use the ASX Mixer functions.
 */

/******************************************************************
 * Control functions
 */
/** @defgroup CONTROL_ControlBase Control generic functions
 * These generic control functions operate on all control objects.
 * All ASX control objects have type and source and destination node properties.
 * The generic control functions that follow support querying those properites.
 * @{
 *******************************************************************/

/**
 * Generic control function to get the type of a control.
 * @param hControl A handle to an ASX control object.
 * @param peControl The returned control type will be one of #asxCONTROL.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Control_GetType( ASX_HANDLE hControl, enum asxCONTROL *peControl);
/**
 * Generic control function to get the source node of a control.
 * @param hControl A handle to an ASX control object.
 * @param p_hNode The source node ASX object handle. This can be zero if the control does not have a source node.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Control_GetSourceNode( ASX_HANDLE hControl, ASX_HANDLE *p_hNode );
/**
 * Generic control function to get the destination node of a control.
 * @param hControl A handle to an ASX control object.
 * @param p_hNode The destination node ASX object handle. This can be zero if the control does not have a destination node.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Control_GetDestinationNode( ASX_HANDLE hControl, ASX_HANDLE *p_hNode );
/**
 * Tunnel through ASX to get HPI control parameters (NOT IMPLEMENTED YET).
 * @param hControl A handle to an ASX control object.
 * @param pphHpiSubSys Pointer to an HPI_HSUBSYS object.
 * @param phHpiControl Pointer to an HPI_HCONTROL object.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 * Example <br>
\code
	HPI_HSUBSYS *phHPISubSys;
	HPI_HCONTROL hHPIControl;
	ASX_HANDLE hASXControl;		// this is filled in from somewhere

	ASX_Control_GetHPIControl( hASXControl, &phHPISubSys, &hHPIControl);
\endcode
 */
ASX32_API ASX_ERROR ASX_Control_GetHpiControl( ASX_HANDLE hControl, void **pphHpiSubSys, unsigned int *phHpiControl );
/**
 * Returns the sub system handle of the given control.
 * @param hControl A handle to an ASX control object.
 * @param p_nSubSystem The returned ASX sub system type.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Control_GetSubSystem(
					ASX_HANDLE hControl,
					int *p_nSubSystem);


/*
enum asxCONTROL_PROPERTY {
	asxCONTROL_PROPERTY_TUNER_HDRADIO_SIGNAL_QUALITY,
	asxCONTROL_PROPERTY_TUNER_HDRADIO_SDK_VERSION,
	asxCONTROL_PROPERTY_TUNER_HDRADIO_DSP_VERSION
};

ASX32_API ASX_ERROR ASX_Control_GetProperty( ASX_HANDLE hControl, enum asxCONTROL_PROPERTY eProperty, unsigned long dwProperty1, unsigned long dwProperty2 );
*/

/** @} */ // end of Control group

#if (DISABLE_PLAYREC_CONTROLS!=1)
/*******************************************************************
 * Player Control
 */
/** @defgroup Player Player control functions
 * These functions support file playback. The player control transparently
 * supports the playback of several different file formats and compression
 * formats.
 * Formats supported for playback in this version:
<table border=1 cellspacing=0 cellpadding=3>
<tr>
<td width=200><p><b>asxFILE_FORMAT</b></p></td>
<td width=200 align=center><p><b>_WAV</b></p></td>
<td width=200 align=center><p><b>_RAW</b></p></td>
</tr>
<tr>
<td><p><b>Filename Extension</b></p></td>
<td align=center><p>.WAV</p></td>
<td align=center><p>any</p></td>
</tr>
<tr>
<td><p><b>_PCM8 or _PCM16</b></p></td>
<td align=center><p>supported</p></td>
<td align=center><p>write only</p></td>
</tr>
<tr>
<td><p><b>_PCM24 or _PCM32</b></p></td>
<td align=center><p>supported</p></td>
<td align=center><p>write only</p></td>
</tr>
<tr>
<td><p><b>_PCM32_FLOAT</b></p></td>
<td align=center><p>supported</p></td>
<td align=center><p>write only</p></td>
</tr>
<tr>
<td><p><b>_MPEG_L2</b></p></td>
<td align=center><p>supported</p></td>
<td align=center><p>supported</p></td>
</tr>
<tr>
<td><p><b>_MPEG_L3</b></p></td>
<td align=center><p>supported</p></td>
<td align=center><p>supported</p></td>
</tr>
<tr>
<td><p><b>_MPEG_AACPLUS</b></p></td>
<td align=center><p>not supported yet</p></td>
<td align=center><p>not supported yet</p></td>
</tr>
<tr>
<td><p><b>_DOLBY_AC2</b></p></td>
<td align=center><p>not supported yet</p></td>
<td align=center><p>not supported yet</p></td>
</tr>
</table>
 * Note: RAW format playback currently cannot support PCM data formats due to the lack format information
 * in the file.  A future version of ASX will include a new playback function to play raw PCM files.
 *
 * Player State Diagram
 \image latex asx_player_states.eps "ASX Player State Diagram." width=12cm
 \htmlonly
 <img align=center src="..\asx_player_states.gif" alt="ASX Player State Diagram."><br>
 \endhtmlonly
 * @{
 *******************************************************************/
/**
 * Open a file for playback.
 * @param hPlayer A handle to an ASX player control object.
 * @param pszFile The name of the file to play. This can be the name of a file
 * in the current directory or a fully qualified path name The file can be a .wav or .mp3 file. Note
 * that MP3 playback is currently only supported on those adapters that support MP3 decoding. This
 * would be the ASI43xx and ASI6xxx series.
 *
 * You can also generate a sine wave.  The format of the string is:
 * "~w,c,f,a,m,s,t"
 *
 * w = waveform = SINE (default=SINE)<br>
 * c = channels = 1..8 (default = 2)<br>
 * f = frequency = 1000 for 1kHz (default=1000)<br>
 * a = amplitude = -1 for -1dBFs (default=0dBFS, ie full scale)<br>
 * m = channel_mask = 10 for left only, 01 for right only, 11 for stereo etc (default=1 for all channels)<br>
 * t = sampletype = (PCM8,PCM16,PCM24,PCM32,FLOAT32), (default=FLOAT32)<br>
 * s = samplerate = positive integer (default=48000) [validity depends on adapter]
 *
 * Defaults can be used if the complete string is not specifed, ie
 *
 * "~" -> "~wSINE,c2,f1000,a0,m11,s48000,tFLOAT32"
 *
 * Any subset of the options may be specified, the remaining options will be set to the defaults.
 * eg "~f500" -> 500Hz stereo sine wave at 0dBFS, 48kHz samplerate
 *
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_Open( ASX_HANDLE hPlayer, const char *pszFile);
/**
 * Get the format of the currently opened file as a string.
 * @param hPlayer A handle to an ASX player control object.
 * @param pszFormat The returned pointer to a format string.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_Format_GetString( ASX_HANDLE hPlayer, char **pszFormat);
/**
 * Get the format of the currently opened file as individual variables.
 * @param hPlayer A handle to an ASX player control object.
 * @param peFormat The returned format code - see #asxAUDIO_FORMAT.
 * @param pnChannnels The returned number of channels.
 * @param pnSampleRate The returned sample rate.
 * @param pnBitRate The returned bitrate.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_Format_GetDetails( ASX_HANDLE hPlayer,
							enum asxAUDIO_FORMAT *peFormat,
							int *pnChannnels,
							int *pnSampleRate,
							int *pnBitRate);
/**
 * Preloads playback buffers from the given position, ready for playback. This function will seek to
 * the specified file position and then load audio buffers from the file. This shortens the time
 * between the time a ASX_Player_Start() is issued and the time for audio to be output.
 * @note This function does not have to be used. It is optional. If #ASX_Player_Start() is called
 * without calling #ASX_Player_PreLoad(), the preload operation will happen internal to the #ASX_Player_Start() call.
 * The assumption will also be that playback begins at the start of the audio file.
 * @param hPlayer A handle to an ASX player control object.
 * @param nType The units of lPosition (see #asxTIMESCALE).
 * @param lPosition The position to start playback from. A value of zero start from the
 * beginning of the file.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_PreLoad( ASX_HANDLE hPlayer, const enum asxTIMESCALE nType, const unsigned long lPosition);
/**
 * Start playback of a previously opened (and optionally pre-loaded) file.
 * @param hPlayer A handle to an ASX player control object.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_Start( ASX_HANDLE hPlayer);
/**
 * Pause playback of the currently playing file. Use #ASX_Player_Start to continue playing.
 * To end a paused recording call #ASX_Player_Stop.
 * @param hPlayer A handle to an ASX player control object.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_Pause( ASX_HANDLE hPlayer);
/**
 * Stops playback of the currently playing file. This call resets the play position
 * as well as stopping playback. Use #ASX_Player_Pause() to retain the current position.
 * @param hPlayer A handle to an ASX player control object.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_Stop( ASX_HANDLE hPlayer);
/**
 * Wait for the current file to finish. This function does not return until the current
 * file has finished playing.
 * @param hPlayer A handle to an ASX player control object.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_Wait( ASX_HANDLE hPlayer);
/**
 * Close the current playback file.
 * @param hPlayer A handle to an ASX player control object.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_Close( ASX_HANDLE hPlayer);
/**
 * Get the current playback position as the offset in bytes, samples or milliseconds
 * from the beginning or end of the file depending on the timescale code used.
 * NOTE: For compressed file it is assumed that the same bitrate is used throughout
 * the file.  If the file uses different bitrates (sometimes called
 * "bitrate switching") then the position may not be accurate.
 * @param hPlayer A handle to an ASX player control object.
 * @param nType The units to return the position in (see #asxTIMESCALE).
 * @param plPosition The current relative playback position.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_GetPosition( ASX_HANDLE hPlayer, const enum asxTIMESCALE nType, unsigned long *plPosition);
/**
 * Sets the playback to the given position.
 * @param hPlayer A handle to an ASX player control object.
 * @param nType The units of lPosition (see #asxTIMESCALE).
 * @param lPosition The position playback from.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_SetPosition( ASX_HANDLE hPlayer, const enum asxTIMESCALE nType, const unsigned long lPosition);
/**
 * Get the current playback state.
 * @param hPlayer A handle to an ASX player control object.
 * @param pnState The current player state. See #asxPLAYER_STATE.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_GetState( ASX_HANDLE hPlayer, enum asxPLAYER_STATE *pnState);
/**
 * Set the playback timescale. This function allows the user to adjust the time a file takes
 * to playback without affecting the pitch. Time scale range is 0.8 - 1.2 (80% to o120%) of
 * original file time.
 * @note This function is only supported on the ASI6xxx series adapters.
 * @param hPlayer A handle to an ASX player control object.
 * @param fTimeScale The time scale to use on the playing file. Range is 0.8 < fTimeScale < 1.2.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_SetTimeScale( ASX_HANDLE hPlayer, const float fTimeScale);
/**
 * Get the playback timescale. This function allows the user read the time ratio. Time scale range
 * is 0.8 - 1.2 (80% to o120%) of original file time.
 * @note This function is only supported on the ASI6xxx series adapters.
 * @param hPlayer A handle to an ASX player control object.
 * @param pfTimeScale Pointer to the returned time scale. Range is 0.8 < fTimeScale < 1.2.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_GetTimeScale( ASX_HANDLE hPlayer, float *pfTimeScale);
/**
 * Get the current filename, if any.
 * @param hPlayer A handle to an ASX player control object.
 * @param pszFilename The returned pointer to the filename.
 * @param nStringLength The length in bytes of pszFilename.
 * @param pnRequiredLength The required length in bytes of pszRevision.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 * Returns asxERROR_INDEX_OUT_OF_RANGE if the buffer is too small.
 */
ASX32_API ASX_ERROR ASX_Player_GetFilename( ASX_HANDLE hPlayer, char *pszFilename, const int nStringLength, int *pnRequiredLength );
/**
 * Set the player to loop or single play mode.
 * @param hPlayer A handle to an ASX player control object.
 * @param nLooping 1 for looping, 0 for single play.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 * Returns asxERROR_INDEX_OUT_OF_RANGE if the buffer is too small.
 */
ASX32_API ASX_ERROR ASX_Player_SetLoopMode( ASX_HANDLE hPlayer, const int nLooping );
/**
 * Get the current player loop mode.
 * @param hPlayer A handle to an ASX player control object.
 * @param pnLooping Pointer to return value: 1 for looping, 0 for single play.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 * Returns asxERROR_INDEX_OUT_OF_RANGE if the buffer is too small.
 */
ASX32_API ASX_ERROR ASX_Player_GetLoopMode( ASX_HANDLE hPlayer, int *pnLooping );
/**
 * Open a list of files for playback.
 * @param hPlayer A handle to an ASX player control object.
 * @param pszFileList The names of the files to play. This can be the name of a file
 * in the current directory or a fully qualified path name. See ASX_Player_Open().
 * Note that the player makes a copy of the filelist, so there in no need for the
 * calling application to keep the list of strings in the calling context.
 * @param nFiles The number of files in the playlist.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_OpenPlaylist(
	ASX_HANDLE hPlayer,
	const char **pszFileList,
	const unsigned int nFiles);
/**
  * Returns playlist status.
  * Use this function to monitor playlist progress.
  * @param hPlayer A handle to an ASX player control object.
  * @param nTotalFileCount Returns the total number of files
  * remaining in the current playlist. This will equal the
  * parameter "nFiles" used in the call to ASX_Player_OpenPlaylist()
  * @param nCurrentFile Returns the index of the currently playing
  * file. A value of -1 indicates that the first file has not
  * yet started. The range of nCurrentFile is 0 to (nTotalFileCount-1).
  * A pause operation does not affect the value returned by nCurrentFile.
  * @param szCurrentFilename The name of the current file being played.
  * This returns "undefined" before the first Start() command is issued.
  * @param nTotalTime_ms The total time in milliseconds of all the
  * files that are in the playback list. Note that this variable will
  * be affected if timescaling is enabled.
  * @param nCurrentTime_ms The current accumlated time of the file
  * list playback in milliseconds. This will range from 0 to nTotalTime_ms.
  * Note that this variable will be affected if timescaling is enabled.
  */
ASX32_API ASX_ERROR ASX_Player_PlaylistStatus(
	ASX_HANDLE hPlayer,
	unsigned int *nTotalFileCount,
	int *nCurrentFile,
	char **szCurrentFilename,
	unsigned int *nTotalTime_ms,
	unsigned int *nCurrentTime_ms
);
/**
 * Register a callback function that should be called when playback has completed.
 * Note that using this function is optional.
 * @param hPlayer A handle to an ASX player control object.
 * @param pCallback A pointer to a callback of type ASX_PLAYER_CALLBACK.
 * @param flags Defines whether the callback should be called on file completion and/or
 * filelist completion. See #asxPLAYER_FLAGS.
 * @param pUser1 A user defined pointer that is passed back when a callback is made.
 */
ASX32_API ASX_ERROR ASX_Player_RegisterCallback(
	ASX_HANDLE hPlayer,
	ASX_PLAYER_CALLBACK *pCallback,
	const enum asxPLAYER_FLAGS flags,
	void *pUser1);
/**
 * Wait for the playlist to finish. This function does not return until the current
 * playlist has finished playing.
 * @param hPlayer A handle to an ASX player control object.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Player_PlaylistWait( ASX_HANDLE hPlayer);

/** @} */ // end of Player group

/** \example play/main.c
 * This is an example of how to use the ASX Player control.
 */

 /** \example playlist/main.c
 * This is an example of how to use the ASX Player to play filelists.
 */

 /** \example csharp_asx_player/Form1.cs
 * This is an example of how to use the ASX Player control from c#.
 */

/** \example dual_mono_play/main.c
This is an example of how to set up channel mode controls for dual mono playback.
All play streams on AudioScience audio adapters play, at a minimum, either
mono or stereo files on the same device. Mono playback always converts mono or stereo
to a stereo stream of audio. So to play to the right channel, for example, the stereo
stream should be converted to have only right channel audio output.

<b>Configuration Steps</b>

The following steps should be performed to set up playback of 4
independent mono streams. We are going to play in the following configuration:

\verbatim
Play 1 -> Line Out 1 Left
Play 2 -> Line Out 1 Right
Play 3 -> Line Out 2 Left
Play 4 -> Line Out 2 Right
\endverbatim

Find and set the channel mode controls on Play nodes as follows:

\verbatim
Play 1, Channel Mode = "stereo to left"  -> Line Out 1 Left
Play 2, Channel Mode = "stereo to right" -> Line Out 1 Right
Play 3, Channel Mode = "stereo to left" -> Line Out 2 Left
Play 4, Channel Mode = "stereo to right" -> Line Out 3 Right
\endverbatim

The mixer also needs to be adjusted so that Play 1 -> Line Out 1 is set to full volume and Play 2 to
Line Out 1 is also set to full volume.

These instructions remain the same whether the functionality is implemented with Microsoft Multimedia waveXXXX() and mixerXXX() calls, HPI or ASX calls.
 */

/******************************************************************
 * Recorder Control
 */
/** @defgroup Recorder Recorder control functions
 * These functions support file recording.
 * Formats supported for recording in this version:
<table border=1 cellspacing=0 cellpadding=3>
<tr>
<td width=200><p><b>asxFILE_FORMAT</b></p></td>
<td width=200 align=center><p><b>_WAV</b></p></td>
<td width=200 align=center><p><b>_RAW</b></p></td>
</tr>
<tr>
<td><p><b>Filename Extension</b></p></td>
<td align=center><p>.WAV</p></td>
<td align=center><p>any</p></td>
</tr>
<tr>
<td><p><b>_PCM8 or _PCM16</b></p></td>
<td align=center><p>supported</p></td>
<td align=center><p>write only</p></td>
</tr>
<tr>
<td><p><b>_PCM24 or _PCM32</b></p></td>
<td align=center><p>supported</p></td>
<td align=center><p>write only</p></td>
</tr>
<tr>
<td><p><b>_PCM32_FLOAT</b></p></td>
<td align=center><p>supported</p></td>
<td align=center><p>write only</p></td>
</tr>
<tr>
<td><p><b>_MPEG_L2</b></p></td>
<td align=center><p>supported</p></td>
<td align=center><p>supported</p></td>
</tr>
<tr>
<td><p><b>_MPEG_L3</b></p></td>
<td align=center><p>supported</p></td>
<td align=center><p>supported</p></td>
</tr>
<tr>
<td><p><b>_MPEG_AACPLUS</b></p></td>
<td align=center><p>not supported yet</p></td>
<td align=center><p>not supported yet</p></td>
</tr>
<tr>
<td><p><b>_DOLBY_AC2</b></p></td>
<td align=center><p>not supported yet</p></td>
<td align=center><p>not supported yet</p></td>
</tr>
</table>
 * Note: A file recorded using _MPEG_L2 or _MPEG_L3 data format and the _RAW file format will comply with the
 * standard for .MP3 files since the additional header information (i.e. ID3 header) is optional.
 *
 * Recorder State Diagram
 \image latex asx_recorder_states.eps "ASX Player State Diagram." width=12cm
<center>
\htmlonly
<img align=center src="..\asx_recorder_states.gif" alt="ASX Player State Diagram."><br>
\endhtmlonly
</center>
 * @{
 *******************************************************************/
/**
 * Opens the recorder using the specified format.
 * @param hRecorder A handle to an ASX recorder object.
 * @param pszFile The name of the file to be opened.
 * @param nFileType File format. This specifies the header information (if any) to
 * be placed on the audio file. See #asxFILE_FORMAT for the complete range of formats.
 * @param nFileMode Sets the mode for opening an existing file for recording.  See #asxFILE_MODE
 * @param nChannels The number of channels. Currently either 1 or 2 channels are supported.
 * @param nFormat Audio format is used to specified the format of the recorded samples. See #asxAUDIO_FORMAT
 * for a complete list of formats. Note that not all formats are supported on all adapters, so it is important
 * to check for errors after making this call.
 * @param lSampleRate The sample rate should be set to 8000-192000 Hz. Note that some adapters do not
 * support all sample rates, so it is important to check for errors after making this call.
 * @param lBitrate Bitrate = 8000 to 384000 bps (MPEG only)
 * @param nMode	Recording mode applies to MPEG only. See #asxRECORD_MODE.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Recorder_Open(
	ASX_HANDLE hRecorder, const char *pszFile,
	const enum asxFILE_FORMAT nFileType,
	const enum asxFILE_MODE nFileMode,
	const int nChannels,
	const enum asxAUDIO_FORMAT nFormat,
	const long lSampleRate,
	const long lBitrate,
	const enum asxRECORD_MODE nMode
	);
/**
 * Starts the recording.
 * @param hRecorder A handle to an ASX recorder object.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Recorder_Start( ASX_HANDLE hRecorder );
/**
 * Stops the recording.
 * @param hRecorder A handle to an ASX recorder object.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Recorder_Stop( ASX_HANDLE hRecorder);
/**
 * Pauses the recording. Use #ASX_Recorder_Start to continue recording.
 * @param hRecorder A handle to an ASX recorder object.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Recorder_Pause( ASX_HANDLE hRecorder);
/**
 * Closes the recording file.
 * @param hRecorder A handle to an ASX recorder object.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Recorder_Close( ASX_HANDLE hRecorder);
/**
 * Gets the current record position.
 * @param hRecorder A handle to an ASX recorder object.
 * @param nType The units to return the position in (see #asxTIMESCALE).
 * @param plPosition The current record position.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Recorder_GetPosition( ASX_HANDLE hRecorder, const enum asxTIMESCALE nType, unsigned long *plPosition);
/**
 * Get the current record state.
 * @param hRecorder A handle to an ASX recorder object.
 * @param peState The current recorder state. See #asxRECORDER_STATE.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Recorder_GetState( ASX_HANDLE hRecorder, enum asxRECORDER_STATE *peState);
/**
 * Get the current filename, if any.
 * @param hRecorder A handle to an ASX recorder object.
 * @param pszFilename The returned pointer to the filename.
 * @param nStringLength The length in bytes of pszFilename.
 * @param pnRequiredLength The required length in bytes of pszRevision.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 * Returns asxERROR_INDEX_OUT_OF_RANGE if the buffer is too small.
 */
ASX32_API ASX_ERROR ASX_Recorder_GetFilename( ASX_HANDLE hRecorder, char *pszFilename, const int nStringLength, int *pnRequiredLength );
/**
 * Enumerates supported recorder formats.
 * @param hRecorder A handle to an ASX recorder object.
 * @param nIndex The format number.
 * @param peFormat Returned enumerated format (See asxFORMAT).
 * @param pnCount Returned total numebr of formats.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Recorder_EnumerateFormat( ASX_HANDLE hRecorder, const int nIndex, enum asxAUDIO_FORMAT *peFormat, int *pnCount);
/** @} */ // end of Recorder group

/** \example record/main.c
 * This is an example of how to use the ASX Recorder control.
 */
/** \example dual_mono_record/main.c
This is an example of how to use the ASX Recorder to record dual mono inputs.
All record streams on AudioScience audio adapters record, at a minimum, either
mono or stereo files on the same device. Mono recording always records the left
channel to an audio file. So to record the right channel of a line in, the
channels must be swapped somewhere in the record path. This can be done using
the Channel Mode control that is present on the record node of most AudioScience
adapters.

<b>Configuration Steps</b>

The following steps should be performed to setup recording of 4
independent mono streams. We are going to record in the following configuration:

\verbatim
Record 1 <- Line In 1 Left
Record 2 <- Line In 1 Right
Record 3 <- Line In 2 Left
Record 4 <- Line In 2 Right
\endverbatim

1.	Find multiplexer controls on Record nodes and set sources as follows:

\verbatim
Record 1 <- Line In 1
Record 2 <- Line In 1
Record 3 <- Line In 2
Record 4 <- Line In 2
\endverbatim

2.	Find channel mode controls and set up as follows:

\verbatim
Record 1, Channel Mode = "normal"
Record 2, Channel Mode = "swap"
Record 3, Channel Mode = "normal"
Record 4, Channel Mode = "swap"
\endverbatim

3.	Open record devices

4.	Set record streams to record 4 mono files

5.	Start recording.

These instructions remain the same whether the functionality is implemented with Microsoft Multimedia waveXXXX() and mixerXXX() calls, HPI or ASX calls. The next section details ASX recording instructions.
 */
#endif
/*******************************************************************
 * Meter Control
 */
/** @defgroup Meter Meter control functions
 * These functions support reading peak meter information.
 * @{
 *******************************************************************/
/**
 * Returns the number of channels this peak meter has.
 * @param hMeter A handle to an ASX meter object.
 * @param pnChannels The returned number of channels.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Meter_GetChannels( ASX_HANDLE hMeter, int *pnChannels);

/**
 * Returns the peak meter reading for the given meter control.
 * Some adapters (ASI6000,ASI5000) implement meter controls with ballistics. This means that instead of following the
 * signal instantaneously, meters values have finite attack and decay time constants Ta and Td. For instance when the
 * input is removed, the meter value will decay towards zero (whether or not the meter control is read).  It will
 * decay to 37% of its original value in Td seconds. (14% @ 2xTd, 5% @ 3xTd etc)
 *
 * If meter ballistics are not implemented, when the ASX_Meter_GetPeak function is called the meter statistic for
 * that control will be reset to zero.  This means that the period over which the statistic is computed depends
 * on the time between calls to ASX_Meter_GetPeak(). If the call is made 100 times a second, then the value returned
 * would reperesent the peak during a 10ms interval of audio.
 *
 * The lower limit of meter return value, depends on the adapter series.  For all ASI4000 adapters, the minimum
 * value returned is -100dB.  For ASI6000,ASI5000 adapters, the minimum value returned is -192dB.
 * @param hMeter A handle to an ASX meter object.
 * @param fdB A pointer to receive the peak meter reading in dB. The range of this reading it 0.0 to -120.0 dB.
 * @param nChannels The number of channels. This should match the number of elements in the fGetDb array.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Meter_GetPeak( ASX_HANDLE hMeter, float *fdB, const int nChannels);
/**
 * Returns the RMS meter reading for the given meter control.
 * The peak is stereo and the units are in decibels relative to full-scale digital (dbFs).  The RMS measurement
 * depends on the waveform shape. For example, playing a fullscale sinewave (with an amplitude of +/-32767 for a 16bit PCM format)
 * will return a RMS reading  of -3dB (compared with a Peak meter reading of 0dBFs), while playing a square wave will return a
 * RMS reading  of  0dB and playing an impulsive signal like solo drums will return an RMS value much lower than the peak value.
 *
 * If this meter has ballistics, then Ta=Td=150ms, which simulates the ballistics of a VU meter.
 * @param hMeter A handle to an ASX meter object.
 * @param fdB A pointer to receive the RMS meter reading in dB. The range of this reading it 0.0 to -120.0 dB.
 * @param nChannels The number of channels. This should match the number of elements in the fGetDb array.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Meter_GetRMS(  ASX_HANDLE hMeter, float *fdB, const int nChannels);
/**
 * Set the meter ballistics.
 * The attack and decay values represent the time constants of the equivalent single pole low pass filter
 * used to create the ballistics.  With a time constant of T, if the meter is stable at full scale and the input
 * is suddenly removed, the meter will decay.  Similarly, if the meter is at zero and a full scale input is applied
 * will move to the new reading at a rate specified by the attack time constant.
 *
 * Driver versions up to and including version 4.04.xx implement a single global ballistics
 * setting for all meters, i.e. if you change the ballistics on one meter, the ballistics
 * on all meters are updated. Driver versions in the 4.05.xx series and later implement
 * independent ballistics for each meter.
 *
 * The following table shows the percentage of the final meter value over time, when a constant input is suddenly
 * removed (decay) or applied (attack):
 *
\latexonly
\begin{table}[h]
\begin{center}
\begin{tabular}{rrr}
\hline
{\em Time} & {\em Meter decay}	& {\em Meter attack} \\
\hline
0  & 100\% & 0\%  \\
T  & 37\%  & 63\% \\
2T & 14\%  & 86\% \\
3T & 5\%   & 95\% \\
4T & 2\%   & 98\% \\
5T & 0.7\% & 99\% \\
\hline
\end{tabular}
\end{center}
\caption{Attack and decay compared to time.}
\end{table}

The table was calculated using the following formulas:
\[
decay = intial * e^{\frac{-t}{T}}
\]
and
\[
attack = finale * (1 - e^{\frac{-t}{T}})
\]
\endlatexonly
\htmlonly
<table border=1 align=center cellspacing=0 cellpadding=0 width=288 style='width:3.0in;
 border-collapse:collapse;border:none;mso-border-top-alt:
 solid windowtext .5pt;mso-border-bottom-alt:solid windowtext .5pt;mso-padding-alt:
 0in 5.4pt 0in 5.4pt'>
 <tr>
  <td>
  <p><i>Time</i></p>
  </td>
  <td>
  <p><i>Meter decay</i></p>
  </td>
  <td>
  <p><i>Meter attack</i></p>
  </td>
 </tr>
 <tr>
  <td>0</td><td>100%</td><td>0%</td>
 </tr>
 <tr>
  <td>T</td><td>37%</td><td>63%</td>
 </tr>
 <tr>
  <td>2T</td><td>14%</td><td>86%</td>
 </tr>
 <tr>
  <td>3T</td><td>5%</td><td>95%</td>
 </tr>
 <tr>
  <td>4T</td><td>2%</td><td>98%</td>
 </tr>
 <tr>
  <td>5T</td><td>0.7%</td><td>99%</td>
 </tr>
</table>

<p align=center>Table 2.1: Attack and decay compared to time.</p>
<p>The table was calculated using the following formulas:</p>
<p align=center><i>decay = intial * e <sup>-t/T</sup></i></p>
<p>and:</p>
<p align=center><i>attack = initial * </i>(<i> 1 - e <sup>-t/T</sup> </i>)</p>
\endhtmlonly
  *
 * @param hMeter A handle to an ASX meter object.
 * @param nMeterType The meter type to set the balistics of. See #asxMETER_TYPE.
 * @param fAttackTimeMs The attack time in milliseconds.
 * @param fDecayTimeMs The decay time in milliseconds.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Meter_SetBallistics( ASX_HANDLE hMeter, const enum asxMETER_TYPE nMeterType, const float fAttackTimeMs, const float fDecayTimeMs);

/** Get meter ballistics
* @param hMeter A handle to an ASX meter object.
 * @param nMeterType Which meter part to get ballistics settings from. See #asxMETER_TYPE.
 * @param fAttackTimeMs The attack time in milliseconds.
 * @param fDecayTimeMs The decay time in milliseconds.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
 ASX32_API ASX_ERROR ASX_Meter_GetBallistics( ASX_HANDLE hMeter, const enum asxMETER_TYPE nMeterType, float *fAttackTimeMs, float *fDecayTimeMs);
/** @} */ // end of Meter group

/** \example volume/main.c
 * This is an example of how to use the ASX Volume functions.
 */

/********************************************************************
 * Volume Control
 */
/** @defgroup Volume Volume control functions
 * These functions support volume control manipulation.
 * @{
 *******************************************************************/
/**
 * Returns the number of channels this volume control has.
 * @param hVolume A handle to an ASX volume object.
 * @param pnChannels The returned number of channels.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Volume_GetChannels( ASX_HANDLE hVolume, int *pnChannels);
/**
 * Sets mute for this volume control. All channels must contain the same setting.
 * @param hVolume A handle to an ASX volume object.
 * @param mute The mute setting. 1 is mute, 0 is unmuted.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Volume_SetMute( ASX_HANDLE hVolume, int *mute, const int nChannels);
/**
 * Returns the mute setting for this volume control. All returned settings will contain the same value.
 * @param hVolume A handle to an ASX volume object.
 * @param mute The returned mute setting.  1 is mute, 0 is unmuted.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Volume_GetMute( ASX_HANDLE hVolume, int *mute, const int nChannels);
/**
 * Set volume.
 * @param hVolume A handle to an ASX volume control.
 * @param fSetdB The gain to set in dBFS, i.e. 0dB is fullscale.
 * @param nChannels The number of channels. This should match the number of elements in the fSetGain array.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Volume_SetGain( ASX_HANDLE hVolume, float *fSetdB, const int nChannels);
/**
 * Get volume.
 * @param hVolume A handle to an ASX volume control.
 * @param fdB The returned gain in dBFS, i.e. 0dB is fullscale.
 * @param nChannels The number of channels. This should match the number of elements in the fGetGain array.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Volume_GetGain( ASX_HANDLE hVolume, float *fdB, const int nChannels);
/**
 * Get that range of volume settings available.
 * @param hVolume A handle to an ASX volume control.
 * @param fMinGain The returned minimum gain in dBFS, i.e. 0dB is fullscale.
 * @param fMaxGain The returned maximum gain in dBFS, i.e. 0dB is fullscale.
 * @param fGainStep The returned gain stepsize in dB.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Volume_GetRange( ASX_HANDLE hVolume,
							 float *fMinGain,
							 float *fMaxGain,
							 float *fGainStep);
/**
 * Set an autofade operation. This function commands the adapter to automatically
 * fade the volume to the specified volume setting. The autofade operation begins
 * when the command is issued.
 * @param hVolume A handle to an ASX volume control.
 * @param fSetdB The target gain in dBFS, i.e. 0dB is fullscale.
 * @param nChannels The number of channels. This should match the number of elements in the fGetGain array.
 * @param nDuration The duration in milliseconds.
 * @param eProfile The fading profile. See #asxVOLUME_AUTOFADE. All ASI adapters support
 * #asxVOLUME_AUTOFADE_LINEAR.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Volume_SetAutofade( ASX_HANDLE hVolume, const float *fSetdB, const int nChannels, const ASX_TIME nDuration, const enum asxVOLUME_AUTOFADE eProfile);
/** @} */ // end of Volume group

/*******************************************************************
 * Level Control
 */
/** @defgroup Level Level control functions
 * These functions support level/trim control manipulation in line ins and line outs.
 * @{
 *******************************************************************/
/**
 * Set the analog input or output level (sometimes called trim).
 * @param hLevel A handle to an ASX level control.
 * @param fGain The level to set. The level has the units of dBu. The typical range of settings for most
 * AudioScience adapters is -10 to +26 dBu.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Level_Set( ASX_HANDLE hLevel, const float fGain);
/**
 * Get the analog input or output level (sometimes called trim).
 * @param hLevel A handle to an ASX level control.
 * @param fGain The returned level reading. The level has the units of dBu.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Level_Get( ASX_HANDLE hLevel, float *fGain);
/**
 * Get that range of level settings available.
 * @param hLevel A handle to an ASX level control.
 * @param fMinGain The returned minimum gain in dBFS, i.e. 0dB is fullscale.
 * @param fMaxGain The returned maximum gain in dBFS, i.e. 0dB is fullscale.
 * @param fGainStep The returned gain stepsize in dB.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Level_GetRange( ASX_HANDLE hLevel,
							 float *fMinGain,
							 float *fMaxGain,
							 float *fGainStep);

/** @} */ // end of Level group

/*******************************************************************
 * Multiplexer Control
 */
/** @defgroup MULTIPLEXER_Mux Multiplexer control functions
 * These functions support multiplexer type operations.
 * @{
 *******************************************************************/
/**
 * Enumerate each multiplexer option. Returns each multiplexer option
 * in terms of a node type and an index. For example, if value selections are
 * Line Ins 1-4, this function will return #asxNODE_LINE_IN with the nNodeIndex value
 * set to 0-3. To find all available settings, this function should be called repeatedly
 * with incrememnting values on nIndex until an error is returned.
 * @param hMux A handle to an ASX multiplexer control.
 * @param nIndex The index of the multiplexer option to fetch.
 * @param peNode The returned multiplexer node. See #asxNODE for available nodes.
 * @param pnNodeIndex The returned node index.
 * @param pnCount The total number of available multiplexer settings.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Multiplexer_Enumerate( ASX_HANDLE hMux, const int nIndex, enum asxNODE *peNode, int *pnNodeIndex, int *pnCount);
/**
 * Get the current multiplexer setting.
 * @param hMux A handle to an ASX multiplexer control.
 * @param peNode The returned node. See #asxNODE for available nodes.
 * @param pnNodeIndex The returned node index.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Multiplexer_Get( ASX_HANDLE hMux, enum asxNODE *peNode, int *pnNodeIndex);
/**
 * Set the multiplexer.
 * @param hMux A handle to an ASX multiplexer control.
 * @param eNode The node to set the multiplexer to. See #asxNODE for available nodes.
 * @param nNodeIndex The node index to set.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Multiplexer_Set( ASX_HANDLE hMux, const enum asxNODE eNode, const int nNodeIndex);
/** @} */ // end of Multiplexer group
/** \example mux/main.c
 * This is an example of how to use the ASX multiplexer control.
 */
/******************************************************************
 * Channel Mode Control
 */
/** @defgroup CHANNEL_MODE_Mode Channel Mode control functions
 * These functions support channel mode operations that can be used to swap
 * left and right audio channels, or convert stereo sources to mono outputs etc.
 * @{
 *******************************************************************/
/**
 * Enumerate each channel mode option.
 * @param hMode A handle to an ASX channel mode control.
 * @param nIndex The index of the channel mode option to fetch.
 * @param peMode The returned channel mode option. See #asxCHANNELMODE for available settings.
 * @param pnCount The total number of available mode options.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_ChannelMode_Enumerate( ASX_HANDLE hMode, const int nIndex, enum asxCHANNELMODE *peMode, int *pnCount);
/**
 * Get the current channel mode.
 * @param hMode A handle to an ASX channel mode control.
 * @param peMode The returned channel mode. See #asxCHANNELMODE for different mode options.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_ChannelMode_Get( ASX_HANDLE hMode, enum asxCHANNELMODE *peMode);
/**
 * Set the current channel mode.
 * @param hMode A handle to an ASX channel mode control.
 * @param eMode The channel mode to set. This must be one of the options returned by calls to #ASX_ChannelMode_Enumerate().
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_ChannelMode_Set( ASX_HANDLE hMode, const enum asxCHANNELMODE eMode);
/** @} */ // end of ChannelMode group

/******************************************************************
 * Tuner Control
 */
/** @defgroup Tuner Tuner control functions
 * These functions support tuner operations.
 * @{
 *******************************************************************/
/**
 * Enumerate each tuner band option.
 * @param hTuner A handle to an ASX tuner control.
 * @param nIndex The index of the tuner band option to fetch.
 * @param peBand The returned tuner band option.
 * @param pnCount The total number of available tuner bands.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_EnumerateBand( ASX_HANDLE hTuner, const int nIndex, enum asxTUNERBAND *peBand, int *pnCount);
/**
 * Get the tuner band.
 * @param hTuner A handle to an ASX tuner control.
 * @param peBand The returned tuner band. This must be one of the options returned by calls to #ASX_Tuner_EnumerateBand().
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetBand( ASX_HANDLE hTuner, enum asxTUNERBAND *peBand);
/**
 * Set the tuner band.
 * @param hTuner A handle to an ASX tuner control.
 * @param eBand The tuner band to set. This must be one of the options returned by calls to #ASX_Tuner_EnumerateBand().
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_SetBand( ASX_HANDLE hTuner, const enum asxTUNERBAND eBand);
/**
 * Set the tuner frequency. This function sets the tuner frequency subject to the
 * allowable range of frequencies for the current tuner band setting.
 * @param hTuner A handle to an ASX tuner control.
 * @param nFreq The frequency to set in kHz.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 * \note The tuner band may not change immediately.  It may take up to 300ms to change.
 * To determine when the band has changed, call ASX_Tuner_GetBand() until it returns the new band.
 */
ASX32_API ASX_ERROR ASX_Tuner_SetFrequency( ASX_HANDLE hTuner, const unsigned long nFreq);
/**
 * Get the tuner frequency.
 * @param hTuner A handle to an ASX tuner control.
 * @param plFreq The returned frequency.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 * \note The tuner frequency may not change immediately.  It may take up to 300ms to change.
 * To determine when the frequency has changed, call ASX_Tuner_GetFrequency() until it returns the new frequency.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetFrequency( ASX_HANDLE hTuner, unsigned long *plFreq);

/**
 * Get the tuner frequency range in Hz.
 * @param hTuner A handle to an ASX tuner control.
 * @param eBand Band to get frequency range of.
 * @param plMin The returned minimum frequency in Hz.
 * @param plMax The returned maximum frequency in Hz.
 * @param plStep The returned frequency step in Hz.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetFrequencyRange(ASX_HANDLE hTuner,
			const enum asxTUNERBAND eBand,
			unsigned long *plMin, unsigned long *plMax,
			unsigned long *plStep);

/**
 * Get the tuner gain range (in dB). Some tuners controls support a gain adjustment and
 * this control will retunn the range of gain settings supported.
 * @param hTuner A handle to an ASX tuner control.
 * @param fMin The returned minimum gain in dB.
 * @param fMax The returned maximum gain in dB.
 * @param fStep The returned gain step in dB.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetGainRange(ASX_HANDLE hTuner, float *fMin, float *fMax, float *fStep);
/**
 * Set the tuner gain.
 * @param hTuner A handle to an ASX tuner control.
 * @param fTunerGain The gain to set in dB.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_SetGain(ASX_HANDLE hTuner, const float fTunerGain);
/**
 * Get the tuner gain.
 * @param hTuner A handle to an ASX tuner control.
 * @param pfTunerGain The returned gain in dB.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetGain(ASX_HANDLE hTuner, float *pfTunerGain);
/**
 * Get the tuner RF level.
 * @param hTuner A handle to an ASX tuner control.
 * @param nRFLevel The returned RF level in dBuV.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetRFLevel(ASX_HANDLE hTuner, float *nRFLevel);
/**
 * Get the Raw tuner RF level.
 * @param hTuner A handle to an ASX tuner control.
 * @param nRawRFLevel The returned Raw RF level in whatever units the tuner supports.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetRawRFLevel(ASX_HANDLE hTuner, int *nRawRFLevel);
/**
 * Get the tuner status. This function gets the tuner status and indicates which bits are
 * valid for the current status reading.
 * @param hTuner A handle to an ASX tuner control.
 * @param puErrorStatusMask The returned status mask. This mask indicates which status bits
 * are valid in puErrorStatus. Bits are defined by #asxTUNER_STATUS.
 * @param puErrorStatus The returned status bits.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetStatus(
			ASX_HANDLE hTuner,
			unsigned int *puErrorStatusMask,
			unsigned int *puErrorStatus);
/**
 * Gets the tuner mode. Currently this can only be used for turning the RSS level reading
 * on and off on an MT4039 tuner.
 * @param hTuner A handle to an ASX tuner control.
 * @param eMode The only valid parameter for this call is #asxTUNERMODE_RSS.
 * @param peSetting Returns the mode setting. Only current valid values are #asxTUNERMODE_RSS_ENABLE or #asxTUNERMODE_RSS_DISABLE.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetMode(ASX_HANDLE hTuner,
			const enum asxTUNERMODE eMode,
			enum asxTUNERMODE *peSetting);

/**
 * Sets the tuner mode. Currently this can only be used for turning the RSS level reading
 * on and off on an MT4039 tuner.
 * @param hTuner A handle to an ASX tuner control.
 * @param eMode The only valid parameter for this call is #asxTUNERMODE_RSS.
 * @param eSetting The mode setting. Only current valid values are #asxTUNERMODE_RSS_ENABLE or #asxTUNERMODE_RSS_DISABLE.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_SetMode(ASX_HANDLE hTuner,
			const enum asxTUNERMODE eMode,
			const enum asxTUNERMODE eSetting);

/**
 * Enumerates tuner de-emphasis options.
 * @param hTuner A handle to an ASX tuner control.
 * @param nIndex The number of the de-emphasis setting to retrieve.
 * @param peDeemphasis The de-emphasis option.
 * @param pnCount The total number of de-emphasis options.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_EnumerateDeemphasis(ASX_HANDLE hTuner,
			const int nIndex,
			enum asxTUNERDEEMPHASIS *peDeemphasis,
			int *pnCount);

/**
 * Set tuner de-emphasis.
 * @param hTuner A handle to an ASX tuner control.
 * @param eDeemphasis The de-emphasis value to set.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_SetDeemphasis(ASX_HANDLE hTuner,
			const enum asxTUNERDEEMPHASIS eDeemphasis
			);

/**
 * Get tuner de-emphasis.
 * @param hTuner A handle to an ASX tuner control.
 * @param peDeemphasis The returned de-emphasis value.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetDeemphasis(ASX_HANDLE hTuner,
			enum asxTUNERDEEMPHASIS *peDeemphasis
			);

/**
 * Enumerates tuner program options. The API only supports HDRadio in the USA.
 * @param hTuner A handle to an ASX tuner control.
 * @param nIndex The number of the program setting to retrieve.
 * @param peProgram The program option.
 * @param pnCount The total number of program options.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_EnumerateProgram(ASX_HANDLE hTuner,
			const int nIndex,
			enum asxTUNERPROGRAM *peProgram,
			int *pnCount);

/**
 * Set tuner program. To The API only supports HDRadio in the USA.
 * @param hTuner A handle to an ASX tuner control.
 * @param eProgram The program to set.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_SetProgram(ASX_HANDLE hTuner,
			const enum asxTUNERPROGRAM eProgram
			);

/**
 * Get tuner program. The API only supports HDRadio in the USA.
 * @param hTuner A handle to an ASX tuner control.
 * @param peProgram The returned program setting.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetProgram(ASX_HANDLE hTuner,
			enum asxTUNERPROGRAM *peProgram
			);

/**
 * @deprecated This function has been superseded by ASX_Tuner_GetDigitalSignalQuality()
 */
ASX32_API ASX_ERROR ASX_Tuner_GetHdRadioSignalQuality(
	ASX_HANDLE hTuner,
	int *pnSignalQuality
);

/**
 * Get digital signal quality. The API supports HDRadio in the USA and DAB elsewhere.
 * @param hTuner A handle to an ASX tuner control.
 * @param pnSignalQuality the returned signal quality between 0(poor)..6(excellent).
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetDigitalSignalQuality(
	ASX_HANDLE hTuner,
	int *pnSignalQuality
);

/*
 * Get a Tuner property of type integer
 * @param hTuner A handle to an ASX tuner control.
 * @param nTunerProperty - tuner property.  One of #asxTUNER_PROPERTY_INT
 * @param nPropertyValue - the returned property
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
/*
ASX32_API ASX_ERROR ASX_Tuner_GetProperty_Int(ASX_HANDLE hTuner,
		        const enum asxTUNER_PROPERTY_INT eTunerProperty,
			int *pnPropertyValue
			);
*/

/**
 * @deprecated This function has been superseded by ASX_Tuner_GetFirmwareVersion()
 */
ASX32_API ASX_ERROR ASX_Tuner_GetHdRadioSdkVersion(ASX_HANDLE hTuner,
			char *szSdkVersion,
			const int nStringLength
			);
/**
 * @deprecated This function has been superseded by ASX_Tuner_GetFirmwareVersion()
 */
ASX32_API ASX_ERROR ASX_Tuner_GetHdRadioDspVersion(ASX_HANDLE hTuner,
			char *szSdkVersion,
			const int nStringLength
			);
/**
 * Get a Firmware version string
 * @param hTuner A handle to an ASX tuner control.
 * @param szFirmwareVersion the returned FW Version string
 * @param nStringLength length of string being passed in
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetFirmwareVersion(ASX_HANDLE hTuner,
			char *szFirmwareVersion,
			const int nStringLength
			);
/**
 * Enumerates tuner blend options. The API only supports HDRadio in the USA.
 * @param hTuner A handle to an ASX tuner control.
 * @param nIndex The number of the blend settings to retrieve.
 * @param peBlend The program option.
 * @param pnCount The total number of program options.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_EnumerateHdBlend(ASX_HANDLE hTuner,
			const int nIndex,
			enum asxTUNERHDBLEND *peBlend,
			int *pnCount);

/**
 * Set a HD Radio tuner to analog only or auto switch.
 * @param hTuner A handle to an ASX tuner control.
 * @param nMode 0 is automatic switch to digital, 1 is analog only.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_SetHdBlend(ASX_HANDLE hTuner,
			const enum asxTUNERHDBLEND  nMode
			);

/**
 * Get a HD Radio tuner analog or digital blend.
 * @param hTuner A handle to an ASX tuner control.
 * @param pnMode 0 is automatic switch to digital, 1 is analog only.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetHdBlend(ASX_HANDLE hTuner,
			enum asxTUNERHDBLEND *pnMode
			);


/**
 * Get a DAB Multiplex Name
 * @param hTuner A handle to an ASX tuner control.
 * @param szMultiplexName String containing audio service name
 * @param nSize Max size of string
  * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetDabMultiplexName(ASX_HANDLE hTuner,
		char *szMultiplexName,
		const int nSize
		);

/**
 * Get a DAB Multiplex ID
 * @param hTuner A handle to an ASX tuner control.
 * @param dwMultiplexId unsigned long to return Multiplex Id
  * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetDabMultiplexId(ASX_HANDLE hTuner,
		unsigned long *dwMultiplexId
		);

/**
 * Get Number of Dab Audio Services
 * @param hTuner A handle to an ASX tuner control.
 * @param pnIndex Current index selected
 * @param pncount Number of available services
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetDabAudioServiceCount(ASX_HANDLE hTuner,
			int *pnIndex,
			int *pnCount
			);

/**
 * Get a DAB Audio Service
 * @param hTuner A handle to an ASX tuner control.
 * @param szAudioServiceName String containing audio service name
 * @param nSize Max size of string
 * @param nIndex Index of service to get
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetDabAudioServiceName(ASX_HANDLE hTuner,
		char *szAudioServiceName,
		const int nSize,
		const int nIndex
		);

/**
 * Set a DAB Audio Service
 * @param hTuner A handle to an ASX tuner control.
 * @param nIndex Index of service to tune to
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_SetDabAudioService(ASX_HANDLE hTuner,
		const int nIndex
		);

/**
 * Get a DAB Service ID
 * @param hTuner A handle to an ASX tuner control.
 * @param dwServiceId unsigned long to return the DAB audio service Id
  * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetDabServiceId(ASX_HANDLE hTuner,
		unsigned long *dwServiceId
		);

/**
 * Get a DAB audio information
 * @param hTuner A handle to an ASX tuner control.
 * @param szAudioInfo a string to return info about the audio service, such as bitrate, mode
 * @param nSize Max size of string
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Tuner_GetDabAudioInfo(ASX_HANDLE hTuner,
		char *szAudioInfo,
		const int nSize
		);

/** @} */ // end of Tuner group
/** \example tuner/main.c
 * This is an example of how to use the ASX tuner control functions.
 */


/******************************************************************
 * PAD Control
 */
/** @defgroup Pad PAD control functions
 * These functions support Program Auxilary Data for HD Radio and
 * RDS for FM analog.
 * @{
 *******************************************************************/
/**
 * Get a Program Auxilary Data channel name. This control will only ever
 * exist on a tuner node.
 * @param hPAD A handle to an ASX PAD control.
 * @param pszChannelName The string buffer of size nFieldLength allocated by the caller.
 * @param nStringLength The length of the pszChannelName buffer. Should be ASX_SHORT_STRING.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_PAD_GetChannelName(ASX_HANDLE hPAD,
			char *pszChannelName,
			const int nStringLength
			);

/**
 * Get a Program Auxilary Data artist. This control will only ever
 * exist on a tuner node.
 * @param hPAD A handle to an ASX PAD control.
 * @param pszArtist The string buffer of size nFieldLength allocated by the caller.
 * @param nStringLength The length of the pszArtist buffer. Should be ASX_LONG_STRING.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_PAD_GetArtist(ASX_HANDLE hPAD,
			char *pszArtist,
			const int nStringLength
			);

/**
 * Get a Program Auxilary Data title. This control will only ever
 * exist on a tuner node.
 * @param hPAD A handle to an ASX PAD control.
 * @param pszTitle The string buffer of size nFieldLength allocated by the caller.
 * @param nStringLength The length of the pszTitle buffer. Should be ASX_LONG_STRING.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_PAD_GetTitle(ASX_HANDLE hPAD,
			char *pszTitle,
			const int nStringLength
			);

/**
 * Get a Program Auxilary Data comment. This control will only ever
 * exist on a tuner node.
 * @param hPAD A handle to an ASX PAD control.
 * @param pszComment The string buffer of size nFieldLength allocated by the caller.
 * @param nStringLength The length of the pszComment buffer. Should be ASX_LONGLONG_STRING.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_PAD_GetComment(ASX_HANDLE hPAD,
			char *pszComment,
			const int nStringLength
			);

/**
 * Get a Program Auxilary Data program type (PTY). This control will only ever
 * exist on a tuner node.
 * @param hPAD A handle to an ASX PAD control.
 * @param pnProgramType Returns the program type (PTY).
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_PAD_GetProgramType(ASX_HANDLE hPAD,
			int *pnProgramType
			);
/**
 * Get a Program Auxilary Data PTY string. This control will only ever
 * exist on a tuner node.
 * @param hPAD A handle to an ASX PAD control.
 * @param eType The RDS/RBDS type selection.
 * @param nPTY The program type code to translate.
 * @param pszString The string buffer of size nStringLength allocated by the caller.
 * @param nStringLength The length of the pszComment buffer. Should be ASX_LONGLONG_STRING.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_PAD_GetProgramTypeString(ASX_HANDLE hPAD,
			const enum asxTUNER_RDS_TYPE eType,
			const int nPTY,
			char *pszString,
			const int nStringLength
			);

/**
 * Get a Program Identification number. This control will only ever
 * exist on a tuner node. A valid PI will only be returned for a tuner
 * set to analog FM.
 * @param hPAD A handle to an ASX PAD control.
 * @param uPI The returned program identification number.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_PAD_GetRdsPI(ASX_HANDLE hPAD,
			int *uPI
			);


/** @} */ // end of pads group


/******************************************************************
 * Sample Clock Control
 */
/** @defgroup SAMPLE_CLOCK_SampleClock Sample clock control functions
 * These functions implement sample clock operations that manipulate the adapter's
 * sample clock generation.
 * @{
 *******************************************************************/
/** @deprecated This function has been superseded by ASX_SampleClock_EnumerateLocalRate()
 */
ASX32_API ASX_ERROR ASX_SampleClock_EnumerateSampleRate( ASX_HANDLE hSampleClock, const int nIndex, enum asxSAMPLE_RATE *peSampleRate, int *pnCount);

/**
 * Enumerate each sample clock rates for the local sample clock generator.
 * @param hSampleClock A handle to an ASX sample clock control.
 * @param nIndex The index of the sample clock rate option to fetch.
 * @param peSampleRate The returned sample rate option.
 * @param pnCount The total number of available sample rates.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SampleClock_EnumerateLocalRate( ASX_HANDLE hSampleClock, const int nIndex, enum asxSAMPLE_RATE *peSampleRate, int *pnCount);

/** @deprecated This function has been superseded by ASX_SampleClock_SetLocalRate()
 */
ASX32_API ASX_ERROR ASX_SampleClock_SetSampleRate( ASX_HANDLE hSampleClock, const int nSampleRate);

/**
 * Set the sample rate for the local sample clock generator.
 * @param hSampleClock A handle to an ASX sample clock control.
 * @param nSampleRate The sample rate to set.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SampleClock_SetLocalRate( ASX_HANDLE hSampleClock, const int nSampleRate);

/**
 * Get the adapter's sample rate.
 * @param hSampleClock A handle to an ASX sample clock control.
 * @param pnSampleRate The returned sample rate.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SampleClock_GetSampleRate( ASX_HANDLE hSampleClock, int *pnSampleRate);
/**
 * Get the sample rate for the local sample clock generator.
 * @param hSampleClock A handle to an ASX sample clock control.
 * @param pnSampleRate The returned sample rate.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SampleClock_GetLocalRate( ASX_HANDLE hSampleClock, int *pnSampleRate);
/**
 * Enumerate each sample clock source option.
 * @param hSampleClock A handle to an ASX sample clock control.
 * @param nIndex The index of the sample clock source option to fetch.
 * @param peClockSource The returned sample clock source option.
 * @param pnCount The total number of available sample clock sources.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SampleClock_EnumerateClockSource( ASX_HANDLE hSampleClock, const int nIndex, enum asxSAMPLE_CLOCK_SOURCE *peClockSource, int *pnCount);
/**
 * Set the sample clock source.
 * @param hSampleClock A handle to an ASX sample clock control.
 * @param eClockSource The sample clock source option to set.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SampleClock_SetClockSource( ASX_HANDLE hSampleClock, const enum asxSAMPLE_CLOCK_SOURCE eClockSource);
/**
 * Get the sample clock source.
 * @param hSampleClock A handle to an ASX sample clock control.
 * @param peClockSource The returned sample clock source.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SampleClock_GetClockSource( ASX_HANDLE hSampleClock, enum asxSAMPLE_CLOCK_SOURCE *peClockSource);
/**
 * Set the sample clock to automatically source its clock from a valid input.
 * @param hSampleClock A handle to an ASX sample clock control.
 * @param nEnable When set to 1 the auto source is enabled, when 0 it is disabled.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SampleClock_SetAutoSource( ASX_HANDLE hSampleClock, const int nEnable);
/**
 * Get the setting of the auto source property of the sample clock.
 * @param hSampleClock A handle to an ASX sample clock control.
 * @param *pnEnable Returns 1 if enabled or 0 if not.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SampleClock_GetAutoSource( ASX_HANDLE hSampleClock, int *pnEnable);
/**
 * Lock the local sample clock to its current setting. For CobraNet adapters that run
 * from a network clock, this function will lock the sample rate of the adapter's players
 * and recorders to the network clock. On an ASI6416 this will result 48 kHz being the
 * only  sample rate supported.
 * @param hSampleClock A handle to an ASX sample clock control.
 * @param nLock When set to 1 the local rate is locked, when 0 it is unlocked.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SampleClock_SetLocalRateLock( ASX_HANDLE hSampleClock, const int nLock);
/**
 * Get the setting of the local sample clock lock.
 * @param hSampleClock A handle to an ASX sample clock control.
 * @param *pnLock Returns 1 if enabled or 0 if not.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SampleClock_GetLocalRateLock( ASX_HANDLE hSampleClock, int *pnLock);
/** @} */ // end of SampleClock group

/******************************************************************
 * AESEBU Receiver Control
 **/
/** @defgroup AESEBU_RECEIVER_Aes3Rx AESEBU receiver control functions
 * These functions implement AESEBU receiver operations.
 * @{
 *******************************************************************/
/**
 * Get the status of the AESEBU receiver.
 * @param hAESEBURx A handle to an ASX AESEBU receiver control.
 * @param pdwErrorStatusMask A bit mask field indicating which of the bitfields defined by #asxAESEBU_STATUS
 * are returned.
 * @param pdwErrorStatus The returned status fields.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_AESEBUReceiver_GetErrorStatus(ASX_HANDLE hAESEBURx,
													  unsigned int *pdwErrorStatusMask, unsigned int *pdwErrorStatus );
/**
 * Get the sample rate of the AESEBU receiver.
 * @param hAESEBURx A handle to an ASX AESEBU receiver control.
 * @param pdwSampleRate The returned sample rate.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_AESEBUReceiver_GetSampleRate(ASX_HANDLE hAESEBURx,
													 unsigned int *pdwSampleRate );
/**
 * Enumerate each AES3 receive format supported by the hardware.
 * @param hAESEBURx A handle to an ASX AESEBU receiver control.
 * @param nIndex The index of the format option to fetch.
 * @param peAesebuFormat The returned format option.
 * @param pnCount The total number of available formats.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_AESEBUReceiver_EnumerateFormat( ASX_HANDLE hAESEBURx, const int nIndex, enum asxAESEBU_FORMAT *peAesebuFormat, int *pnCount);

/**
 * Set the format of the AESEBU receiver.
 * @param hAESEBURx A handle to an ASX AESEBU receiver control.
 * @param eAesebuFormat The mode to set the receiver control to.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_AESEBUReceiver_SetFormat(ASX_HANDLE hAESEBURx,
												 const enum asxAESEBU_FORMAT eAesebuFormat );
/**
 * Get the format of the AESEBU receiver.
 * @param hAESEBURx A handle to an ASX AESEBU receiver control.
 * @param peAesebuFormat The returned format.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_AESEBUReceiver_GetFormat(ASX_HANDLE hAESEBURx,
												 enum asxAESEBU_FORMAT *peAesebuFormat );
/** @} */ // end of AESEBU_Rx group

/******************************************************************
 * AESEBU Transmitter Control
 **/
/** @defgroup AESEBU_TRANSMITTER_Aes3Tx AESEBU transmitter control functions
 * These functions implement AESEBU transmitter operations.
 * @{
 *******************************************************************/
/**
 * Enumerate each AES3 transmit format supported by the hardware.
 * @param hAESEBUTx A handle to an ASX AESEBU transmitter control.
 * @param nIndex The index of the format option to fetch.
 * @param peAesebuFormat The returned format option.
 * @param pnCount The total number of available formats.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_AESEBUTransmitter_EnumerateFormat( ASX_HANDLE hAESEBUTx, const int nIndex, enum asxAESEBU_FORMAT *peAesebuFormat, int *pnCount);
/**
 * Set the format of the AESEBU transmitter.
 * @param hAESEBUTx A handle to an ASX AESEBU transmitter control.
 * @param eAesebuFormat The format to set the transmitter control to.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_AESEBUTransmitter_SetFormat(ASX_HANDLE hAESEBUTx, const enum asxAESEBU_FORMAT eAesebuFormat );
/**
 * Get the format of the AESEBU transmitter.
 * @param hAESEBUTx A handle to an ASX AESEBU transmitter control.
 * @param peAesebuFormat The returned format.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_AESEBUTransmitter_GetFormat(ASX_HANDLE hAESEBUTx, enum asxAESEBU_FORMAT *peAesebuFormat );
/** @} */ // end of AESEBU_Tx group

/******************************************************************
 * GPIO Control
 */
/** @defgroup Gpio GPIO control functions
 * These functions implement GPIO operations. By GPIO we here mean the
 * control of relays and the reading of optos.
 * @{
 *******************************************************************/
/**
 * Get the properties of the GPIO control.
 * GPIO controls have a number of input and output bits and this function
 * tells the application how many there are of each.
 * @param hGPIO A handle to an ASX GPIO control object.
 * @param pnNumberOfInputBits The number of input bits.
 * @param pnNumberOfOutputBits The number of output bits.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_GPIO_GetProperties( ASX_HANDLE hGPIO, int *pnNumberOfInputBits,int *pnNumberOfOutputBits);
/**
 * Read the state of the GPIO opto inputs.
 * This functions reads all the GPIO inputs and returns the current readings in an
 * array of bits.
 * @param hGPIO A handle to an ASX GPIO control object.
 * @param pnInputBits An array of dimension nNumberOfBits items elements returns the bit readings.
 * pnBits[0] is the reading of opto 0 and pnBits[1] is the reading of opto 1. All pnBits elements
 * will be set to either 1 or 0.
 * @param nNumberOfBits The number of bits which should be set to the dimension of pnBits.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_GPIO_InputGet( ASX_HANDLE hGPIO, int *pnInputBits, const int nNumberOfBits);
/**
 * Write to the GPIO relay outputs.
 * This functions writes to all the GPIO outputs, setting the outputs to the values of pnBits.
 * @param hGPIO A handle to an ASX GPIO control object.
 * @param pnOutputBits An array of dimension nNumberOfBits elements that is used to set the relays.
 * All elements should be set to a value of either 1 or 0.
 * @param nNumberOfBits The number of bits which must be set to the dimension of pnBits.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_GPIO_OutputSet( ASX_HANDLE hGPIO, int *pnOutputBits, const int nNumberOfBits);
/**
 * Read the current GPIO relay output settings.
 * This functions reads all the GPIO outputs.
 * @param hGPIO A handle to an ASX GPIO control object.
 * @param pnOutputBits An array of dimension nNumberOfBits elements that is used to return the relay settings.
 * @param nNumberOfBits The number of bits which must be set to the dimension of pnBits.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_GPIO_OutputGet( ASX_HANDLE hGPIO, int *pnOutputBits, const int nNumberOfBits);
/** @} */ // end of GPIO group

/********************************************************************
 * Vox Control
 */
/** @defgroup Vox Vox control functions
 * These functions support vox control manipulation.
 * @{
 *******************************************************************/
/**
 * Set vox level.
 * @param hVox A handle to an ASX vox control.
 * @param fSetLevel The gain to set in dBFS, i.e. 0dB is fullscale.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Vox_SetLevel( ASX_HANDLE hVox, const float fSetLevel);
/**
 * Get vox level.
 * @param hVox A handle to an ASX vox control.
 * @param fGetLevel The returned gain in dBFS, i.e. 0dB is fullscale.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Vox_GetLevel( ASX_HANDLE hVox, float *fGetLevel);
/**
 * Get that range of vox settings available.
 * @param hVox A handle to an ASX vox control.
 * @param fMinLevel The returned minimum gain in dBFS, i.e. 0dB is fullscale.
 * @param fMaxLevel The returned maximum gain in dBFS, i.e. 0dB is fullscale.
 * @param fLevelStep The returned gain stepsize in dB.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Vox_GetRange( ASX_HANDLE hVox,
							 float *fMinLevel,
							 float *fMaxLevel,
							 float *fLevelStep);
/** @} */ // end of Vox group

/********************************************************************
 * Generic Control
 */
/** @defgroup GENERIC_GenericControl Generic control functions
 * This function supports the generic control.
 * @{
 *******************************************************************/
/**
 * Get the name of the control.
 * @param hControl A handle to an ASX generic control.
 * @param pName Pointer to a buffer (at least 60 chars) for the name.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_GetGenericControlName( ASX_HANDLE hControl, char *pName);
/** @} */ // end of Generic group

/******************************************************************
 * Microphone Control
 */
/** @defgroup MICROPHONE_Mic Microphone control functions
 * These functions implement Microphone phantom power setting.
 * @{
 *******************************************************************/
/**
 * Turn the phantom power on or off.
 * @param hMic A handle to an ASX Microphone control object.
 * @param nOnOff 1 = Turn phantom power on.  0 = Turn phantom power off.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Mic_SetPhantomPower( ASX_HANDLE hMic, const int nOnOff);
/**
 * Get the current state of the phantom power (on or off).
 * @param hMic A handle to an ASX Microphone control object.
 * @param pOnOff Receives power state 1 = Phantom power is on.  0 = Phantom power is off.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Mic_GetPhantomPower( ASX_HANDLE hMic, int *pOnOff);
/** @} */ // end of MIC group

/******************************************************************
 * Parametric EQ control
 */
/** @defgroup PARAMETRIC_EQ_ParametricEQ Parametric Equalizer control functions
 * These functions implement Parametric Equalizer settings.
 * @{
 *******************************************************************/
/**
 * Gets information on the equalizer.
 * @param hParmEq A handle to an ASX Parametric Equalizer control object.
 * @param pwNumberOfBands Receives the number of bands.
 * @param pwEnabled Receives the on/off state of the equalizer.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_EQ_GetInfo(
		ASX_HANDLE hParmEq,
		unsigned short	*pwNumberOfBands,
		unsigned short	*pwEnabled
		);
/**
 * Turns the equalizer on or off.
 * @param hParmEq A handle to an ASX Parametric Equalizer control object.
 * @param wOnOff 1 = Turn equalizer on.  0 = Turn equalizer off.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_EQ_SetState(
		ASX_HANDLE hParmEq,
		const unsigned short	wOnOff
		);
/**
 * Sets the parameters for an equalizer band.
 * @param hParmEq A handle to an ASX Parametric Equalizer control object.
 * @param wIndex Zero based index of the band, should be between zero and nBands - 1.
 * where nBands is the number of bands from a call to ASX_EQ_GetInfo().
 * @param eType Specifies the effect of the band.
 * @param dwFrequencyHz Specifies the cutoff (for high/lo types) or center frequency (for band types).
 * @param nQ100 Specifies the sharpness (for high/lo types) or bandwidth (for band types).
 * Value can be positive or negative and is given in hundreths (nQ100 = 72 means Q = 0.72).
 * @param nGain0_01dB Specifies the gain for equalizer, high shelf and low shelf filter types.
 * Value can be positive or negative (0 is unity gain) and is given in hundreths.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_EQ_SetBand(
		ASX_HANDLE hParmEq,
		const unsigned short		wIndex,
		const enum asxEQBANDTYPE	eType,
		const unsigned long		dwFrequencyHz,
		const short				nQ100,
		const short				nGain0_01dB
		);

/**
 * Gets the parameters for an equalizer band.
 * @param hParmEq A handle to an ASX Parametric Equalizer control object.
 * @param wIndex Zero based index of the band, should be between zero and nBands - 1.
 * where nBands is the number of bands from a call to ASX_EQ_GetInfo().
 * @param peType Receives the type of the band.
 * @param pdwFrequencyHz Receives the cutoff (for high/lo types) or center frequency (for band types).
 * @param pnQ100 Receives the sharpness (for high/lo types) or bandwidth (for band types).
 * Value can be positive or negative and is given in hundreths (nQ100 = 72 means Q = 0.72).
 * @param pnGain0_01dB Receives the gain for equalizer, high shelf and low shelf filter types.
 * Value can be positive or negative (0 is unity gain) and is given in hundreths.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_EQ_GetBand(
		ASX_HANDLE hParmEq,
		const unsigned short		wIndex,
		enum asxEQBANDTYPE  *peType,
		unsigned long		*pdwFrequencyHz,
		short				*pnQ100,
		short				*pnGain0_01dB
		);
/** @} */ // end of Parametric Equalizer group

/******************************************************************
 * Compander control
 */
/** @defgroup Compander Compander control functions
 * These functions implement Compander settings.
 * @{
 *******************************************************************/
/**\deprecated This function has been broekn up in to individual Set() functions.
 * Sets the parameters for the compander.
 * @param hCompander A handle to an ASX Compander control object.
 * @param wAttack Sets compander attack time in milliseconds.
 * @param wDecay Sets compander decay time in milliseconds.
 * @param wRatio100 Sets the input to output gain ratio.
 * Value is given in hundreths (wRatio100 = 72 means 0.72).
 * @param nThreshold0_01dB Sets the threshold above which the ratio applies.
 * Value is given in hundreths.
 * @param nMakeupGain0_01dB Adds a positive or negative offset to the output gain.
 * Value is given in hundreths.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Compander_Set(
		ASX_HANDLE hCompander,
		const unsigned short  wAttack,
		const unsigned short  wDecay,
		const short           wRatio100,
		const short           nThreshold0_01dB,
		const short           nMakeupGain0_01dB
		);

/**\deprecated This function has been broekn up in to individual Get() functions.
 * Gets the parameters for the compander.
 * @param hCompander A handle to an ASX Compander control object.
 * @param pwAttack Gets compander attack time in milliseconds.
 * @param pwDecay Gets compander decay time in milliseconds.
 * @param pwRatio100 Gets the input to output gain ratio.
 * Value is given in hundreths (wRatio100 = 72 means 0.72).
 * @param pnThreshold0_01dB Gets the threshold above which the ratio applies.
 * Value is given in hundreths.
 * @param pnMakeupGain0_01dB Receives the positive or negative offset to the output gain.
 * Value is given in hundreths.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Compander_Get(
		ASX_HANDLE hCompander,
		unsigned short  *pwAttack,
		unsigned short  *pwDecay,
		short           *pwRatio100,
		short           *pnThreshold0_01dB,
		short           *pnMakeupGain0_01dB
		);
/**
 * Sets the on/off parameter for the compander.
 * @param hCompander A handle to an ASX Compander control object.
 * @param nOn Sets compander to on if set to 1.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Compander_SetEnable(
		ASX_HANDLE hCompander,
		const unsigned int nOn
);
/**
 * Gets the on/off parameter for the compander.
 * @param hCompander A handle to an ASX Compander control object.
 * @param nOn Gets the compander ton/off status.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Compander_GetEnable(
		ASX_HANDLE hCompander,
		unsigned int *nOn
);
/**
 * Set the compander makeup gain.
 * @param hCompander A handle to an ASX Compander control object.
 * @param fMakeupGain The makeup gain to set in dBFS.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Compander_SetMakeupGain(
		ASX_HANDLE hCompander,
		const float fMakeupGain
);
/**
 * Get the compander makeup gain.
 * @param hCompander A handle to an ASX Compander control object.
 * @param fMakeupGain Returns the current makeup gain in dBFS.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Compander_GetMakeupGain(
		ASX_HANDLE hCompander,
		float *fMakeupGain
);
/**
 * Set the attack time constant in ms.
 * @param hCompander A handle to an ASX Compander control object.
 * @param index Index of timeconstant to set.
 * @param nAttack Sets attack time in milliseconds.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Compander_SetAttackTimeConstant(
		ASX_HANDLE hCompander,
		enum asxCOMPANDER_INDEX index,
		const unsigned int nAttack
);
/**
 * Get the attack time constant in ms.
 * @param hCompander A handle to an ASX Compander control object.
 * @param index Index of timeconstant to get.
 * @param pnAttack Gets attack time in milliseconds.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Compander_GetAttackTimeConstant(
		ASX_HANDLE hCompander,
		enum asxCOMPANDER_INDEX index,
		unsigned int *pnAttack
);
/**
 * Set the decay time constant in ms.
 * @param hCompander A handle to an ASX Compander control object.
 * @param index Index of timeconstant to set.
 * @param nDecay Sets decay time in milliseconds.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Compander_SetDecayTimeConstant(
		ASX_HANDLE hCompander,
		enum asxCOMPANDER_INDEX index,
		const unsigned int nDecay
);
/**
 * Get the decay time constant in ms.
 * @param hCompander A handle to an ASX Compander control object.
 * @param index Index of timeconstant to get.
 * @param pnAttack Gets decay time in milliseconds.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Compander_GetDecayTimeConstant(
		ASX_HANDLE hCompander,
		enum asxCOMPANDER_INDEX index,
		unsigned int *pnDecay
);
/**
 * Set the compander threshold in dbFS.
 * @param hCompander A handle to an ASX Compander control object.
 * @param index Index of threshold to set.
 * @param nThreshold Threshold in dbFS.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Compander_SetThreshold(
		ASX_HANDLE hCompander,
		enum asxCOMPANDER_INDEX index,
		const float nThreshold
);
/**
 * Get the compander threshold in dbFS.
 * @param hCompander A handle to an ASX Compander control object.
 * @param index Index of threshold to get.
 * @param pnThreshold Returned threshold in dbFS.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Compander_GetThreshold(
		ASX_HANDLE hCompander,
		enum asxCOMPANDER_INDEX index,
		float *pnThreshold
);
/**
 * Set the compander ratio (slope).
 * @param hCompander A handle to an ASX Compander control object.
 * @param index Index of rtio to set.
 * @param fRatio Ratio to set. 1.0 is 1:1.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Compander_SetRatio(
		ASX_HANDLE hCompander,
		enum asxCOMPANDER_INDEX index,
		const float fRatio
);
/**
 * Get the compander ratio (slope).
 * @param hCompander A handle to an ASX Compander control object.
 * @param index Index of rtio to get.
 * @param fRatio Returned ratio. 1.0 is 1:1.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Compander_GetRatio(
		ASX_HANDLE hCompander,
		enum asxCOMPANDER_INDEX index,
		float  *fRatio
);

/** @} */ // end of Compander group

/** \example cobranet/main.c
 * This is an example of how to use the ASX CobraNet functions.
 */

/******************************************************************
 * Cobranet control
 */
/** @defgroup Cobranet CobraNet control functions
 * These functions implement device wide CobraNet settings. The reader
 * is referred to "CobraNet Programmer's Reference",Cirrus Logic, http://www.cirrus.com ,
 * for more information.
 * @{
 *******************************************************************/
/**
 * @deprecated This function has been removed (it is stubbed out).
 */
ASX32_API ASX_ERROR ASX_Cobranet_EnumerateModes( ASX_HANDLE hCobranet, const int nIndex, enum asxCOBRANET_MODE *peMode, int *pnCount);
/**
 * @deprecated This function has been removed (it is stubbed out).
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetMode( ASX_HANDLE hCobranet, enum asxCOBRANET_MODE *peMode);
/**
 * @deprecated This function has been removed (it is stubbed out).
 */
ASX32_API ASX_ERROR ASX_Cobranet_SetMode( ASX_HANDLE hCobranet, const enum asxCOBRANET_MODE eMode);
/**
 * Get the current IP address of the Cobranet device.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param pdwIPAddr Gets the IP address.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetIPAddress( ASX_HANDLE hCobranet, unsigned int *pdwIPAddr);
/**
 * Set the current IP address of the Cobranet device.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param dwIPAddr The IP address to set.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_SetIPAddress( ASX_HANDLE hCobranet, const unsigned int dwIPAddr);
/**
 * Get the static IP address of the Cobranet device.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param pdwIPAddr Gets the static IP address. A value of 0 (0.0.0.0) indicates that no static IP address
 * has been assigned to this device.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetStaticIPAddress( ASX_HANDLE hCobranet, unsigned int *pdwIPAddr);
/**
 * Set the static IP address of the Cobranet device.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param dwIPAddr The static IP address to set. A value of 0 resets the static IP address. The assigned
 * static IP address will not take effect until the device is restarted.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_SetStaticIPAddress( ASX_HANDLE hCobranet, const unsigned int dwIPAddr);
/**
 * Get the current cobranet MAC address.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param pdwMAC_MSBs Gets the four most significant bytes of the MAC address.
 * @param pwMAC_LSBs Gets the two least significant bytes of the MAC address.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetMACAddress( ASX_HANDLE hCobranet, unsigned int *pdwMAC_MSBs, unsigned short *pwMAC_LSBs);
/**
 * Get the device's description from the sysDescr SNMP field. This is are read-only operation.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param szString Pointer to a string of length ASX_LONG_STRING.
 * @param nLength Description string length.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetDescription( ASX_HANDLE hCobranet, char *szString, const int nLength );
/**
 * Get the device's name from the sysName SNMP field.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param szString Pointer to a string of length ASX_LONG_STRING.
 * @param nLength Name string length.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetName( ASX_HANDLE hCobranet, char *szString, const int nLength );
/**
 * Set the device's name in the sysName SNMP field. Maximum name length is 60 characters.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param pszLongInputString Pointer to a 0 terminated string of length ASX_LONG_STRING. Only the first
 * 60 characters of the string should be used.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_SetName( ASX_HANDLE hCobranet, const char *pszLongInputString);
/**
 * Get the device's location from the sysLocation SNMP field.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param szString Pointer to a string of length ASX_LONG_STRING.
 * @param nLength Name string length.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetLocation( ASX_HANDLE hCobranet, char *szString, const int nLength );
/**
 * Set the device's location in the sysLocation SNMP field. Maximum name length is 60 characters.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param pszLongInputString Pointer to a 0 terminated string of length ASX_LONG_STRING. Only the first
 * 60 characters of the string should be used.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_SetLocation( ASX_HANDLE hCobranet, const char *pszLongInputString);
/**
 * Gets a device's firmware revision. This is a combination of SNMP fields firmwareProtocolVersion,
 * firmwareMajorVersion and firmwareMinorVersion.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param pszRevision A pointer to a char array of length ASX_SHORT_STRING to return the revision string.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetFirmwareRevision( ASX_HANDLE hCobranet, char *pszRevision);
/**
 * Gets a device's error information. Returns SNMP variables errorCode, errorCount and errorDisplay.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param pnCode Pointer used to return error code. See error code listing the Cobranet Programmer Manual from Cirrus Logic.
 * @param pnCount Pointer used to return error count which contains the number of errors that have occurred.
 * @param pnDisplay Pointer used to return error display number.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetErrorInfo( ASX_HANDLE hCobranet, unsigned int *pnCode, unsigned int *pnCount, unsigned int *pnDisplay);
/**
 * Gets a device's latency and sample reate. Returns information from SNMP variable modeRateControl.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param peLatency Pointer used to return latency.
 * @param peRate Pointer used to return sample rate.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetLatencyAndSampleRate( ASX_HANDLE hCobranet, enum asxCOBRANET_LATENCY *peLatency, enum asxSAMPLE_RATE *peRate);
/**
 * Gets a device's latency and sample reate. Returns information from SNMP variable modeRateControl.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param eLatency Latency to set.
 * @param eRate Sample rate to set. Note that the ASI2416 only supports a sample rate of 48 kHz.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_SetLatencyAndSampleRate( ASX_HANDLE hCobranet, const enum asxCOBRANET_LATENCY eLatency, const enum asxSAMPLE_RATE eRate);
/**
 * Gets a device's flash persistence setting. Returns information from SNMP variable flashPersistEnable.
 * This should be set to maintain static IP assignments and Cobranet bundle and routing assignments
 * through a powerdown. Conversely, clearing the persistence bit and then powering cycling the ASI2416
 * will set it back to factory defaults.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param pnSetting 0 indicates no persistence set. Non-zero indicates persistence enabled.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetPersistence( ASX_HANDLE hCobranet, unsigned int *pnSetting);
/**
 * Sets a device's flash persistence state. Writes setting to SNMP variable flashPersistEnable.
 * This should be set to maintain static IP assignments and Cobranet bundle and routing assignments
 * through a powerdown. Conversely, clearing the persistence bit and then powering cycling the ASI2416
 * will set it back to factory defaults.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param nSetting 0 indicates no persistence set. Non-zero indicates persistence enabled.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_SetPersistence( ASX_HANDLE hCobranet, const unsigned int nSetting);
/**
 * Gets a device's conductor priority.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param pnPriority Returned Priority. 0 indcates that this device will never be the network conductor.
 * 1 is the lowest priority and 0xFF is the highest priority.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetConductorPriority( ASX_HANDLE hCobranet, unsigned int *pnPriority);
/**
 * Sets a device's conductor priority.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param nPriority Priority to set. 0 indcates that this device will never be the network conductor.
 * 1 is the lowest priority and 0xFF is the highest priority.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_SetConductorPriority( ASX_HANDLE hCobranet, const unsigned int nPriority);
/**
 * Gets a device's conductor status.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param pnState Returned state. 1 indicates that this device is the conductor for the Cobranet network.
 * 0 indicates that it is not the conductor.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetConductorStatus( ASX_HANDLE hCobranet, unsigned int *pnState);
/**
 * Enable or disable a device's serial bridge.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param nOnOff 1 is on, 0 is off.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_SetSerialEnable( ASX_HANDLE hCobranet, const int nOnOff);
/**
 * Gets a device's serial bridge status.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param pOnOff Returned state. 1 is on, 0 is off.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetSerialEnable( ASX_HANDLE hCobranet, int *pOnOff);
/**
 * Configures a device's serial bridge.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param nBaud The baud rate for the serial bridge.
 * @param nPPeriod Time in 256ths of a millisecond before a character received at the SCI port is
 * placed in a packet and transmitted.
 * @param pRxMAC Sets the multicast MAC from which SCI data will be accepted.
 * @param nAcceptUnicast Set to accept properly unicast addressed data in addition to data addressed
 * in accordance to pRxMAC. 1 = accept, 0 = ignore
 * @param pTxMAC Sets the MAC address (unicast or multicast) to which SCI data is sent.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_SetSerialConfig(
	ASX_HANDLE hCobranet,
	const unsigned int nBaud,
	const unsigned int nPPeriod,
	const char pRxMAC[6],
	const int nAcceptUnicast,
	const char pTxMAC[6]);
/**
 * Gets a device's serial bridge configuration.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param pnBaud Returns the baud rate for the serial bridge.
 * @param pnPPeriod Returns the time in 256ths of a millisecond before a character received at the
 * SCI port is placed in a packet and transmitted.
 * @param pRxMAC Gets the multicast MAC from which SCI data will be accepted.
 * @param pnAcceptUnicast Gets the state of the accept unicast flag. 1 = accept, 0 = ignore
 * @param pTxMAC Gets the MAC to which SCI data is sent.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetSerialConfig(
	ASX_HANDLE hCobranet,
	unsigned int *pnBaud,
	unsigned int *pnPPeriod,
	char pRxMAC[6],
	int *pnAcceptUnicast,
	char pTxMAC[6]);
/**
 * Gets a device's ethernet connection status.
 * @param hCobranet A handle to an ASX cobranet control.
 * @param pnCurrentIf Returns which ethernet connection is active (1 for primary, 2 for secondary)
 * @param pnPrimaryLinkStatus Returns primary link status. See #asxCOBRANET_IFSTATUS.
 * @param pnSecondaryLinkStatus Returns secondary link status. See #asxCOBRANET_IFSTATUS.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Cobranet_GetIfStatus(
	ASX_HANDLE hCobranet,
	unsigned int *pnCurrentIf,
	unsigned int *pnPrimaryLinkStatus,
	unsigned int *pnSecondaryLinkStatus);
/** @} */ // end of Cobranet group
/******************************************************************
 * Cobranet transmitter control
 */
/** @defgroup COBRANET_TRANSMITTER_CobranetTx Cobranet transmitter control functions
 * These functions implement Cobranet transmitter configuration.
 * @{
 *******************************************************************/
/**
 * Gets a Cobranet transmitter's status. This function reads SNMP variables txDropouts, txPosition, txReceivers.
 * @param hCobranetTx A handle to an ASX cobranet transmitter control.
 * @param pnDropouts Number of times transmission has been interrupted.
 * @param pnPosition Transmission permission position.
 * @param pnReceivers Number of receivers requesting the bundle transmitted by this transmitter.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetTx_GetStatus(ASX_HANDLE hCobranetTx, unsigned int *pnDropouts, unsigned int *pnPosition,unsigned int *pnReceivers);
/**
 * Gets a Cobranet transmitter's bundle.
 * @param hCobranetTx A handle to an ASX cobranet transmitter control.
 * @param pnBundle The transmitter's assigned bundle. A value of 0 indicates that the tranmitter is disabled.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetTx_GetBundle(ASX_HANDLE hCobranetTx, unsigned int *pnBundle);
/**
 * Sets a Cobranet transmitter's bundle.
 * @param hCobranetTx A handle to an ASX cobranet transmitter control.
 * @param nBundle The bundle to assign to the transmitter. A value of 0 indicates that the tranmitter is disabled.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetTx_SetBundle(ASX_HANDLE hCobranetTx, const unsigned int nBundle);
/**
 * Gets a Cobranet transmitter's channel count.
 * @param hCobranetTx A handle to an ASX cobranet transmitter control.
 * @param pnCount The number of audio channels to transmit in a bundle. This is SNMP variable txSubCount.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetTx_GetChannelCount(ASX_HANDLE hCobranetTx, unsigned int *pnCount);
/**
 * Sets a Cobranet transmitter's channel count.
 * @param hCobranetTx A handle to an ASX cobranet transmitter control.
 * @param nCount The number of audio channels to transmit in a bundle. This is SNMP variable txSubCount.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetTx_SetChannelCount(ASX_HANDLE hCobranetTx, const unsigned int nCount);
/**
 * Gets a Cobranet transmitter's channel map. This controls which audio routing channels are transmitted.
 * @param hCobranetTx A handle to an ASX cobranet transmitter control.
 * @param nMap The channel map returned in an array of size 8.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetTx_GetChannelMap(ASX_HANDLE hCobranetTx, unsigned int nMap[8]);
/**
 * Sets a Cobranet transmitter's channel map. This controls which audio routing channels are transmitted.
 * @param hCobranetTx A handle to an ASX cobranet transmitter control.
 * @param nMap The channel map is passed as in an array of size 8.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetTx_SetChannelMap(ASX_HANDLE hCobranetTx, const unsigned int nMap[8]);
/**
 * Gets a Cobranet transmitter's sub format map. This contains transmit format information.
 * @param hCobranetTx A handle to an ASX cobranet transmitter control.
 * @param peFormat The format returned, will be asxAUDIO_FORMAT_PCM16, asxAUDIO_FORMAT_PCM20, asxAUDIO_FORMAT_PCM24 or asxAUDIO_FORMAT_NONE.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetTx_GetFormat(ASX_HANDLE hCobranetTx, enum asxAUDIO_FORMAT *peFormat);
/**
 * Sets a Cobranet transmitter's channel format. This controls the resolution, sample rate and latency of each
 * transmitted channel. In practice all channels are set to the same value.
 * @param hCobranetTx A handle to an ASX cobranet transmitter control.
 * @param eFormat The channel format specification, can be asxAUDIO_FORMAT_PCM16, asxAUDIO_FORMAT_PCM20 or asxAUDIO_FORMAT_PCM24.
 * Specify asxAUDIO_FORMAT_NONE to disable the transmitter (same effect as bundle==0).
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetTx_SetFormat(ASX_HANDLE hCobranetTx, const enum asxAUDIO_FORMAT eFormat);
/**
 * Gets a Cobranet transmitter's unicast information. This function reads SNMP variable txUnicastMode.
 * @param hCobranetTx A handle to an ASX cobranet transmitter control.
 * @param pnUnicastMode Specifies the number of unicast destinations served before switching to multicast.
 * @param pnMaxUnicast Specifies the maximum number of unicast destinations.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetTx_GetUnicastMode(ASX_HANDLE hCobranetTx, unsigned int *pnUnicastMode, unsigned int *pnMaxUnicast);
/**
 * Sets a Cobranet transmitter's unicast information. This function writes SNMP variable txUnicastMode.
 * @param hCobranetTx A handle to an ASX cobranet transmitter control.
 * @param nUnicastMode Specifies the number of unicast destinations served before switching to multicast.
 * Value of 0x7FFFFF disables multicast addressing.
 * @param nMaxUnicast Specifies the maximum number of unicast destinations.
<table border=1 cellspacing=0 cellpadding=3>
<tr>
<td width=100 align=center><p><b>nUnicastMode value</b></p></td>
<td width=100 align=center><p><b>nMaxUnicast value</b></p></td>
<td width=150><p><b>Effect</b></p></td>
</tr>
<tr>
<td width=100 align=center><p>0</p></td>
<td width=100 align=center><p>any</p></td>
<td width=150><p>Always Multicast</p></td>
</tr>
<tr>
<td width=100 align=center><p>0x7FFFFF</p></td>
<td width=100 align=center><p>N (1 to 4)</p></td>
<td width=150><p>Up to N receivers unicast. Additional receivers fail.</p></td>
</tr>
<tr>
<td width=100 align=center><p>N</p></td>
<td width=100 align=center><p>N</p></td>
<td width=150><p>Up to N receivers unicast switch to multicast for more.</p></td>
</tr>
</table>
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetTx_SetUnicastMode(ASX_HANDLE hCobranetTx, const unsigned int nUnicastMode, const unsigned int nMaxUnicast);

/** @} */ // end of Cobranet Tx group

/******************************************************************
 * Cobranet receiver control
 */
/** @defgroup COBRANET_RECEIVER_CobranetRx Cobranet receiver control functions
 * These functions implement Cobranet receiver configuration.
 * @{
 *******************************************************************/
/**
 * Gets a Cobranet receiver's status. This function reads SNMP variables rxStatus, rxDropouts, rxDelay and rxSubFormat.
 * @param hCobranetRx A handle to an ASX cobranet receiver control.
 * @param pnStatus 1 indicates a bundle is being received. 0 indicates no bundle is being received.
 * @param pnDropouts Counts the number of times bundle reception has been interrupted.
 * @param pnDelay A non-zero value indicates the number of additional delays imposed on the received audio due to network forwarding delays.
 * Delay is expressed in units of the system latency. ie 1-1/3ms for 5-1/3ms latency.
 * @param nFormat The format information for the received audio channels.
 * Subformat codes are shown in the following table.  The least significant bit of the subformat entries is set when the received format is
 * supported for reception by the CobraNet interface. A test of this least significant bit can be used to determine correct reception on a
 * per audio channel basis.
<table border=1 cellspacing=0 cellpadding=3>
<tr>
<td width=150><p><b>txSubFormat value</b></p></td>
<td width=100 align=center><p><b>Resolution</b></p></td>
<td width=100 align=center><p><b>Sample Rate</b></p></td>
<td width=100 align=center><p><b>Latency</b></p></td>
</tr>
<tr><td>0</td><td>invalid</td><td>invalid</td><td>invalid</td></tr>
<tr><td>0x044000</td><td>16-bit</td><td>48 kHz</td><td>5-1/3 ms</td></tr>
<tr><td>0x054000</td><td>20-bit</td><td>48 kHz</td><td>5-1/3 ms</td></tr>
<tr><td>0x064000</td><td>24-bit</td><td>48 kHz</td><td>5-1/3 ms</td></tr>
<tr><td>0x148000</td><td>16-bit</td><td>96 kHz</td><td>5-1/3 ms</td></tr>
<tr><td>0x158000</td><td>20-bit</td><td>96 kHz</td><td>5-1/3 ms</td></tr>
<tr><td>0x168000</td><td>24-bit</td><td>96 kHz</td><td>5-1/3 ms</td></tr>
<tr><td>0x042000</td><td>16-bit</td><td>48 kHz</td><td>2-2/3 ms</td></tr>
<tr><td>0x052000</td><td>20-bit</td><td>48 kHz</td><td>2-2/3 ms</td></tr>
<tr><td>0x062000</td><td>24-bit</td><td>48 kHz</td><td>2-2/3 ms</td></tr>
<tr><td>0x144000</td><td>16-bit</td><td>96 kHz</td><td>2-2/3 ms</td></tr>
<tr><td>0x154000</td><td>20-bit</td><td>96 kHz</td><td>2-2/3 ms</td></tr>
<tr><td>0x164000</td><td>24-bit</td><td>96 kHz</td><td>2-2/3 ms</td></tr>
<tr><td>0x041000</td><td>16-bit</td><td>48 kHz</td><td>1-1/3 ms</td></tr>
<tr><td>0x051000</td><td>20-bit</td><td>48 kHz</td><td>1-1/3 ms</td></tr>
<tr><td>0x061000</td><td>24-bit</td><td>48 kHz</td><td>1-1/3 ms</td></tr>
<tr><td>0x142000</td><td>16-bit</td><td>96 kHz</td><td>1-1/3 ms</td></tr>
<tr><td>0x152000</td><td>20-bit</td><td>96 kHz</td><td>1-1/3 ms</td></tr>
<tr><td>0x162000</td><td>24-bit</td><td>96 kHz</td><td>1-1/3 ms</td></tr>
</table>
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetRx_GetStatus(ASX_HANDLE hCobranetRx, unsigned int *pnStatus, unsigned int *pnDropouts, unsigned int *pnDelay, unsigned int nFormat[8]);
/**
 * Gets a Cobranet receiver's bundle.
 * @param hCobranetRx A handle to an ASX cobranet receiver control.
 * @param pnBundle Bundle number being received. 0 indicates no bundle is being received.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetRx_GetBundle(ASX_HANDLE hCobranetRx, unsigned int *pnBundle);
/**
 * Sets a Cobranet receiver's bundle.
 * @param hCobranetRx A handle to an ASX cobranet receiver control.
 * @param nBundle Bundle number to receive. 0 indicates no bundle is being received.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetRx_SetBundle(ASX_HANDLE hCobranetRx, const unsigned int nBundle);
/**
 * Gets a Cobranet receiver's source MAC address for private bundles.
 * @param hCobranetRx A handle to an ASX cobranet receiver control.
 * @param pdwMAC_MSBs Gets the four most significant bytes of the source MAC address.
 * @param pwMAC_LSBs Gets the two least significant bytes of the source MAC address.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetRx_GetSourceMAC(ASX_HANDLE hCobranetRx, unsigned int *pdwMAC_MSBs, unsigned short *pwMAC_LSBs);
/**
 * Sets a Cobranet receiver's source MAC address for private bundles.
 * @param hCobranetRx A handle to an ASX cobranet receiver control.
 * @param dwMAC_MSBs Sets the four most significant bytes of the source MAC address.
 * @param wMAC_LSBs Sets the two least significant bytes of the source MAC address.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetRx_SetSourceMAC(ASX_HANDLE hCobranetRx, const unsigned int dwMAC_MSBs, const unsigned short wMAC_LSBs);
/**
 * Gets a Cobranet receiver's channel mapping.
 * @param hCobranetRx A handle to an ASX cobranet receiver control.
 * @param nMap Audio channel mapping.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetRx_GetChannelMap(ASX_HANDLE hCobranetRx, unsigned int nMap[8]);
/**
 * Sets a Cobranet receiver's channel mapping.
 * @param hCobranetRx A handle to an ASX cobranet receiver control.
 * @param nMap Audio channel mapping.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetRx_SetChannelMap(ASX_HANDLE hCobranetRx, const unsigned int nMap[8]);
/**
 * Gets a Cobranet receiver's minimum delay.
 * @param hCobranetRx A handle to an ASX cobranet receiver control.
 * @param pnMinDelay Minimum received audio delay.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetRx_GetMinimumDelay(ASX_HANDLE hCobranetRx, unsigned int *pnMinDelay);
/**
 * Sets a Cobranet receiver's channel mapping. Selects a minimum additional delay imposed on the
 * received audio. Delay is expressed in units of isochronous cycles (1-1/3ms for standard
 * 5-1/3ms latency mode, 2/3ms for 2-2/3ms latency mode and 1/3ms for 1-1/3ms latency mode).
 * This variable is designed to allow configuration of a deterministic common delay for all
 * Cobranet interfaces in larger network installations. rxDelay will never be reduced below
 * this setting. This variable is not designed for actively delaying audio for architectural
 * applications.
 * @param hCobranetRx A handle to an ASX cobranet receiver control.
 * @param nMinDelay Minium audio delay.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_CobranetRx_SetMinimumDelay(ASX_HANDLE hCobranetRx, const unsigned int nMinDelay);
/** @} */ // end of Cobranet Rx group

/******************************************************************
 * Tone Detector control
 */
/** @defgroup TONEDETECTOR_ToneDetector Tone detector control functions
 * The tone detector monitors its inputs for the presence of any of a number of tones.
 * Currently 25Hz and 35Hz tones can be detected independently on left and right channels.
 * Tones that exceed the threshold set by HPI_ToneDetector_SetThreshold() are detected.
 * The result of the detection is reflected in the controls state, and optionally by sending
 * an async event with the new state.
 * Tones must have a minimum duration of 200ms before they are detected.
 * @{
 *******************************************************************/
/**
 * Turns the entire tone detector on and off.
 * @param hToneDetector A handle to an ASX tone detector control.
 * @param nEnable A value of 1 enables the tone detector and a value of 0 disables it.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_ToneDetector_SetEnable( ASX_HANDLE hToneDetector,const unsigned int nEnable);
/**
 * Returns whether the entire tone detector is on or off.
 * @param hToneDetector A handle to an ASX tone detector control.
 * @param nEnable A return value of 1 implies on, while 0 implies off.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_ToneDetector_GetEnable( ASX_HANDLE hToneDetector,unsigned int *nEnable);
/**
 * Turns the event reporting function of the tone detector on and off.
 * @param hToneDetector A handle to an ASX tone detector control.
 * @param nEnable A value of 1 enables the tone detector event reporting and a value of 0 disables it.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_ToneDetector_SetEventEnable( ASX_HANDLE hToneDetector,const unsigned int nEnable);
/**
 * Returns whether the event reporting function of the tone detector is on or off.
 * @param hToneDetector A handle to an ASX tone detector control.
 * @param nEnable A return value of 1 implies on, while 0 implies off.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_ToneDetector_GetEventEnable( ASX_HANDLE hToneDetector,unsigned int *nEnable);
/**
 * Sets the tone detector threshold (units of dB)
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_ToneDetector_SetThreshold( ASX_HANDLE hToneDetector,const float fThreshold);
/**
 * Gets the tone detector threshold (units of dB) with respect to full scale eg. -20dBFS. Tones with level above -20dBFs threshold are detected
 * Tones must have a minimum duration of 200ms before they are detected.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_ToneDetector_GetThreshold( ASX_HANDLE hToneDetector,float *fThreshold);
/**
 * Gets the tone detector state.  The state is a bitfield.  Pairs of bits
 * represent left and right channels of detectors.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_ToneDetector_GetState( ASX_HANDLE hToneDetector,unsigned int *nState);
/**
 * Gets the centre frequency of each tone detector by index.
 * This can be used to determine the meanings of the state  bits.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_ToneDetector_GetFrequency( ASX_HANDLE hToneDetector,unsigned int nIndex,unsigned int *nState);
/** @} */ // end of Tone group

/******************************************************************
 * Silence Detector control
 */
/** @defgroup SILENCEDETECTOR_SilenceDetector Silence detector control functions
 * These functions control a silence detector.
 * @{
 *******************************************************************/
/**
 * Turns the entire silence detector on and off.
 * @param hSilenceDetector A handle to an ASX tone detector control.
 * @param nEnable A value of 1 enables the silence detector and a value of 0 disables it.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SilenceDetector_SetEnable( ASX_HANDLE hSilenceDetector,const unsigned int nEnable);
/**
 * Returns whether the entire silence detector is on or off.
 * @param hSilenceDetector A handle to an ASX silence detector control.
 * @param nEnable A return value of 1 implies on, while 0 implies off.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SilenceDetector_GetEnable( ASX_HANDLE hSilenceDetector,unsigned int *nEnable);
/**
 * Turns the event reporting function of the silence detector on and off.
 * @param hSilenceDetector A handle to an ASX silence detector control.
 * @param nEnable A value of 1 enables the silence detector event reporting and a value of 0 disables it.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SilenceDetector_SetEventEnable( ASX_HANDLE hSilenceDetector,const unsigned int nEnable);
/**
 * Returns whether the event reporting function of the silence detector is on or off.
 * @param hSilenceDetector A handle to an ASX silence detector control.
 * @param nEnable A return value of 1 implies on, while 0 implies off.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SilenceDetector_GetEventEnable( ASX_HANDLE hSilenceDetector,unsigned int *nEnable);

/** Set the silence detector delay
 * @param hSilenceDetector A handle to an ASX silence detector control.
 * @param Delay Delay in milliseconds after signal falls below threshold before silence is indicated.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SilenceDetector_SetDelay(
	ASX_HANDLE hSilenceDetector,
	const unsigned int Delay
);
/** Get the silence detector delay
 * @param hSilenceDetector A handle to an ASX silence detector control.
 * @param Delay Delay in milliseconds after signal falls below threshold before silence is indicated.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SilenceDetector_GetDelay(
	ASX_HANDLE hSilenceDetector,
	unsigned int *Delay
);
/**
 * Sets the silence detector threshold (units of dB)
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SilenceDetector_SetThreshold( ASX_HANDLE hSilenceDetector,const float fThreshold);
/**
 * Gets the silence detector threshold (units of dB)
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SilenceDetector_GetThreshold( ASX_HANDLE hSilenceDetector,float *fThreshold);
/**
 * Gets the silence detector state.  The state is a bitfield.  Pairs of bits
 * represent left and right channels of detectors.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_SilenceDetector_GetState( ASX_HANDLE hSilenceDetector,unsigned int *nState);
/** @} */ // end of silence group
/******************************************************************
 * Block control
 */
/** @defgroup BLOCK_Block Block functions.
 * These functions provide an abstract mechanism to manipulate a well
 * defined set of property primitives that can be combined into a
 * block.
 * @{
 *******************************************************************/
/**
 * Gets the name of the block and the number of parameters it has.
 * @param hBlock A handle to an ASX block.
 * @param szBlockName String used to return the name of the block. It should be of length
 * ASX_SHORT_STRING.
 * @param uStringLength The length on the string pointed to be szName.
 * @param uParameterCount The number of parameters it has.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Block_GetInfo(
		ASX_HANDLE hBlock,
		char *szBlockName,
		const unsigned int uStringLength,
		unsigned int *uParameterCount);

/**
 * Gets the name of parameter number uParameterIndex.
 * @param hBlock A handle to an ASX block.
 * @param uParameterIndex The index of the parameter of interest.
 * @param szParameterName String used to return the name of the parameter.
 * It should be of length ASX_SHORT_STRING.
 * @param uStringLength The length on the string pointed to be szName.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Block_Parameter_GetName(
		ASX_HANDLE hBlock,
		const unsigned int uParameterIndex,
		char *szParameterName,
		const unsigned int uStringLength);
/**
 * Gets the units of parameter number uParameterIndex.
 * @param hBlock A handle to an ASX block.
 * @param uParameterIndex The index of the parameter of interest.
 * @param szParameterUnits String used to return the parameter units.
 * It should be of length ASX_SHORT_STRING.
 * @param uStringLength The length on the string pointed to be szName.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Block_Parameter_GetUnits(
		ASX_HANDLE hBlock,
		const unsigned int uParameterIndex,
		char *szParameterUnits,
		const unsigned int uStringLength);
/**
 * Gets the type of parameter number uParameterIndex.
 * @param hBlock A handle to an ASX block.
 * @param uParameterIndex The index of the parameter of interest.
 * @param eType Returned parameter type. See #asxUCONTROL_PTYPE.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Block_Parameter_GetType(
		ASX_HANDLE hBlock,
		const unsigned int uParameterIndex,
		enum asxUCONTROL_PTYPE *eType);

/**
 * Gets the flags for parameter number uParameterIndex.
 * @param hBlock A handle to an ASX block.
 * @param uParameterIndex The index of the parameter of interest.
 * @param eFlags Returned parameter flags. See #asxUCONTROL_PFLAGS.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Block_Parameter_GetFlags(
		ASX_HANDLE hBlock,
		const unsigned int uParameterIndex,
		enum asxUCONTROL_PFLAGS *eFlags);

/**
 * Gets the number of elements.
 * @param hBlock A handle to an ASX block.
 * @param uParameterIndex The index of the parameter of interest.
 * @param uCount Returned element count.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Block_Parameter_GetElementCount(
		ASX_HANDLE hBlock,
		const unsigned int uParameterIndex,
		unsigned int *uCount);

/**
 * Gets the parameter range.
 * @param hBlock A handle to an ASX block.
 * @param uParameterIndex The index of the parameter of interest.
 * @param info Returned range structure. See #asxParameterRangeInfo.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Block_Parameter_GetRange(
		ASX_HANDLE hBlock,
		const unsigned int uParameterIndex,
		struct asxParameterRangeInfo *info);

/**
 * Gets the enumerated names for a parameter.
 * @param hBlock A handle to an ASX block.
 * @param uParameterIndex The index of the parameter of interest.
 * @param uEnumItem The enumerator index.
 * @param szEnumName String used to return the enumerator name.
 * It should be of length ASX_SHORT_STRING.
 * @param uStringLength The length on the string pointed to be szName.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Block_Parameter_GetEnumName(
		ASX_HANDLE hBlock,
		const unsigned int uParameterIndex,
		const unsigned int uEnumItem,
		char *szEnumName,
		const unsigned int uStringLength);

/**
 * Sets a parameter's value field.
 * @param hBlock A handle to an ASX block.
 * @param uParameterIndex The index of the parameter of interest.
 * @param data The data to set on the parameter. See #asxParameterValue.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Block_Parameter_Set(
		ASX_HANDLE hBlock,
		const unsigned int uParameterIndex,
		struct asxParameterValue *data);

/**
 * Gets a parameter's value field.
 * @param hBlock A handle to an ASX block.
 * @param uParameterIndex The index of the parameter of interest.
 * @param data The data to get from the parameter. See #asxParameterValue.
 * @return Returns 0 if there is no error, otherwise one of #asxERROR is returned.
 */
ASX32_API ASX_ERROR ASX_Block_Parameter_Get(
		ASX_HANDLE hBlock,
		const unsigned int uParameterIndex,
		struct asxParameterValue *data);

/* for the future
ASX32_API ASX_ERROR ASX_ParameterValue_Init(
		struct asxParameterValue *data,
		enum asxUCONTROL_PTYPE *eType,
		const unsigned int uElementCount,
		void *data2);
*/

/** @} */ // end of block group

#endif /* ASX_H_DEFS_ONLY */
#ifdef __cplusplus
}
#endif
#endif  /* _ASX_H_ */

/***********************************************************
*
***********************************************************/
