ASX: Main Page

Version2.94rc6

ASX Reference Manual

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++, Visual Basic and Delphi.

Installation and Usage

Windows 2000 and XP

  1. Make sure you have an AudioScience WAVE or WDM driver installed and working with at least one audio adapter.
  2. 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_XXX.EXE, where XXX is the version number.
  3. Run the ASX_SDK_WIN_XXX.EXE application to install both the 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.

Linux

ToDo

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.lib.

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 physcial 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:

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.

Generated on Wed Mar 9 16:02:30 2005 for ASX by doxygen 1.3.9.1


ASX: File Index

ASX File List

Here is a list of all files with brief descriptions:
asx.h [code]
asxstring.h [code]
Generated on Wed Mar 9 16:02:32 2005 for ASX by doxygen 1.3.9.1


ASX: asx.h File Reference

asx.h File Reference

Go to the source code of this file.

Defines

#define | ASX_VERSION "294rc6"
Build version number.
#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_SHORT_STRING_SIZE (32)
Short string size for adapter, node, control, enum translations.
#define | ASX_LONG_STRING_SIZE (128)
Long string size for error strings and filenames.
#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.

Typedefs

typedef unsigned int | ASX_HANDLE
Generic handle used to represent all ASX objects.
typedef int | ASX_TIME
Timescale.
typedef void | ASX_ERROR_CALLBACK (ASX_HANDLE hASX_Object, const char *pszCallingFunction, void *pUser1, void *pUser2)
An error handling callback function.

Enumerations

enum asxERROR {
asxERROR_NO_ERROR = 0, asxERROR_ASXOBJECT = 256, asxERROR_INDEX_OUT_OF_RANGE, asxERROR_UNIMPLEMENTED,
asxERROR_COMMUNICATING_WITH_DEVICE, asxERROR_STARTING_DEVICE, asxERROR_NOT_OPEN, asxERROR_ALREADY_OPEN,
asxERROR_INVALID_FORMAT, asxERROR_INTERNAL_BUFFERING_ERROR, asxERROR_AES18, asxERROR_INVALID_OPERATION,
asxERROR_ENUMERATE_INDEX_OUT_OF_RANGE, asxERROR_BUFFER_TOO_SMALL, asxERROR_OUTOFMEMORY, asxERROR_INVALID_CONTROL,
asxERROR_INVALID_CONTROL_VALUE, asxERROR_INVALID_CONTROL_NOT_FOUND, asxERROR_INVALID_NUMBER_OF_CHANNELS, asxERROR_FILE_OPEN_FAILED,
asxERROR_PLAYER_INTERNAL_STATE_FAILURE, asxERROR_PLAYER_TIME_OUT, asxERROR_PLAYER_OUT_OF_SEQUENCE_CALL, asxERROR_PLAYER_TWAV,
asxERROR_PLAYER_NOFILE, asxERROR_PLAYER_INVALIDFILEFORMAT, asxERROR_PLAYER_UNSUPPORTEDFORMAT, asxERROR_PLAYER_FILEREADERROR,
asxERROR_PLAYER_FILEOPENERROR, asxERROR_RECORDER_INTERNAL_STATE_FAILURE, asxERROR_RECORDER_TIME_OUT, asxERROR_RECORDER_OUT_OF_SEQUENCE_CALL,
asxERROR_RECORDER_TWAV, asxERROR_RECORDER_FILECREATEERROR, asxERROR_RECORDER_FILEWRITEERROR, asxERROR_RECORDER_FORMATMISMATCH,
asxERROR_RECORDER_INVALIDFILENAME, asxERROR_UNKNOWN
}
ASX error codes. These error codes are returned by most ASX functions. More...
enum asxNODE {
asxNODE_NONE = 0, asxNODE_INVALID = 400, asxNODE_ADAPTER, asxNODE_PLAYER,
asxNODE_LINE_IN, asxNODE_DIGITAL_IN, asxNODE_TUNER_IN, asxNODE_RADIO_FREQ_IN,
asxNODE_CLOCK_SOURCE_IN, asxNODE_BITSTREAM_IN, asxNODE_MICROPHONE_IN, asxNODE_LAST_SOURCE_NODE,
asxNODE_RECORDER, asxNODE_LINE_OUT, asxNODE_DIGITAL_OUT, asxNODE_RADIO_FREQ_OUT,
asxNODE_SPEAKER_OUT, asxNODE_LAST_DEST_NODE
}
Node type identifiers. The nodes identify how controls are connected and located. This enum is used to identify node types. More...
enum asxCONTROL {
asxCONTROL_INVALID = 500, asxCONTROL_CONNECTION, asxCONTROL_VOLUME, asxCONTROL_METER,
asxCONTROL_MUTE, asxCONTROL_MULTIPLEXER, asxCONTROL_AESEBU_TRANSMITTER, asxCONTROL_AESEBU_RECEIVER,
asxCONTROL_LEVEL, asxCONTROL_TUNER, asxCONTROL_ON_OFF_SWITCH, asxCONTROL_VOX,
asxCONTROL_AES18_TRANSMITTER, asxCONTROL_AES18_RECEIVER, asxCONTROL_AES18_BLOCK_GENERATOR, asxCONTROL_CHANNEL_MODE,
asxCONTROL_BIT_STREAM, asxCONTROL_SAMPLE_CLOCK, asxCONTROL_MICROPHONE, asxCONTROL_PARAMETRIC_EQ,
asxCONTROL_COMPANDER, asxCONTROL_PLAYER, asxCONTROL_RECORDER, asxCONTROL_GPIO,
asxCONTROL_NV_MEM, asxCONTROL_ADAPTER_MODE, asxCONTROL_ADAPTER_INFO, asxCONTROL_GENERIC,
asxCONTROL_LAST_CONTROL
}
Control type identifiers. The control types are used to differentiate control capabilities. More...
enum asxCHANNELMODE {
asxCHANNELMODE_ILLEGAL = 1000, asxCHANNELMODE_NORMAL, asxCHANNELMODE_SWAP, asxCHANNELMODE_STEREOTOLEFT,
asxCHANNELMODE_STEREOTORIGHT, asxCHANNELMODE_LEFTTOSTEREO, asxCHANNELMODE_RIGHTTOSTEREO
}
Channel mode settings. More...
enum asxADAPTERMODE {
asxADAPTERMODE_ILLEGAL = 1100, asxADAPTERMODE_4_PLAY, asxADAPTERMODE_6_PLAY, asxADAPTERMODE_8_PLAY,
asxADAPTERMODE_16_PLAY, asxADAPTERMODE_1_PLAY, asxADAPTERMODE_MODE_1, asxADAPTERMODE_MODE_2,
asxADAPTERMODE_MODE_3, asxADAPTERMODE_MULTICHANNEL
}
Adapter mode settings. More...
enum | asxTUNERBAND { asxTUNERBAND_AM = 1200, asxTUNERBAND_FM, asxTUNERBAND_TV, asxTUNERBAND_FM_STEREO }
Tuner band settings. More...
enum | asxTUNERMODE { asxTUNERMODE_RSS = 1250, asxTUNERMODE_RSS_ENABLE, asxTUNERMODE_RSS_DISABLE }
Tuner mode settings. More...
enum asxSAMPLE_CLOCK_SOURCE {
asxSAMPLE_CLOCK_SOURCE_ADAPTER = 1400, asxSAMPLE_CLOCK_SOURCE_AESEBU, asxSAMPLE_CLOCK_SOURCE_WORD, asxSAMPLE_CLOCK_SOURCE_WORD_HEADER,
asxSAMPLE_CLOCK_SOURCE_SMPTE
}
Sample clock source options. More...
enum | asxDIGITAL_MODE { asxDIGITAL_MODE_AESEBU = 1450, asxDIGITAL_MODE_SPDIF }
enum | asxFILE_FORMAT { asxFILE_FORMAT_WAV = 10000, asxFILE_FORMAT_RAW }
File Formats. More...
enum | asxFILE_MODE { asxFILE_MODE_CREATE = 10100, asxFILE_MODE_APPEND }
File Mode. More...
enum asxAUDIO_FORMAT {
asxAUDIO_FORMAT_PCM8 = 10200, asxAUDIO_FORMAT_PCM16, asxAUDIO_FORMAT_PCM24, asxAUDIO_FORMAT_PCM32,
asxAUDIO_FORMAT_PCM32_FLOAT, asxAUDIO_FORMAT_MPEG_L2, asxAUDIO_FORMAT_MPEG_L3, asxAUDIO_FORMAT_MPEG_AACPLUS,
asxAUDIO_FORMAT_DOLBY_AC2
}
Audio Formats. More...
enum asxRECORD_MODE {
asxRECORD_MODE_STEREO = 10300, asxRECORD_MODE_JOINT_STEREO, asxRECORD_MODE_DUAL_MONO, asxRECORD_MODE_MONO,
asxRECORD_MODE_DONT_CARE
}
Record Mode. More...
enum asxPLAYER_STATE {
asxPLAYER_INIT = 10400, asxPLAYER_OPEN, asxPLAYER_RUNNING, asxPLAYER_PAUSED,
asxPLAYER_DONE
}
Player States. More...
enum asxRECORDER_STATE {
asxRECORDER_INIT = 10500, asxRECORDER_OPEN, asxRECORDER_RUNNING, asxRECORDER_PAUSED,
asxRECORDER_DONE
}
Recorder States. More...
enum | asxTIMESCALE { asxTIMESCALE_INVALID = 10600, asxTIMESCALE_BYTES, asxTIMESCALE_MILLISECONDS, asxTIMESCALE_SAMPLES }
TimeScale type identifiers. More...
enum asxTUNER_STATUS {
asxTUNER_STATUS_VIDEO_VALID = 1, asxTUNER_STATUS_VIDEO_COLOR_PRESENT = 2, asxTUNER_STATUS_VIDEO_IS_60HZ = 4, asxTUNER_STATUS_VIDEO_HORZ_SYNC_MISSING = 8,
asxTUNER_STATUS_PLL_LOCKED = 16, asxTUNER_STATUS_FM_STEREO = 32
}
Tuner status bitfields. Not translatable to strings. More...
enum asxAESEBU_STATUS {
asxAESEBU_ERROR = 0x01, asxAESEBU_ERROR_NOT_LOCKED = 0x02, asxAESEBU_ERROR_POOR_QUALITY = 0x04, asxAESEBU_ERROR_PARITY_ERROR = 0x08,
asxAESEBU_ERROR_BIPHASE_VIOLATION = 0x10, asxAESEBU_ERROR_VALIDITY = 0x20, asxAESEBU_ERROR_CHANNELSTATUS_CRC = 0x40
}
AESEBU status bitfields. Not translatable to strings. More...
enum | asxMETER_TYPE { asxMETER_PEAK, asxMETER_RMS }
Peak meter type to read. More...
enum | asxVOLUME_AUTOFADE { asxVOLUME_AUTOFADE_LOG, asxVOLUME_AUTOFADE_LINEAR }

Functions

ASX32_API ASX_ERROR | ASX_System_Create (const int asxSystemType, ASX_HANDLE *phSystem)
Create a complete ASX system.
ASX32_API ASX_ERROR | ASX_System_Delete (ASX_HANDLE hSystem)
Delete a complete ASX system.
ASX32_API ASX_ERROR | ASX_System_RegisterErrorCallback (ASX_HANDLE hSystem, ASX_ERROR_CALLBACK *pCallback, void *pUser1, void *pUser2)
Register a callback function that should be called when an error is detected.
ASX32_API ASX_ERROR | ASX_System_GetName (ASX_HANDLE hSystem, char *szString, const int nStringLength, int *pnRequiredLength)
Gets the name of the ASX system.
ASX32_API ASX_ERROR | ASX_System_GetVersion (ASX_HANDLE hSystem, char *pszSystemVersion, int nSystemVersionLength, int *pnRequiredSystemVersionLength, char *pszSubSystemVersion, int nSubSystemVersionLength, int *pnRequiredSubSystemVersionLength)
Get ASX system version information.
ASX32_API ASX_ERROR | ASX_System_GetAdapterCount (ASX_HANDLE hSystem, int *pnCount)
Get the number of adapters.
ASX32_API ASX_ERROR | ASX_System_GetAdapter (ASX_HANDLE hSystem, const int nAdapter, ASX_HANDLE *phAdapter)
Get a handle to a specific adapter.
ASX32_API ASX_ERROR | ASX_Error_GetLast (ASX_HANDLE hASXObject, ASX_ERROR *pnAsxErrorCode, int *pnAsxSubSystemErrorCode)
Get the last error.
ASX32_API ASX_ERROR | ASX_Error_GetLastString (ASX_HANDLE hASXObject, char *pszAsxErrorString, int nAsxErrorStringLength, int *pnRequiredAsxErrorStringLength, char *pszAsxSubSystemErrorString, int nAsxSubSystemErrorStringLength, int *pnRequiredAsxSubSystemErrorStringLength)
Get the last error string information.
ASX32_API ASX_ERROR | ASX_Adapter_GetName (ASX_HANDLE hAdapter, char *szString, const int nStringLength, int *RequiredLength)
Gets the name of the adapter.
ASX32_API ASX_ERROR | ASX_Adapter_GetMixer (ASX_HANDLE hAdapter, ASX_HANDLE *phMixer)
Gets a handle to an adapter's mixer.
ASX32_API ASX_ERROR | ASX_Mixer_GetSourceNodeCount (ASX_HANDLE hMixer, int *pnCount)
This function returns the nunber of source nodes in the mixer.
ASX32_API ASX_ERROR | ASX_Mixer_GetSourceNode (ASX_HANDLE hMixer, const int nSourceNode, ASX_HANDLE *phNode)
This function gets the handle of a particular source node.
ASX32_API ASX_ERROR | ASX_Mixer_GetDestinationNodeCount (ASX_HANDLE hMixer, int *pnCount)
This function returns the nunber of destination nodes in the mixer.
ASX32_API ASX_ERROR | ASX_Mixer_GetDestinationNode (ASX_HANDLE hMixer, const int nDestinationNode, ASX_HANDLE *phNode)
This function gets the handle of the specified destination node.
ASX32_API ASX_ERROR | ASX_Mixer_GetNodeByType (ASX_HANDLE hMixer, const enum asxNODE eType, const int nIndex, ASX_HANDLE *phNode)
Get a node by type.
ASX32_API ASX_ERROR | ASX_Mixer_GetNodeTypeCount (ASX_HANDLE hMixer, const enum asxNODE eType, int *pnCount)
Get the number of nodes of the specified type.
ASX32_API ASX_ERROR | ASX_Mixer_GetControlCount (ASX_HANDLE hMixer, int *pnControls)
This function returns the total number of controls in the mixer.
ASX32_API ASX_ERROR | ASX_Mixer_GetControl (ASX_HANDLE hMixer, const int nControl, ASX_HANDLE *phControl)
Given a control index, this function returns a handle to the specified control.
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 *phControl)
Given source and destination node handles as well as the control type, return the specified control.
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 *phControl)
Given source and destination node specifications as well as the control type, return the specified control.
ASX32_API ASX_ERROR | ASX_Mixer_GetNodeType (ASX_HANDLE hNode, enum asxNODE *peType)
Returns the node type of the given node.
ASX32_API ASX_ERROR | ASX_Mixer_GetNodeIndex (ASX_HANDLE hNode, int *pnIndex)
Returns the index of the given node.
ASX32_API ASX_ERROR | ASX_Control_GetType (ASX_HANDLE hControl, enum asxCONTROL *peControl)
Generic control function to get the type of a control.
ASX32_API ASX_ERROR | ASX_Control_GetSourceNode (ASX_HANDLE hControl, ASX_HANDLE *phNode)
Generic control function to get the source node of a control.
ASX32_API ASX_ERROR | ASX_Control_GetDestinationNode (ASX_HANDLE hControl, ASX_HANDLE *phNode)
Generic control function to get the destination node of a control.
ASX32_API ASX_ERROR | ASX_AdapterInfo_GetSerialNumber (ASX_HANDLE hAdapterInfo, unsigned long *pdwSerialNumber)
Gets an adapter's serial number.
ASX32_API ASX_ERROR | ASX_AdapterInfo_GetRevision (ASX_HANDLE hAdapterInfo, char *pszRevision, int nStringLength, int *pnRequiredLength)
Gets an adapter's revision.
ASX32_API ASX_ERROR | ASX_AdapterInfo_GetDspUtilization (ASX_HANDLE hAdapterInfo, int nDspIndex, int *pnDspUtilization)
Gets an adapter's DSP utilization.
ASX32_API ASX_ERROR | ASX_Player_Open (ASX_HANDLE hPlayer, const char *pszFile)
Open a file for playback.
ASX32_API ASX_ERROR | ASX_Player_Format_GetString (ASX_HANDLE hPlayer, char **pszFormat)
Get the format of the currently opened file as a string.
ASX32_API ASX_ERROR | ASX_Player_Format_GetDetails (ASX_HANDLE hPlayer, enum asxAUDIO_FORMAT *peFormat, int *pnChannnels, int *pnSampleRate, int *pnBitRate)
Get the format of the currently opened file as individual variables.
ASX32_API ASX_ERROR | ASX_Player_PreLoad (ASX_HANDLE hPlayer, enum asxTIMESCALE nType, const unsigned long lPosition)
Preloads playback buffers from the given position, ready for playback.
ASX32_API ASX_ERROR | ASX_Player_Start (ASX_HANDLE hPlayer)
Start playback of a previously opened (and optionally pre-loaded) file.
ASX32_API ASX_ERROR | ASX_Player_Pause (ASX_HANDLE hPlayer)
Pause playback of the currently playing file.
ASX32_API ASX_ERROR | ASX_Player_Stop (ASX_HANDLE hPlayer)
Stops playback of the currently playing file.
ASX32_API ASX_ERROR | ASX_Player_Wait (ASX_HANDLE hPlayer)
Wait for the current file to finish.
ASX32_API ASX_ERROR | ASX_Player_Close (ASX_HANDLE hPlayer)
Close the current playback file.
ASX32_API ASX_ERROR | ASX_Player_GetPosition (ASX_HANDLE hPlayer, enum asxTIMESCALE nType, unsigned long *plPosition)
Get the current playback position.
ASX32_API ASX_ERROR | ASX_Player_GetState (ASX_HANDLE hPlayer, enum asxPLAYER_STATE *pnState)
Get the current playback state.
ASX32_API ASX_ERROR | ASX_Player_SetTimeScale (ASX_HANDLE hPlayer, float fTimeScale)
Set the playback timescale.
ASX32_API ASX_ERROR | ASX_Player_GetTimeScale (ASX_HANDLE hPlayer, float *pfTimeScale)
Get the playback timescale.
ASX32_API ASX_ERROR | ASX_Player_GetFilename (ASX_HANDLE hPlayer, char *pszFilename, int nStringLength, int *pnRequiredLength)
Get the current filename, if any.
ASX32_API ASX_ERROR | ASX_Player_SetLoopMode (ASX_HANDLE hPlayer, int nLooping)
Set the player to loop or single play mode.
ASX32_API ASX_ERROR | ASX_Player_GetLoopMode (ASX_HANDLE hPlayer, int *pnLooping)
Get the current player loop mode.
ASX32_API ASX_ERROR | ASX_Recorder_Open (ASX_HANDLE hRecorder, const char *pszFile, enum asxFILE_FORMAT nFileType, enum asxFILE_MODE nFileMode, int nChannels, enum asxAUDIO_FORMAT nFormat, long lSampleRate, long lBitrate, enum asxRECORD_MODE nMode)
Opens the recorder using the specified format.
ASX32_API ASX_ERROR | ASX_Recorder_Start (ASX_HANDLE hRecorder)
Starts the recording.
ASX32_API ASX_ERROR | ASX_Recorder_Stop (ASX_HANDLE hRecorder)
Stops the recording.
ASX32_API ASX_ERROR | ASX_Recorder_Pause (ASX_HANDLE hRecorder)
Pauses the recording.
ASX32_API ASX_ERROR | ASX_Recorder_Close (ASX_HANDLE hRecorder)
Closes the recording file.
ASX32_API ASX_ERROR | ASX_Recorder_GetPosition (ASX_HANDLE hRecorder, enum asxTIMESCALE nType, unsigned long *plPosition)
Gets the current record position.
ASX32_API ASX_ERROR | ASX_Recorder_GetState (ASX_HANDLE hRecorder, enum asxRECORDER_STATE *peState)
Get the current record state.
ASX32_API ASX_ERROR | ASX_Recorder_GetFilename (ASX_HANDLE hRecorder, char *pszFilename, int nStringLength, int *pnRequiredLength)
Get the current filename, if any.
ASX32_API ASX_ERROR | ASX_Meter_GetChannels (ASX_HANDLE hMeter, int *pnChannels)
Returns the number of channels this peak meter has.
ASX32_API ASX_ERROR | ASX_Meter_GetPeak (ASX_HANDLE hMeter, float *fGetDb, const int nChannels)
Returns the peak meter reading for the given meter control.
ASX32_API ASX_ERROR | ASX_Meter_GetRMS (ASX_HANDLE hMeter, float *fGetDb, const int nChannels)
Returns the RMS meter reading for the given meter control.
ASX32_API ASX_ERROR | ASX_Meter_SetBallistics (ASX_HANDLE hMeter, enum asxMETER_TYPE nMeterType, float fAttackTimeMs, float fDecayTimeMs)
Set the meter ballistics.
ASX32_API ASX_ERROR | ASX_Volume_GetChannels (ASX_HANDLE hMeter, int *pnChannels)
Returns the number of channels this volume control has.
ASX32_API ASX_ERROR | ASX_Volume_SetGain (ASX_HANDLE hVolume, float *fSetGain, const int nChannels)
Set volume.
ASX32_API ASX_ERROR | ASX_Volume_GetGain (ASX_HANDLE hVolume, float *fGetGain, const int nChannels)
Get volume.
ASX32_API ASX_ERROR | ASX_Volume_GetRange (ASX_HANDLE hVolume, float *fMinGain, float *fMaxGain, float *fGainStep)
Get that range of volume settings available.
ASX32_API ASX_ERROR | ASX_Volume_SetAutofade (ASX_HANDLE hVolume, float *fSetGain, const int nChannels, ASX_TIME nDuration, enum asxVOLUME_AUTOFADE eProfile)
Set an autofade operation.
ASX32_API ASX_ERROR | ASX_Level_Set (ASX_HANDLE hLevel, float fGain)
Set the analog input or output level (sometimes called trim).
ASX32_API ASX_ERROR | ASX_Level_Get (ASX_HANDLE hLevel, float *fGain)
Get the analog input or output level (sometimes called trim).
ASX32_API ASX_ERROR | ASX_Multiplexer_Enumerate (ASX_HANDLE hMux, const int nIndex, enum asxNODE *peNode, int *pnNodeIndex, int *pnCount)
Enumerate each multiplexer option.
ASX32_API ASX_ERROR | ASX_Multiplexer_Get (ASX_HANDLE hMux, enum asxNODE *peNode, int *pnNodeIndex)
Get the current multiplexer setting.
ASX32_API ASX_ERROR | ASX_Multiplexer_Set (ASX_HANDLE hMux, const enum asxNODE eNode, const int nNodeIndex)
Set the multiplexer.
ASX32_API ASX_ERROR | ASX_ChannelMode_Enumerate (ASX_HANDLE hMode, const int nIndex, enum asxCHANNELMODE *peMode, int *pnCount)
Enumerate each channel mode option.
ASX32_API ASX_ERROR | ASX_ChannelMode_Get (ASX_HANDLE hMode, enum asxCHANNELMODE *peMode)
Get the current channel mode.
ASX32_API ASX_ERROR | ASX_ChannelMode_Set (ASX_HANDLE hMode, const enum asxCHANNELMODE eMode)
Set the current channel mode.
ASX32_API ASX_ERROR | ASX_AdapterMode_Enumerate (ASX_HANDLE hMode, const int nIndex, enum asxADAPTERMODE *peMode, int *pnCount)
Enumerate each adapter mode option.
ASX32_API ASX_ERROR | ASX_AdapterMode_Get (ASX_HANDLE hMode, enum asxADAPTERMODE *peMode)
Get the current adapter mode.
ASX32_API ASX_ERROR | ASX_AdapterMode_Set (ASX_HANDLE hMode, const enum asxADAPTERMODE eMode)
Set the current adapter mode.
ASX32_API ASX_ERROR | ASX_Tuner_EnumerateBand (ASX_HANDLE hTuner, const int nIndex, enum asxTUNERBAND *peBand, int *pnCount)
Enumerate each tuner band option.
ASX32_API ASX_ERROR | ASX_Tuner_GetBand (ASX_HANDLE hTuner, enum asxTUNERBAND *peBand)
Get the tuner band.
ASX32_API ASX_ERROR | ASX_Tuner_SetBand (ASX_HANDLE hTuner, const enum asxTUNERBAND eBand)
Set the tuner band.
ASX32_API ASX_ERROR | ASX_Tuner_SetFrequency (ASX_HANDLE hTuner, const unsigned long nFreq)
Set the tuner frequency.
ASX32_API ASX_ERROR | ASX_Tuner_GetFrequency (ASX_HANDLE hTuner, unsigned long *plFreq)
Get the tuner frequency.
ASX32_API ASX_ERROR | ASX_Tuner_GetGainRange (ASX_HANDLE hTuner, float *fMin, float *fMax, float *fStep)
Get the tuner gain range (in dB).
ASX32_API ASX_ERROR | ASX_Tuner_SetGain (ASX_HANDLE hTuner, const float fTunerGain)
Set the tuner gain.
ASX32_API ASX_ERROR | ASX_Tuner_GetGain (ASX_HANDLE hTuner, float *pfTunerGain)
Get the tuner gain.
ASX32_API ASX_ERROR | ASX_Tuner_GetRFLevel (ASX_HANDLE hTuner, float *nRFLevel)
Get the tuner RF level.
ASX32_API ASX_ERROR | ASX_Tuner_GetRawRFLevel (ASX_HANDLE hTuner, int *nRawRFLevel)
Get the Raw tuner RF level.
ASX32_API ASX_ERROR | ASX_Tuner_GetStatus (ASX_HANDLE hTuner, unsigned int *puErrorStatusMask, unsigned int *puErrorStatus)
Get the tuner status.
ASX32_API ASX_ERROR | ASX_Tuner_SetMode (ASX_HANDLE hTuner, const enum asxTUNERMODE eMode, const enum asxTUNERMODE eSetting)
Sets the tuner mode.
ASX32_API ASX_ERROR | ASX_SampleClock_SetSampleRate (ASX_HANDLE hSampleClock, const int nSampleRate)
Set the sample rate for the adapter.
ASX32_API ASX_ERROR | ASX_SampleClock_GetSampleRate (ASX_HANDLE hSampleClock, int *pnSampleRate)
Get the adapter's sample rate.
ASX32_API ASX_ERROR | ASX_SampleClock_EnumerateClockSource (ASX_HANDLE hSampleClock, const int nIndex, enum asxSAMPLE_CLOCK_SOURCE *peClockSource, int *pnCount)
Enumerate each sample clock source option.
ASX32_API ASX_ERROR | ASX_SampleClock_SetClockSource (ASX_HANDLE hSampleClock, const enum asxSAMPLE_CLOCK_SOURCE eClockSource)
Set the sample clock source.
ASX32_API ASX_ERROR | ASX_SampleClock_GetClockSource (ASX_HANDLE hSampleClock, enum asxSAMPLE_CLOCK_SOURCE *peClockSource)
Get the sample clock source.
ASX32_API ASX_ERROR | ASX_AESEBUReceiver_GetErrorStatus (ASX_HANDLE hAESEBURx, unsigned int *pdwErrorStatusMask, unsigned int *pdwErrorStatus)
Get the status of the AESEBU receiver.
ASX32_API ASX_ERROR | ASX_AESEBUReceiver_GetSampleRate (ASX_HANDLE hAESEBURx, unsigned int *pdwSampleRate)
Get the sample rate of the AESEBU receiver.
ASX32_API ASX_ERROR | ASX_AESEBUReceiver_SetDigitalMode (ASX_HANDLE hAESEBURx, const enum asxDIGITAL_MODE eDigitalMode)
Set the mode of the AESEBU receiver.
ASX32_API ASX_ERROR | ASX_AESEBUReceiver_GetDigitalMode (ASX_HANDLE hAESEBURx, enum asxDIGITAL_MODE *peDigitalMode)
Get the mode of the AESEBU receiver.
ASX32_API ASX_ERROR | ASX_AESEBUTransmitter_SetDigitalMode (ASX_HANDLE hAESEBUTx, const enum asxDIGITAL_MODE eDigitalMode)
Set the mode of the AESEBU transmitter.
ASX32_API ASX_ERROR | ASX_AESEBUTransmitter_GetDigitalMode (ASX_HANDLE hAESEBUTx, enum asxDIGITAL_MODE *peDigitalMode)
Get the mode of the AESEBU transmitter.
ASX32_API ASX_ERROR | ASX_GPIO_GetProperties (ASX_HANDLE hGPIO, int *pnNumberOfInputBits, int *pnNumberOfOutputBits)
Get the properties of the GPIO control.
ASX32_API ASX_ERROR | ASX_GPIO_InputGet (ASX_HANDLE hGPIO, int *pnBits, const int nNumberOfBits)
Read the state of the GPIO opto inputs.
ASX32_API ASX_ERROR | ASX_GPIO_OutputSet (ASX_HANDLE hGPIO, int *pnBits, const int nNumberOfBits)
Write to the GPIO relay outputs.
ASX32_API ASX_ERROR | ASX_NvMem_Write (ASX_HANDLE hNvMem, const int nAddress, const unsigned char cValue)
Write a byte to the non-volatile memory.
ASX32_API ASX_ERROR | ASX_NvMem_Read (ASX_HANDLE hNvMem, const int nAddress, unsigned char *pcValue)
Read a byte from the non-volatile memory.
ASX32_API ASX_ERROR | ASX_NvMem_GetSizeInBytes (ASX_HANDLE hNvMem, int *pnCount)
Get the number of bytes in the adapter's non-volatile memory.
ASX32_API ASX_ERROR | ASX_Vox_SetLevel (ASX_HANDLE hVox, float fSetLevel)
Set vox level.
ASX32_API ASX_ERROR | ASX_Vox_GetLevel (ASX_HANDLE hVox, float *fGetLevel)
Get vox level.
ASX32_API ASX_ERROR | ASX_Vox_GetRange (ASX_HANDLE hVox, float *fMinLevel, float *fMaxLevel, float *fLevelStep)
Get that range of vox settings available.
ASX32_API ASX_ERROR | ASX_GetGenericControlName (ASX_HANDLE hControl, char *pName)
Get the name of the control.

Define Documentation

#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.

#define ASX_LONG_STRING_SIZE (128)

Long string size for error strings and filenames.

#define ASX_SHORT_STRING_SIZE (32)

Short string size for adapter, node, control, enum translations.

#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_HPI 0

Use this to select ASI's HPI 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_PORTAUDIO 4

Use this to select the PortAudio 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_VERSION "294rc6"

Build version number.

Typedef Documentation

typedef void ASX_ERROR_CALLBACK(ASX_HANDLE hASX_Object, const char *pszCallingFunction, void *pUser1, void *pUser2)

An error handling callback function.

typedef unsigned int ASX_HANDLE

Generic handle used to represent all ASX objects.

typedef int ASX_TIME

Timescale.

Enumeration Type Documentation

enum asxADAPTERMODE

Adapter mode settings.

Enumeration values:
asxADAPTERMODE_ILLEGAL | Illegal adapter mode.
asxADAPTERMODE_4_PLAY | Adapter has 4 playback streams.
asxADAPTERMODE_6_PLAY | Adapter has 6 playback streams.
asxADAPTERMODE_8_PLAY | Adapter has 8 playback streams.
asxADAPTERMODE_16_PLAY | Adapter has 16 playback streams.
asxADAPTERMODE_1_PLAY | Adapter has 1 playback streams.
asxADAPTERMODE_MODE_1 | Adapter mode 1. Exact meaning depends on the adapter.
asxADAPTERMODE_MODE_2 | Adapter mode 2. Exact meaning depends on the adapter.
asxADAPTERMODE_MODE_3 | Adapter mode 3. Exact meaning depends on the adapter.
asxADAPTERMODE_MULTICHANNEL | Adapter set to handle streams with more than 2 channels.

enum asxAESEBU_STATUS

AESEBU status bitfields. Not translatable to strings.

Enumeration values:
asxAESEBU_ERROR | AESEBU error.
asxAESEBU_ERROR_NOT_LOCKED | AESEBU not locked to input signal.
asxAESEBU_ERROR_POOR_QUALITY | AESEBU signal is poor quality.
asxAESEBU_ERROR_PARITY_ERROR | AESEBU parity error was detected.
asxAESEBU_ERROR_BIPHASE_VIOLATION | AESEBU Biphase violation.
asxAESEBU_ERROR_VALIDITY | AESEBU validity error.
asxAESEBU_ERROR_CHANNELSTATUS_CRC | AESEBU channel status error.

enum asxAUDIO_FORMAT

Audio Formats.

Enumeration values:
asxAUDIO_FORMAT_PCM8 | 8-bit PCM, unsigned.
asxAUDIO_FORMAT_PCM16 | 16-bit PCM, signed.
asxAUDIO_FORMAT_PCM24 | 24-bit PCM, signed.
asxAUDIO_FORMAT_PCM32 | 32-bit PCM, signed.
asxAUDIO_FORMAT_PCM32_FLOAT | 32-bit PCM in IEEE float format.
asxAUDIO_FORMAT_MPEG_L2 | MPEG-1, Layer-II.
asxAUDIO_FORMAT_MPEG_L3 | MPEG-1, Layer-III, or "mp3".
asxAUDIO_FORMAT_MPEG_AACPLUS | AAC+.
asxAUDIO_FORMAT_DOLBY_AC2 | Dolby AC-2.

enum asxCHANNELMODE

Channel mode settings.

Enumeration values:
asxCHANNELMODE_ILLEGAL | Illegal channel mode.
asxCHANNELMODE_NORMAL | Normal mode. Left goes to left and right goes to right.
asxCHANNELMODE_SWAP | Channels are swapped. Left goes to right and right goes to left.
asxCHANNELMODE_STEREOTOLEFT | Both left and right channels are merged and output on left channel.
asxCHANNELMODE_STEREOTORIGHT | Both left and right channels are merged and output on the right channel.
asxCHANNELMODE_LEFTTOSTEREO | The left channel is converted to a stereo output. Right input channel is discarded.
asxCHANNELMODE_RIGHTTOSTEREO | The right channel is converted to a stereo output. Left input channel is discarded.

enum asxCONTROL

Control type identifiers. The control types are used to differentiate control capabilities.

Enumeration values:
asxCONTROL_INVALID | Placeholder that indicates an error.
asxCONTROL_CONNECTION | Documents a connection, no functionality.
asxCONTROL_VOLUME | A volume control. A large number of volume controls are used to control audio routing and mixing.
asxCONTROL_METER | A meter control. This is used to implement peak meter functionality.
asxCONTROL_MUTE | A mute control.
asxCONTROL_MULTIPLEXER | A multiplexer control allows the selection of a single audio source from many possible sources.
asxCONTROL_AESEBU_TRANSMITTER | An AESEBU transmitter control.
asxCONTROL_AESEBU_RECEIVER | An AESEBU receiver control.
asxCONTROL_LEVEL | A level/trim control for adjusting input and output levels.
asxCONTROL_TUNER | A tuner control.
asxCONTROL_ON_OFF_SWITCH | An on/off switch (not currently implemented).
asxCONTROL_VOX | A Vox control used to set record trigger level.
asxCONTROL_AES18_TRANSMITTER | An AES18 transmitter control.
asxCONTROL_AES18_RECEIVER | An AES18 receiver control.
asxCONTROL_AES18_BLOCK_GENERATOR | An AES18 block generator control.
asxCONTROL_CHANNEL_MODE | A channel mode control for adjusting audio routing.
asxCONTROL_BIT_STREAM | A bitstream control for setting raw bitstream clocking parameters.
asxCONTROL_SAMPLE_CLOCK | A sample clock control.
asxCONTROL_MICROPHONE | A microphone control.
asxCONTROL_PARAMETRIC_EQ | A parametric EQ control.
asxCONTROL_COMPANDER | A compander control.
asxCONTROL_PLAYER | A player control that can play audio files from disk.
asxCONTROL_RECORDER | A recorder control that can record audio files to disk.
asxCONTROL_GPIO | A general purpose input/output control that typically would manipulate relays and read opto inputs.
asxCONTROL_NV_MEM | A general non-volitale memory control that can use used to read and write an adapter's EEPROM.
asxCONTROL_ADAPTER_MODE | An adapter mode control.
asxCONTROL_ADAPTER_INFO | Adapter information control contains the serial number and adapter revision.
asxCONTROL_GENERIC | A generic control used as a placeholder during development.
asxCONTROL_LAST_CONTROL

enum asxDIGITAL_MODE

Enumeration values:
asxDIGITAL_MODE_AESEBU | Digital mode is set to AES/EBU (professional).
asxDIGITAL_MODE_SPDIF | Digital mode is set to S/PDIF (consumer).

enum asxERROR

ASX error codes. These error codes are returned by most ASX functions.

Enumeration values:
asxERROR_NO_ERROR | The success, or no error code is 0.
asxERROR_ASXOBJECT | An attempt was made to call an ASX function with an incorrect object handle.
asxERROR_INDEX_OUT_OF_RANGE | The index passed in to the function is out of range.
asxERROR_UNIMPLEMENTED | An attempt was made to call an un-implemented function.
asxERROR_COMMUNICATING_WITH_DEVICE | Device communication error.
asxERROR_STARTING_DEVICE | Device would not start. Typically this is a driver installation or hardware problem.
asxERROR_NOT_OPEN | An attempt was made to manipulate and ASX object that requires opening before use.
asxERROR_ALREADY_OPEN | An attempt was made to open an object that is already open.
asxERROR_INVALID_FORMAT | The format is illegal on this adapter. It may be the sample rate or the compression format that is illegal.
asxERROR_INTERNAL_BUFFERING_ERROR | Buffering error internal to the ASX library occurred.
asxERROR_AES18 | AES-18 signalling error.
asxERROR_INVALID_OPERATION | An attempt was made to perform an invalid operation.
asxERROR_ENUMERATE_INDEX_OUT_OF_RANGE | The index passed in to the enumeration function is too large.
asxERROR_BUFFER_TOO_SMALL | A buffer was passed to a function that was too small to hold the requested data.
asxERROR_OUTOFMEMORY | An internal system call to allocate memory failed.
asxERROR_INVALID_CONTROL | An attempt was made to use an invalid control.
asxERROR_INVALID_CONTROL_VALUE | An attempt was made to set a control to an invalid value.
asxERROR_INVALID_CONTROL_NOT_FOUND | The specified control could not be found.
asxERROR_INVALID_NUMBER_OF_CHANNELS | An invalid number of channels were passed in.
asxERROR_FILE_OPEN_FAILED | File open failed.
asxERROR_PLAYER_INTERNAL_STATE_FAILURE | Player control had an internal state error - contact AudioScience.
asxERROR_PLAYER_TIME_OUT | Player control had an internal timeout error - contact AudioScience.
asxERROR_PLAYER_OUT_OF_SEQUENCE_CALL | An attempt was made to perform an operation that is illegal in the current player state.
asxERROR_PLAYER_TWAV | Internal player error.
asxERROR_PLAYER_NOFILE | Operation requires an open filehandle and no file is open.
asxERROR_PLAYER_INVALIDFILEFORMAT | File is invalid or corrupt.
asxERROR_PLAYER_UNSUPPORTEDFORMAT | File is in an unsupported format.
asxERROR_PLAYER_FILEREADERROR | An error occured when reading the file.
asxERROR_PLAYER_FILEOPENERROR | Could not open the file. It may be missing.
asxERROR_RECORDER_INTERNAL_STATE_FAILURE | Recorder control had an internal state error - contact AudioScience.
asxERROR_RECORDER_TIME_OUT | Recorder control had an internal timeout error - contact AudioScience.
asxERROR_RECORDER_OUT_OF_SEQUENCE_CALL | An attempt was made to perform an operation that is illegal in the current recorder state.
asxERROR_RECORDER_TWAV | Internal recorder error.
asxERROR_RECORDER_FILECREATEERROR | Couldn't create file, could be write protected.
asxERROR_RECORDER_FILEWRITEERROR | An error occured when writing the file.
asxERROR_RECORDER_FORMATMISMATCH | Tried to append to a file with a different format.
asxERROR_RECORDER_INVALIDFILENAME | Tried to record a WAV file without the .WAV extension or tried to record a RAW file with the .WAV extention.
asxERROR_UNKNOWN | Unknown error.

enum asxFILE_FORMAT

File Formats.

Enumeration values:
asxFILE_FORMAT_WAV | Standard Windows .WAV soundfile.
asxFILE_FORMAT_RAW | Raw binary data (no format header).

enum asxFILE_MODE

File Mode.

Enumeration values:
asxFILE_MODE_CREATE | File is created, if it exists it is overwritten.
asxFILE_MODE_APPEND | File is appended if it exists, created if it doesn't.

enum asxNODE

Node type identifiers. The nodes identify how controls are connected and located. This enum is used to identify node types.

Enumeration values:
asxNODE_NONE | Node does not exist value.
asxNODE_INVALID | Node is invalid.
asxNODE_ADAPTER | An adapter node that contains controls like GPIO and NvMem.
asxNODE_PLAYER | A player source node. This node has the abiility to play audio files.
asxNODE_LINE_IN | An audio source coming from a line in audio connector.
asxNODE_DIGITAL_IN | An audio source coming from a digital input. Typically this will be an AESEBU/SPDIF connection.
asxNODE_TUNER_IN | An audio source coming from a tuner.
asxNODE_RADIO_FREQ_IN | Not implemented.
asxNODE_CLOCK_SOURCE_IN | A source for of adapter sample clock generation.
asxNODE_BITSTREAM_IN | 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 | An audio souce coming from a microphone.
asxNODE_LAST_SOURCE_NODE | A placekeeper marking the last source node.
asxNODE_RECORDER | A destination that indicates a path for recording audio to the host.
asxNODE_LINE_OUT | A destination that outputs to a line out audio connector.
asxNODE_DIGITAL_OUT | A destination that outputs to a digital out audio connector. Typically this will be an AESEBU/SPDIF connection.
asxNODE_RADIO_FREQ_OUT | Not implemented.
asxNODE_SPEAKER_OUT | A destination that outputs to a speaker.
asxNODE_LAST_DEST_NODE | A placekeeper marking the last destination node.

enum asxPLAYER_STATE

Player States.

Enumeration values:
asxPLAYER_INIT | Initialized state.
asxPLAYER_OPEN | Player is open.
asxPLAYER_RUNNING | Player is running, i.e. audio is playing.
asxPLAYER_PAUSED | Player is paused.
asxPLAYER_DONE | Player has completed playing a file.

enum asxRECORD_MODE

Record Mode.

Enumeration values:
asxRECORD_MODE_STEREO | MPEG-1 Layer-2 mode stereo.
asxRECORD_MODE_JOINT_STEREO | MPEG-1 Layer-2 mode joint stereo. This allows channels to be merged at some frequencies.
asxRECORD_MODE_DUAL_MONO | MPEG-1 Layer-2 mode dual mono. Maintain left and right channel separation. Requires a higher bitrate.
asxRECORD_MODE_MONO | MPEG-1 Layer-2 mode mono.
asxRECORD_MODE_DONT_CARE | Use this mode for PCM files and formats that don't have a "mode".

enum asxRECORDER_STATE

Recorder States.

Enumeration values:
asxRECORDER_INIT | Initialized state.
asxRECORDER_OPEN | Recorder is open.
asxRECORDER_RUNNING | Recorder is recording to a file.
asxRECORDER_PAUSED | Recorder is paused.
asxRECORDER_DONE | Recorder is halted and is no longer recording.

enum asxSAMPLE_CLOCK_SOURCE

Sample clock source options.

Enumeration values:
asxSAMPLE_CLOCK_SOURCE_ADAPTER | Sample clock source is that adpater's on-board clock generator.
asxSAMPLE_CLOCK_SOURCE_AESEBU | Sample clock source is derived an AESEBU input.
asxSAMPLE_CLOCK_SOURCE_WORD | Sample clock source is derived from external word clock connector.
asxSAMPLE_CLOCK_SOURCE_WORD_HEADER | Sample clock source is derived from word clock header on the adapter.
asxSAMPLE_CLOCK_SOURCE_SMPTE | Sample clock source is derived from SMPTE.

enum asxTIMESCALE

TimeScale type identifiers.

Enumeration values:
asxTIMESCALE_INVALID | Placeholder that indicates an error.
asxTIMESCALE_BYTES | Time scale is represented in bytes.
asxTIMESCALE_MILLISECONDS | Time scale is represented in milli-seconds.
asxTIMESCALE_SAMPLES | Time scale is represented in samples.

enum asxTUNER_STATUS

Tuner status bitfields. Not translatable to strings.

Enumeration values:
asxTUNER_STATUS_VIDEO_VALID | Video valid.
asxTUNER_STATUS_VIDEO_COLOR_PRESENT | Color present.
asxTUNER_STATUS_VIDEO_IS_60HZ | Video is 60 Hz.
asxTUNER_STATUS_VIDEO_HORZ_SYNC_MISSING | Horizontal sync is missing.
asxTUNER_STATUS_PLL_LOCKED | The tuners PLL is locked onto a signal.
asxTUNER_STATUS_FM_STEREO | An FM stereo signal has been detected.

enum asxTUNERBAND

Tuner band settings.

Enumeration values:
asxTUNERBAND_AM | Tuner band AM.
asxTUNERBAND_FM | Tuner band FM.
asxTUNERBAND_TV | Tuner band TV (NTSC North America).
asxTUNERBAND_FM_STEREO | Tuner band stereo FM.

enum asxTUNERMODE

Tuner mode settings.

Enumeration values:
asxTUNERMODE_RSS | Tuner mode RSS.
asxTUNERMODE_RSS_ENABLE | Tuner mode RSS is enabled.
asxTUNERMODE_RSS_DISABLE | Tuner mode RSS is disabled.

Generated on Wed Mar 9 16:02:34 2005 for ASX by doxygen 1.3.9.1


ASX: asxstring.h File Reference

asxstring.h File Reference

Go to the source code of this file.

Functions

ASX32_API int ASXSTRING_EnumToString (const int nEnum, char *szString, const int nLength, int *pRequiredLength)
Translate an ASX enum into a string.

Function Documentation

ASX32_API int ASXSTRING_EnumToString | ( | const int | nEnum,
 |  | char * | szString,
 |  | const int | nLength,
 |  | int * | pRequiredLength
 | ) |

Translate an ASX enum into a string.

Parameters:
nEnum | The enum value to translate.
szString | The returned string is copied here. The caller should allocate enough memory to hold the returned string. Call this function with szString=0 and check the RequiredLength field to determine how much memory to allocate.
nLength | The length of szString.
pRequiredLength | The required minimum length of the caller's char array.
Returns:
Returns 0 on success.
Examples:
dual_mono_record/main.c, mixer/main.c, mux/main.c, play/main.c, and tuner/main.c.

Generated on Wed Mar 9 16:02:34 2005 for ASX by doxygen 1.3.9.1


ASX: Module Index

ASX Modules

Here is a list of all modules:
  • System functions.
  • Adapter functions
  • Mixer functions
  • Node functions
  • Control generic functions
  • Adapter information control functions
  • Player control functions
  • Recorder control functions
  • Meter control functions
  • Volume control functions
  • Level control functions.
  • Multiplexer control functions.
  • Channel Mode control functions.
  • Adapter Mode control functions.
  • Tuner control functions.
  • Sample clock control functions.
  • AESEBU receiver control functions.
  • AESEBU transmitter control functions.
  • GPIO control functions.
  • Non-volatile memory control functions.
  • Vox control functions
  • Generic control functions
Generated on Wed Mar 9 16:02:40 2005 for ASX by doxygen 1.3.9.1


ASX: System functions.

System functions.

Functions

ASX32_API ASX_ERROR | ASX_System_Create (const int asxSystemType, ASX_HANDLE *phSystem)
Create a complete ASX system.
ASX32_API ASX_ERROR | ASX_System_Delete (ASX_HANDLE hSystem)
Delete a complete ASX system.
ASX32_API ASX_ERROR | ASX_System_RegisterErrorCallback (ASX_HANDLE hSystem, ASX_ERROR_CALLBACK *pCallback, void *pUser1, void *pUser2)
Register a callback function that should be called when an error is detected.
ASX32_API ASX_ERROR | ASX_System_GetName (ASX_HANDLE hSystem, char *szString, const int nStringLength, int *pnRequiredLength)
Gets the name of the ASX system.
ASX32_API ASX_ERROR | ASX_System_GetVersion (ASX_HANDLE hSystem, char *pszSystemVersion, int nSystemVersionLength, int *pnRequiredSystemVersionLength, char *pszSubSystemVersion, int nSubSystemVersionLength, int *pnRequiredSubSystemVersionLength)
Get ASX system version information.
ASX32_API ASX_ERROR | ASX_System_GetAdapterCount (ASX_HANDLE hSystem, int *pnCount)
Get the number of adapters.
ASX32_API ASX_ERROR | ASX_System_GetAdapter (ASX_HANDLE hSystem, const int nAdapter, ASX_HANDLE *phAdapter)
Get a handle to a specific adapter.
ASX32_API ASX_ERROR | ASX_Error_GetLast (ASX_HANDLE hASXObject, ASX_ERROR *pnAsxErrorCode, int *pnAsxSubSystemErrorCode)
Get the last error.
ASX32_API ASX_ERROR | ASX_Error_GetLastString (ASX_HANDLE hASXObject, char *pszAsxErrorString, int nAsxErrorStringLength, int *pnRequiredAsxErrorStringLength, char *pszAsxSubSystemErrorString, int nAsxSubSystemErrorStringLength, int *pnRequiredAsxSubSystemErrorStringLength)
Get the last error string information.

Function Documentation

ASX32_API ASX_ERROR ASX_Error_GetLast | ( | ASX_HANDLE | hASXObject,
 |  | ASX_ERROR * | pnAsxErrorCode,
 |  | int * | pnAsxSubSystemErrorCode
 | ) |

Get the last error.

This function returns error information for the last error generated by hASXObject.

Parameters:
hASXObject | The ASX object handle that generated the error. This can be any ASX object.
pnAsxErrorCode | The returned ASX error code. If this parameter is set to 0, it will be ignored.
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.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
adapter/main.c, dual_mono_record/main.c, mixer/main.c, mux/main.c, play/main.c, record/main.c, system/main.c, and tuner/main.c.

ASX32_API ASX_ERROR ASX_Error_GetLastString | ( | ASX_HANDLE | hASXObject,
 |  | char * | pszAsxErrorString,
 |  | int | nAsxErrorStringLength,
 |  | int * | pnRequiredAsxErrorStringLength,
 |  | char * | pszAsxSubSystemErrorString,
 |  | int | nAsxSubSystemErrorStringLength,
 |  | int * | pnRequiredAsxSubSystemErrorStringLength
 | ) |

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.

Parameters:
hASXObject | The ASX object handle that generated the error. This can be any ASX object.
pszAsxErrorString | The returned ASX error string. If this parameter is set to 0, it will be ignored.
nAsxErrorStringLength | The length of pszAsxErrorString on bytes.
pnRequiredAsxErrorStringLength | The required length of pszAsxErrorString in bytes.
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.
nAsxSubSystemErrorStringLength | The length of pszAsxSubSystemErrorString in bytes.
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.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
adapter/main.c, dual_mono_record/main.c, mixer/main.c, mux/main.c, play/main.c, record/main.c, system/main.c, and tuner/main.c.

ASX32_API ASX_ERROR ASX_System_Create | ( | const int | asxSystemType,
 |  | ASX_HANDLE * | phSystem
 | ) |

Create a complete ASX system.

This function creates a complete ASX interface of the type specified by asxSystemType.

Parameters:
asxSystemType The ASX system type to open. One of
  • ASX_SYSTEM_TYPE_HPI
  • ASX_SYSTEM_TYPE_WAVE
  • ASX_SYSTEM_TYPE_ALSA
  • ASX_SYSTEM_TYPE_DIRECTX
  • #ASX_SYSTEM_TYPE_PORTCLS
  • ASX_SYSTEM_TYPE_PCXTOOLS defines above.
phSystem Pointer to the returned system handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
adapter/main.c, dual_mono_record/main.c, mixer/main.c, mux/main.c, play/main.c, record/main.c, system/main.c, and tuner/main.c.

ASX32_API ASX_ERROR ASX_System_Delete ( ASX_HANDLE hSystem )

Delete a complete ASX system.

The delete function should be called using a previously opened ASX system handle prior to closing an application.

Parameters:
hSystem The asx system handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
adapter/main.c, dual_mono_record/main.c, mixer/main.c, mux/main.c, play/main.c, record/main.c, system/main.c, and tuner/main.c.

ASX32_API ASX_ERROR ASX_System_GetAdapter | ( | ASX_HANDLE | hSystem,
 |  | const int | nAdapter,
 |  | ASX_HANDLE * | phAdapter
 | ) |

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.

Parameters:
hSystem | A handle to an ASX system object.
nAdapter | The index of the adapter.
phAdapter | The retuned adapter handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
adapter/main.c, dual_mono_record/main.c, mixer/main.c, mux/main.c, play/main.c, record/main.c, and tuner/main.c.

ASX32_API ASX_ERROR ASX_System_GetAdapterCount | ( | ASX_HANDLE | hSystem,
 |  | int * | pnCount
 | ) |

Get the number of adapters.

This function returns the number of recognized sound cards installed in the computer.

Parameters:
hSystem | A handle to an ASX system object.
pnCount | The returned number of adapters.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
adapter/main.c, and system/main.c.

ASX32_API ASX_ERROR ASX_System_GetName | ( | ASX_HANDLE | hSystem,
 |  | char * | szString,
 |  | const int | nStringLength,
 |  | int * | pnRequiredLength
 | ) |

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.

Parameters:
hSystem | The asx system handle.
szString The string to use to copy the returned adapter name to. Typical return values are:
  • "HPI"
  • "Wave"
  • "DirectX"
  • "PortAudio"
  • "ALSA"
nStringLength | The length of the string szString that was passed in.
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.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
system/main.c.

ASX32_API ASX_ERROR ASX_System_GetVersion | ( | ASX_HANDLE | hSystem,
 |  | char * | pszSystemVersion,
 |  | int | nSystemVersionLength,
 |  | int * | pnRequiredSystemVersionLength,
 |  | char * | pszSubSystemVersion,
 |  | int | nSubSystemVersionLength,
 |  | int * | pnRequiredSubSystemVersionLength
 | ) |

Get ASX system version information.

This function returns version information in two strings.

Parameters:
hSystem | A handle to an ASX system object.
pszSystemVersion | The ASX version returned as a string.
nSystemVersionLength | The length of pszSystemVersion in bytes.
pnRequiredSystemVersionLength | The minimum required length of pszSystemVersion in bytes.
pszSubSystemVersion | The ASX subsystem version returned as a string. This is the version number of the HPI,Wave or ALSA (etc.) driver.
nSubSystemVersionLength | The length in bytes of pszSubSystemVersion.
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.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
system/main.c.

ASX32_API ASX_ERROR ASX_System_RegisterErrorCallback | ( | ASX_HANDLE | hSystem,
 |  | ASX_ERROR_CALLBACK * | pCallback,
 |  | void * | pUser1,
 |  | void * | pUser2
 | ) |

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.

Parameters:
hSystem | A handle to an ASX system object.
pCallback | A pointer to a callback of type ASX_ERROR_CALLBACK.
pUser1 | A user defined pointer that is passed back when an error occurs.
pUser2 | A user defined pointer that is passed back when an error occurs.

Generated on Wed Mar 9 16:02:34 2005 for ASX by doxygen 1.3.9.1


ASX: Adapter functions

Adapter functions

Detailed Description

The adapter functions are used to obtain adapter information and access the mixer.

Functions

ASX32_API ASX_ERROR | ASX_Adapter_GetName (ASX_HANDLE hAdapter, char *szString, const int nStringLength, int *RequiredLength)
Gets the name of the adapter.
ASX32_API ASX_ERROR | ASX_Adapter_GetMixer (ASX_HANDLE hAdapter, ASX_HANDLE *phMixer)
Gets a handle to an adapter's mixer.

Function Documentation

ASX32_API ASX_ERROR ASX_Adapter_GetMixer | ( | ASX_HANDLE | hAdapter,
 |  | ASX_HANDLE * | phMixer
 | ) |

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.

Parameters:
hAdapter | A handle to an ASX adapter object.
phMixer | The retuned mixer handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
adapter/main.c, dual_mono_record/main.c, mixer/main.c, mux/main.c, play/main.c, record/main.c, and tuner/main.c.

ASX32_API ASX_ERROR ASX_Adapter_GetName | ( | ASX_HANDLE | hAdapter,
 |  | char * | szString,
 |  | const int | nStringLength,
 |  | int * | RequiredLength
 | ) |

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.

Parameters:
hAdapter | A handle to an ASX adapter object.
szString | The string to use to copy the returned adapter name to.
nStringLength | The length of szString in bytes.
RequiredLength | The minimum required length of szString in bytes.
Note:
This function can be called will szString=0 and nStringLength=0 to retrieve the required string size in bytes.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
adapter/main.c, dual_mono_record/main.c, mixer/main.c, mux/main.c, play/main.c, and tuner/main.c.

Generated on Wed Mar 9 16:02:35 2005 for ASX by doxygen 1.3.9.1


ASX: Mixer functions

Mixer functions

Detailed Description

The mixer functions are used to access mixer nodes and controls.

Functions

ASX32_API ASX_ERROR | ASX_Mixer_GetSourceNodeCount (ASX_HANDLE hMixer, int *pnCount)
This function returns the nunber of source nodes in the mixer.
ASX32_API ASX_ERROR | ASX_Mixer_GetSourceNode (ASX_HANDLE hMixer, const int nSourceNode, ASX_HANDLE *phNode)
This function gets the handle of a particular source node.
ASX32_API ASX_ERROR | ASX_Mixer_GetDestinationNodeCount (ASX_HANDLE hMixer, int *pnCount)
This function returns the nunber of destination nodes in the mixer.
ASX32_API ASX_ERROR | ASX_Mixer_GetDestinationNode (ASX_HANDLE hMixer, const int nDestinationNode, ASX_HANDLE *phNode)
This function gets the handle of the specified destination node.
ASX32_API ASX_ERROR | ASX_Mixer_GetNodeByType (ASX_HANDLE hMixer, const enum asxNODE eType, const int nIndex, ASX_HANDLE *phNode)
Get a node by type.
ASX32_API ASX_ERROR | ASX_Mixer_GetNodeTypeCount (ASX_HANDLE hMixer, const enum asxNODE eType, int *pnCount)
Get the number of nodes of the specified type.
ASX32_API ASX_ERROR | ASX_Mixer_GetControlCount (ASX_HANDLE hMixer, int *pnControls)
This function returns the total number of controls in the mixer.
ASX32_API ASX_ERROR | ASX_Mixer_GetControl (ASX_HANDLE hMixer, const int nControl, ASX_HANDLE *phControl)
Given a control index, this function returns a handle to the specified control.
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 *phControl)
Given source and destination node handles as well as the control type, return the specified control.
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 *phControl)
Given source and destination node specifications as well as the control type, return the specified control.

Function Documentation

ASX32_API ASX_ERROR ASX_Mixer_GetControl | ( | ASX_HANDLE | hMixer,
 |  | const int | nControl,
 |  | ASX_HANDLE * | phControl
 | ) |

Given a control index, this function returns a handle to the specified control.

Parameters:
hMixer | A handle to an ASX mixer object.
nControl | The index of the control handle to return.
phControl | The returned ASX control handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mixer/main.c.

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 * | phControl
 | ) |

Given source and destination node handles as well as the control type, return the specified control.

Parameters:
hMixer | A handle to an ASX mixer object.
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.
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.
eControlType | The control type. Should be set to one of asxCONTROL.
phControl | The returned ASX control handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mixer/main.c.

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 * | phControl
 | ) |

Given source and destination node specifications as well as the control type, return the specified control.

Parameters:
hMixer | A handle to an ASX mixer object.
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.
nSourceIndex | The source node index. This may be set to 0 if the requested control does not have a source node.
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.
nDestinationIndex | The destination node index. This may be set to 0 if the requested control does not have a destination node.
eControlType | The control type. Should be set to one of asxCONTROL.
phControl | The returned ASX control handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
adapter/main.c, dual_mono_record/main.c, mixer/main.c, mux/main.c, play/main.c, record/main.c, and tuner/main.c.

ASX32_API ASX_ERROR ASX_Mixer_GetControlCount | ( | ASX_HANDLE | hMixer,
 |  | int * | pnControls
 | ) |

This function returns the total number of controls in the mixer.

Parameters:
hMixer | A handle to an ASX mixer object.
pnControls | The returned number of controls.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mixer/main.c.

ASX32_API ASX_ERROR ASX_Mixer_GetDestinationNode | ( | ASX_HANDLE | hMixer,
 |  | const int | nDestinationNode,
 |  | ASX_HANDLE * | phNode
 | ) |

This function gets the handle of the specified destination node.

Parameters:
hMixer | A handle to an ASX mixer object.
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().
phNode | The returned destination node handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mixer/main.c.

ASX32_API ASX_ERROR ASX_Mixer_GetDestinationNodeCount | ( | ASX_HANDLE | hMixer,
 |  | int * | pnCount
 | ) |

This function returns the nunber of destination nodes in the mixer.

Parameters:
hMixer | A handle to an ASX mixer object.
pnCount | The retuned number of destination nodes.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mixer/main.c.

ASX32_API ASX_ERROR ASX_Mixer_GetNodeByType | ( | ASX_HANDLE | hMixer,
 |  | const enum asxNODE | eType,
 |  | const int | nIndex,
 |  | ASX_HANDLE * | phNode
 | ) |

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.

Parameters:
hMixer | A handle to an ASX mixer object.
eType | The node type to get. This should be set to one of asxNODE.
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.
phNode | The returned destination node handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mixer/main.c.

ASX32_API ASX_ERROR ASX_Mixer_GetNodeTypeCount | ( | ASX_HANDLE | hMixer,
 |  | const enum asxNODE | eType,
 |  | int * | pnCount
 | ) |

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.

Parameters:
hMixer | A handle to an ASX mixer object.
eType | The node type to get. This should be set to one of asxNODE.
pnCount | The retunred number of nodes of type nType.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mixer/main.c.

ASX32_API ASX_ERROR ASX_Mixer_GetSourceNode | ( | ASX_HANDLE | hMixer,
 |  | const int | nSourceNode,
 |  | ASX_HANDLE * | phNode
 | ) |

This function gets the handle of a particular source node.

Parameters:
hMixer | A handle to an ASX mixer object.
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().
phNode | The returned source node handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mixer/main.c.

ASX32_API ASX_ERROR ASX_Mixer_GetSourceNodeCount | ( | ASX_HANDLE | hMixer,
 |  | int * | pnCount
 | ) |

This function returns the nunber of source nodes in the mixer.

Parameters:
hMixer | A handle to an ASX mixer object.
pnCount | The retuned number of source nodes.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mixer/main.c.

Generated on Wed Mar 9 16:02:35 2005 for ASX by doxygen 1.3.9.1


ASX: Node functions

Node functions

Detailed Description

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.

Functions

ASX32_API ASX_ERROR | ASX_Mixer_GetNodeType (ASX_HANDLE hNode, enum asxNODE *peType)
Returns the node type of the given node.
ASX32_API ASX_ERROR | ASX_Mixer_GetNodeIndex (ASX_HANDLE hNode, int *pnIndex)
Returns the index of the given node.

Function Documentation

ASX32_API ASX_ERROR ASX_Mixer_GetNodeIndex | ( | ASX_HANDLE | hNode,
 |  | int * | pnIndex
 | ) |

Returns the index of the given node.

Parameters:
hNode | A handle to an ASX node object.
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.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mixer/main.c.

ASX32_API ASX_ERROR ASX_Mixer_GetNodeType | ( | ASX_HANDLE | hNode,
 |  | enum asxNODE * | peType
 | ) |

Returns the node type of the given node.

Parameters:
hNode | A handle to an ASX node object.
peType | The returned ASX node type. This will below to one of asxNODE.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mixer/main.c.

Generated on Wed Mar 9 16:02:35 2005 for ASX by doxygen 1.3.9.1


ASX: Control generic functions

Control generic functions

Detailed Description

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.

Functions

ASX32_API ASX_ERROR | ASX_Control_GetType (ASX_HANDLE hControl, enum asxCONTROL *peControl)
Generic control function to get the type of a control.
ASX32_API ASX_ERROR | ASX_Control_GetSourceNode (ASX_HANDLE hControl, ASX_HANDLE *phNode)
Generic control function to get the source node of a control.
ASX32_API ASX_ERROR | ASX_Control_GetDestinationNode (ASX_HANDLE hControl, ASX_HANDLE *phNode)
Generic control function to get the destination node of a control.

Function Documentation

ASX32_API ASX_ERROR ASX_Control_GetDestinationNode | ( | ASX_HANDLE | hControl,
 |  | ASX_HANDLE * | phNode
 | ) |

Generic control function to get the destination node of a control.

Parameters:
hControl | A handle to an ASX control object.
phNode | The destination node ASX object handle. This can be zero if the control does not have a destination node.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mixer/main.c.

ASX32_API ASX_ERROR ASX_Control_GetSourceNode | ( | ASX_HANDLE | hControl,
 |  | ASX_HANDLE * | phNode
 | ) |

Generic control function to get the source node of a control.

Parameters:
hControl | A handle to an ASX control object.
phNode | The source node ASX object handle. This can be zero if the control does not have a source node.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mixer/main.c.

ASX32_API ASX_ERROR ASX_Control_GetType | ( | ASX_HANDLE | hControl,
 |  | enum asxCONTROL * | peControl
 | ) |

Generic control function to get the type of a control.

Parameters:
hControl | A handle to an ASX control object.
peControl | The returned control type will be one of asxCONTROL.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
dual_mono_record/main.c, mixer/main.c, mux/main.c, play/main.c, and tuner/main.c.

Generated on Wed Mar 9 16:02:35 2005 for ASX by doxygen 1.3.9.1


ASX: Adapter information control functions

Adapter information control functions

Detailed Description

These functions support collecting information on an adapter.

Functions

ASX32_API ASX_ERROR | ASX_AdapterInfo_GetSerialNumber (ASX_HANDLE hAdapterInfo, unsigned long *pdwSerialNumber)
Gets an adapter's serial number.
ASX32_API ASX_ERROR | ASX_AdapterInfo_GetRevision (ASX_HANDLE hAdapterInfo, char *pszRevision, int nStringLength, int *pnRequiredLength)
Gets an adapter's revision.
ASX32_API ASX_ERROR | ASX_AdapterInfo_GetDspUtilization (ASX_HANDLE hAdapterInfo, int nDspIndex, int *pnDspUtilization)
Gets an adapter's DSP utilization.

Function Documentation

ASX32_API ASX_ERROR ASX_AdapterInfo_GetDspUtilization | ( | ASX_HANDLE | hAdapterInfo,
 |  | int | nDspIndex,
 |  | int * | pnDspUtilization
 | ) |

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.
Parameters:
hAdapterInfo | A handle to an ASX adapter object.
nDspIndex | The DSP index. On adapters with more than one DSP, all DSPs can be accessed using this index field.
pnDspUtilization | The returned DSP utilization in percent.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
adapter/main.c.

ASX32_API ASX_ERROR ASX_AdapterInfo_GetRevision | ( | ASX_HANDLE | hAdapterInfo,
 |  | char * | pszRevision,
 |  | int | nStringLength,
 |  | int * | pnRequiredLength
 | ) |

Gets an adapter's 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.
Parameters:
hAdapterInfo | A handle to an ASX adapter object.
pszRevision | The returned pointer to the adapter revision string.
nStringLength | The length in bytes of pszRevision.
pnRequiredLength | The required length in bytes of pszRevision.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
adapter/main.c.

ASX32_API ASX_ERROR ASX_AdapterInfo_GetSerialNumber | ( | ASX_HANDLE | hAdapterInfo,
 |  | unsigned long * | pdwSerialNumber
 | ) |

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.

Parameters:
hAdapterInfo | A handle to an ASX adapter object.
pdwSerialNumber | The returned serial number.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
adapter/main.c.

Generated on Wed Mar 9 16:02:35 2005 for ASX by doxygen 1.3.9.1


ASX: Player control functions

Player control functions

Detailed Description

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:
asxFILE_FORMAT | _WAV | _RAW
Filename Extension | .WAV | any
_PCM8 or _PCM16 | supported | write only
_PCM24 or _PCM32 | supported | write only
_PCM32_FLOAT | supported | write only
_MPEG_L2 | supported | supported
_MPEG_L3 | supported | supported
_MPEG_AACPLUS | not supported yet | not supported yet
_DOLBY_AC2 | not supported yet | not supported yet
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 ASX Player State Diagram.

Functions

ASX32_API ASX_ERROR | ASX_Player_Open (ASX_HANDLE hPlayer, const char *pszFile)
Open a file for playback.
ASX32_API ASX_ERROR | ASX_Player_Format_GetString (ASX_HANDLE hPlayer, char **pszFormat)
Get the format of the currently opened file as a string.
ASX32_API ASX_ERROR | ASX_Player_Format_GetDetails (ASX_HANDLE hPlayer, enum asxAUDIO_FORMAT *peFormat, int *pnChannnels, int *pnSampleRate, int *pnBitRate)
Get the format of the currently opened file as individual variables.
ASX32_API ASX_ERROR | ASX_Player_PreLoad (ASX_HANDLE hPlayer, enum asxTIMESCALE nType, const unsigned long lPosition)
Preloads playback buffers from the given position, ready for playback.
ASX32_API ASX_ERROR | ASX_Player_Start (ASX_HANDLE hPlayer)
Start playback of a previously opened (and optionally pre-loaded) file.
ASX32_API ASX_ERROR | ASX_Player_Pause (ASX_HANDLE hPlayer)
Pause playback of the currently playing file.
ASX32_API ASX_ERROR | ASX_Player_Stop (ASX_HANDLE hPlayer)
Stops playback of the currently playing file.
ASX32_API ASX_ERROR | ASX_Player_Wait (ASX_HANDLE hPlayer)
Wait for the current file to finish.
ASX32_API ASX_ERROR | ASX_Player_Close (ASX_HANDLE hPlayer)
Close the current playback file.
ASX32_API ASX_ERROR | ASX_Player_GetPosition (ASX_HANDLE hPlayer, enum asxTIMESCALE nType, unsigned long *plPosition)
Get the current playback position.
ASX32_API ASX_ERROR | ASX_Player_GetState (ASX_HANDLE hPlayer, enum asxPLAYER_STATE *pnState)
Get the current playback state.
ASX32_API ASX_ERROR | ASX_Player_SetTimeScale (ASX_HANDLE hPlayer, float fTimeScale)
Set the playback timescale.
ASX32_API ASX_ERROR | ASX_Player_GetTimeScale (ASX_HANDLE hPlayer, float *pfTimeScale)
Get the playback timescale.
ASX32_API ASX_ERROR | ASX_Player_GetFilename (ASX_HANDLE hPlayer, char *pszFilename, int nStringLength, int *pnRequiredLength)
Get the current filename, if any.
ASX32_API ASX_ERROR | ASX_Player_SetLoopMode (ASX_HANDLE hPlayer, int nLooping)
Set the player to loop or single play mode.
ASX32_API ASX_ERROR | ASX_Player_GetLoopMode (ASX_HANDLE hPlayer, int *pnLooping)
Get the current player loop mode.

Function Documentation

ASX32_API ASX_ERROR ASX_Player_Close ( ASX_HANDLE hPlayer )

Close the current playback file.

Parameters:
hPlayer A handle to an ASX player control object.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
play/main.c.

ASX32_API ASX_ERROR ASX_Player_Format_GetDetails | ( | ASX_HANDLE | hPlayer,
 |  | enum asxAUDIO_FORMAT * | peFormat,
 |  | int * | pnChannnels,
 |  | int * | pnSampleRate,
 |  | int * | pnBitRate
 | ) |

Get the format of the currently opened file as individual variables.

Parameters:
hPlayer | A handle to an ASX player control object.
peFormat | The returned format code - see asxAUDIO_FORMAT.
pnChannnels | The returned number of channels.
pnSampleRate | The returned sample rate.
pnBitRate | The returned bitrate.
Returns:
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 a string.

Parameters:
hPlayer | A handle to an ASX player control object.
pszFormat | The returned pointer to a format string.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
play/main.c.

ASX32_API ASX_ERROR ASX_Player_GetFilename | ( | ASX_HANDLE | hPlayer,
 |  | char * | pszFilename,
 |  | int | nStringLength,
 |  | int * | pnRequiredLength
 | ) |

Get the current filename, if any.

Parameters:
hPlayer | A handle to an ASX player control object.
pszFilename | The returned pointer to the filename.
nStringLength | The length in bytes of pszFilename.
pnRequiredLength | The required length in bytes of pszRevision.
Returns:
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
 | ) |

Get the current player loop mode.

Parameters:
hPlayer | A handle to an ASX player control object.
pnLooping | Pointer to return value: 1 for looping, 0 for single play.
Returns:
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_GetPosition | ( | ASX_HANDLE | hPlayer,
 |  | enum asxTIMESCALE | nType,
 |  | unsigned long * | plPosition
 | ) |

Get the current playback position.

This function returns the relative playback position since the file start playing. The position is relative to the position at which playback was started.

Parameters:
hPlayer | A handle to an ASX player control object.
nType | The units to return the position in (see asxTIMESCALE).
plPosition | The current relative playback position.
Returns:
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
 | ) |

Get the current playback state.

Parameters:
hPlayer | A handle to an ASX player control object.
pnState | The current player state. See asxPLAYER_STATE.
Returns:
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 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.
Parameters:
hPlayer | A handle to an ASX player control object.
pfTimeScale | Pointer to the returned time scale. Range is 0.8 < fTimeScale < 1.2.
Returns:
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
 | ) |

Open a file for playback.

Parameters:
hPlayer | A handle to an ASX player control object.
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.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
play/main.c.

ASX32_API ASX_ERROR ASX_Player_Pause ( 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.

Parameters:
hPlayer A handle to an ASX player control object.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_Player_PreLoad | ( | ASX_HANDLE | hPlayer,
 |  | enum asxTIMESCALE | nType,
 |  | const unsigned long | lPosition
 | ) |

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.
Parameters:
hPlayer | A handle to an ASX player control object.
nType | The units of lPosition (see asxTIMESCALE).
lPosition | The position to start playback from. A value of zero start from the beginning of the file.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
play/main.c.

ASX32_API ASX_ERROR ASX_Player_SetLoopMode | ( | ASX_HANDLE | hPlayer,
 |  | int | nLooping
 | ) |

Set the player to loop or single play mode.

Parameters:
hPlayer | A handle to an ASX player control object.
nLooping | 1 for looping, 0 for single play.
Returns:
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_SetTimeScale | ( | ASX_HANDLE | hPlayer,
 |  | float | fTimeScale
 | ) |

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.
Parameters:
hPlayer | A handle to an ASX player control object.
fTimeScale | The time scale to use on the playing file. Range is 0.8 < fTimeScale < 1.2.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_Player_Start ( ASX_HANDLE hPlayer )

Start playback of a previously opened (and optionally pre-loaded) file.

Parameters:
hPlayer A handle to an ASX player control object.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
play/main.c.

ASX32_API ASX_ERROR ASX_Player_Stop ( 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.

Parameters:
hPlayer A handle to an ASX player control object.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_Player_Wait ( ASX_HANDLE hPlayer )

Wait for the current file to finish.

This function does not return until the current file has finished playing.

Parameters:
hPlayer A handle to an ASX player control object.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
play/main.c.

Generated on Wed Mar 9 16:02:37 2005 for ASX by doxygen 1.3.9.1


ASX: Recorder control functions

Recorder control functions

Detailed Description

These functions support file recording.

Formats supported for recording in this version:
asxFILE_FORMAT | _WAV | _RAW
Filename Extension | .WAV | any
_PCM8 or _PCM16 | supported | write only
_PCM24 or _PCM32 | supported | write only
_PCM32_FLOAT | supported | write only
_MPEG_L2 | supported | supported
_MPEG_L3 | supported | supported
_MPEG_AACPLUS | not supported yet | not supported yet
_DOLBY_AC2 | not supported yet | not supported yet
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

ASX Player State Diagram.

Functions

ASX32_API ASX_ERROR | ASX_Recorder_Open (ASX_HANDLE hRecorder, const char *pszFile, enum asxFILE_FORMAT nFileType, enum asxFILE_MODE nFileMode, int nChannels, enum asxAUDIO_FORMAT nFormat, long lSampleRate, long lBitrate, enum asxRECORD_MODE nMode)
Opens the recorder using the specified format.
ASX32_API ASX_ERROR | ASX_Recorder_Start (ASX_HANDLE hRecorder)
Starts the recording.
ASX32_API ASX_ERROR | ASX_Recorder_Stop (ASX_HANDLE hRecorder)
Stops the recording.
ASX32_API ASX_ERROR | ASX_Recorder_Pause (ASX_HANDLE hRecorder)
Pauses the recording.
ASX32_API ASX_ERROR | ASX_Recorder_Close (ASX_HANDLE hRecorder)
Closes the recording file.
ASX32_API ASX_ERROR | ASX_Recorder_GetPosition (ASX_HANDLE hRecorder, enum asxTIMESCALE nType, unsigned long *plPosition)
Gets the current record position.
ASX32_API ASX_ERROR | ASX_Recorder_GetState (ASX_HANDLE hRecorder, enum asxRECORDER_STATE *peState)
Get the current record state.
ASX32_API ASX_ERROR | ASX_Recorder_GetFilename (ASX_HANDLE hRecorder, char *pszFilename, int nStringLength, int *pnRequiredLength)
Get the current filename, if any.

Function Documentation

ASX32_API ASX_ERROR ASX_Recorder_Close ( ASX_HANDLE hRecorder )

Closes the recording file.

Parameters:
hRecorder A handle to an ASX recorder object.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
dual_mono_record/main.c, and record/main.c.

ASX32_API ASX_ERROR ASX_Recorder_GetFilename | ( | ASX_HANDLE | hRecorder,
 |  | char * | pszFilename,
 |  | int | nStringLength,
 |  | int * | pnRequiredLength
 | ) |

Get the current filename, if any.

Parameters:
hRecorder | A handle to an ASX recorder object.
pszFilename | The returned pointer to the filename.
nStringLength | The length in bytes of pszFilename.
pnRequiredLength | The required length in bytes of pszRevision.
Returns:
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_GetPosition | ( | ASX_HANDLE | hRecorder,
 |  | enum asxTIMESCALE | nType,
 |  | unsigned long * | plPosition
 | ) |

Gets the current record position.

Parameters:
hRecorder | A handle to an ASX recorder object.
nType | The units to return the position in (see asxTIMESCALE).
plPosition | The current record position.
Returns:
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 record state.

Parameters:
hRecorder | A handle to an ASX recorder object.
peState | The current recorder state. See asxRECORDER_STATE.
Returns:
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,
 |  | enum asxFILE_FORMAT | nFileType,
 |  | enum asxFILE_MODE | nFileMode,
 |  | int | nChannels,
 |  | enum asxAUDIO_FORMAT | nFormat,
 |  | long | lSampleRate,
 |  | long | lBitrate,
 |  | enum asxRECORD_MODE | nMode
 | ) |

Opens the recorder using the specified format.

Parameters:
hRecorder | A handle to an ASX recorder object.
pszFile | The name of the file to be opened.
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.
nFileMode | Sets the mode for opening an existing file for recording. See asxFILE_MODE
nChannels | The number of channels. Currently either 1 or 2 channels are supported.
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.
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.
lBitrate | Bitrate = 8000 to 384000 bps (MPEG only)
nMode | Recording mode applies to MPEG only. See asxRECORD_MODE.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
dual_mono_record/main.c, and record/main.c.

ASX32_API ASX_ERROR ASX_Recorder_Pause ( ASX_HANDLE hRecorder )

Pauses the recording.

Use ASX_Recorder_Start to continue recording.

Parameters:
hRecorder A handle to an ASX recorder object.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
record/main.c.

ASX32_API ASX_ERROR ASX_Recorder_Start ( ASX_HANDLE hRecorder )

Starts the recording.

Parameters:
hRecorder A handle to an ASX recorder object.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
dual_mono_record/main.c, and record/main.c.

ASX32_API ASX_ERROR ASX_Recorder_Stop ( ASX_HANDLE hRecorder )

Stops the recording.

Parameters:
hRecorder A handle to an ASX recorder object.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
dual_mono_record/main.c, and record/main.c.

Generated on Wed Mar 9 16:02:38 2005 for ASX by doxygen 1.3.9.1


ASX: Meter control functions

Meter control functions

Detailed Description

These functions support reading peak meter information.

Enumerations

enum | asxMETER_TYPE { asxMETER_PEAK, asxMETER_RMS }
Peak meter type to read. More...

Functions

ASX32_API ASX_ERROR | ASX_Meter_GetChannels (ASX_HANDLE hMeter, int *pnChannels)
Returns the number of channels this peak meter has.
ASX32_API ASX_ERROR | ASX_Meter_GetPeak (ASX_HANDLE hMeter, float *fGetDb, const int nChannels)
Returns the peak meter reading for the given meter control.
ASX32_API ASX_ERROR | ASX_Meter_GetRMS (ASX_HANDLE hMeter, float *fGetDb, const int nChannels)
Returns the RMS meter reading for the given meter control.
ASX32_API ASX_ERROR | ASX_Meter_SetBallistics (ASX_HANDLE hMeter, enum asxMETER_TYPE nMeterType, float fAttackTimeMs, float fDecayTimeMs)
Set the meter ballistics.

Enumeration Type Documentation

enum asxMETER_TYPE

Peak meter type to read.

Enumeration values:
asxMETER_PEAK | The peak level of the signal.
asxMETER_RMS | The RMS level of the signal.

Function Documentation

ASX32_API ASX_ERROR ASX_Meter_GetChannels | ( | ASX_HANDLE | hMeter,
 |  | int * | pnChannels
 | ) |

Returns the number of channels this peak meter has.

Parameters:
hMeter | A handle to an ASX meter object.
pnChannels | The returned number of channels.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_Meter_GetPeak | ( | ASX_HANDLE | hMeter,
 |  | float * | fGetDb,
 |  | const int | nChannels
 | ) |

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.

Parameters:
hMeter | A handle to an ASX meter object.
fGetDb | A pointer to receive the peak meter reading in dB. The range of this reading it 0.0 to -120.0 dB.
nChannels | The number of channels. This should match the number of elements in the fGetDb array.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_Meter_GetRMS | ( | ASX_HANDLE | hMeter,
 |  | float * | fGetDb,
 |  | 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.

Parameters:
hMeter | A handle to an ASX meter object.
fGetDb | A pointer to receive the RMS meter reading in dB. The range of this reading it 0.0 to -120.0 dB.
nChannels | The number of channels. This should match the number of elements in the fGetDb array.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_Meter_SetBallistics | ( | ASX_HANDLE | hMeter,
 |  | enum asxMETER_TYPE | nMeterType,
 |  | float | fAttackTimeMs,
 |  | float | fDecayTimeMs
 | ) |

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.

The following table shows the percentage of the final meter value over time, when a constant input is suddenly removed (decay) or applied (attack):

Time | Meter decay | Meter attack
0 | 100% | 0%
T | 37% | 63%
2T | 14% | 86%
3T | 5% | 95%
4T | 2% | 98%
5T | 0.7% | 99%

Table 2.1: Attack and decay compared to time.

The table was calculated using the following formulas:

decay = intial * e -t/T

and:

attack = initial * ( 1 - e -t/T )

Parameters:
hMeter | A handle to an ASX meter object.
nMeterType | The meter type to set the balistics of. See asxMETER_TYPE.
fAttackTimeMs | The attack time in milliseconds.
fDecayTimeMs | The decay time in milliseconds.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

Generated on Wed Mar 9 16:02:38 2005 for ASX by doxygen 1.3.9.1


ASX: Volume control functions

Volume control functions

Detailed Description

These functions support volume control manipulation.

Enumerations

enum | asxVOLUME_AUTOFADE { asxVOLUME_AUTOFADE_LOG, asxVOLUME_AUTOFADE_LINEAR }

Functions

ASX32_API ASX_ERROR | ASX_Volume_GetChannels (ASX_HANDLE hMeter, int *pnChannels)
Returns the number of channels this volume control has.
ASX32_API ASX_ERROR | ASX_Volume_SetGain (ASX_HANDLE hVolume, float *fSetGain, const int nChannels)
Set volume.
ASX32_API ASX_ERROR | ASX_Volume_GetGain (ASX_HANDLE hVolume, float *fGetGain, const int nChannels)
Get volume.
ASX32_API ASX_ERROR | ASX_Volume_GetRange (ASX_HANDLE hVolume, float *fMinGain, float *fMaxGain, float *fGainStep)
Get that range of volume settings available.
ASX32_API ASX_ERROR | ASX_Volume_SetAutofade (ASX_HANDLE hVolume, float *fSetGain, const int nChannels, ASX_TIME nDuration, enum asxVOLUME_AUTOFADE eProfile)
Set an autofade operation.

Enumeration Type Documentation

enum asxVOLUME_AUTOFADE

Enumeration values:
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.

Function Documentation

ASX32_API ASX_ERROR ASX_Volume_GetChannels | ( | ASX_HANDLE | hMeter,
 |  | int * | pnChannels
 | ) |

Returns the number of channels this volume control has.

Parameters:
hMeter | A handle to an ASX meter object.
pnChannels | The returned number of channels.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_Volume_GetGain | ( | ASX_HANDLE | hVolume,
 |  | float * | fGetGain,
 |  | const int | nChannels
 | ) |

Get volume.

Parameters:
hVolume | A handle to an ASX volume control.
fGetGain | The returned gain in dBFS, i.e. 0dB is fullscale.
nChannels | The number of channels. This should match the number of elements in the fGetGain array.
Returns:
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
 | ) |

Get that range of volume settings available.

Parameters:
hVolume | A handle to an ASX volume control.
fMinGain | The returned minimum gain in dBFS, i.e. 0dB is fullscale.
fMaxGain | The returned maximum gain in dBFS, i.e. 0dB is fullscale.
fGainStep | The returned gain stepsize in dB.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_Volume_SetAutofade | ( | ASX_HANDLE | hVolume,
 |  | float * | fSetGain,
 |  | const int | nChannels,
 |  | ASX_TIME | nDuration,
 |  | enum asxVOLUME_AUTOFADE | eProfile
 | ) |

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.

Parameters:
hVolume | A handle to an ASX volume control.
fSetGain | The target gain in dBFS, i.e. 0dB is fullscale.
nChannels | The number of channels. This should match the number of elements in the fGetGain array.
nDuration | The duration in milliseconds..
eProfile | The fading profile. See asxVOLUME_AUTOFADE. All ASI adapters support asxVOLUME_AUTOFADE_LINEAR.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_Volume_SetGain | ( | ASX_HANDLE | hVolume,
 |  | float * | fSetGain,
 |  | const int | nChannels
 | ) |

Set volume.

Parameters:
hVolume | A handle to an ASX volume control.
fSetGain | The gain to set in dBFS, i.e. 0dB is fullscale.
nChannels | The number of channels. This should match the number of elements in the fSetGain array.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

Generated on Wed Mar 9 16:02:38 2005 for ASX by doxygen 1.3.9.1


ASX: Level control functions.

Level control functions.

Detailed Description

These functions support level/trim control manipulation in line ins and line outs.

Functions

ASX32_API ASX_ERROR | ASX_Level_Set (ASX_HANDLE hLevel, float fGain)
Set the analog input or output level (sometimes called trim).
ASX32_API ASX_ERROR | ASX_Level_Get (ASX_HANDLE hLevel, float *fGain)
Get the analog input or output level (sometimes called trim).

Function Documentation

ASX32_API ASX_ERROR ASX_Level_Get | ( | ASX_HANDLE | hLevel,
 |  | float * | fGain
 | ) |

Get the analog input or output level (sometimes called trim).

Parameters:
hLevel | A handle to an ASX Level control.
fGain | The returned level reading. The level has the units of dBu.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_Level_Set | ( | ASX_HANDLE | hLevel,
 |  | float | fGain
 | ) |

Set the analog input or output level (sometimes called trim).

Parameters:
hLevel | A handle to an ASX Level control.
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.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

Generated on Wed Mar 9 16:02:39 2005 for ASX by doxygen 1.3.9.1


ASX: Multiplexer control functions.

Multiplexer control functions.

Detailed Description

These functions support multiplexer type operations.

Functions

ASX32_API ASX_ERROR | ASX_Multiplexer_Enumerate (ASX_HANDLE hMux, const int nIndex, enum asxNODE *peNode, int *pnNodeIndex, int *pnCount)
Enumerate each multiplexer option.
ASX32_API ASX_ERROR | ASX_Multiplexer_Get (ASX_HANDLE hMux, enum asxNODE *peNode, int *pnNodeIndex)
Get the current multiplexer setting.
ASX32_API ASX_ERROR | ASX_Multiplexer_Set (ASX_HANDLE hMux, const enum asxNODE eNode, const int nNodeIndex)
Set the multiplexer.

Function Documentation

ASX32_API ASX_ERROR ASX_Multiplexer_Enumerate | ( | ASX_HANDLE | hMux,
 |  | const int | nIndex,
 |  | enum asxNODE * | peNode,
 |  | int * | pnNodeIndex,
 |  | int * | pnCount
 | ) |

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.

Parameters:
hMux | A handle to an ASX multiplexer control.
nIndex | The index of the multiplexer option to fetch.
peNode | The returned multiplexer node. See asxNODE for available nodes.
pnNodeIndex | The returned node index.
pnCount | The total number of available multiplexer settings.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mux/main.c.

ASX32_API ASX_ERROR ASX_Multiplexer_Get | ( | ASX_HANDLE | hMux,
 |  | enum asxNODE * | peNode,
 |  | int * | pnNodeIndex
 | ) |

Get the current multiplexer setting.

Parameters:
hMux | A handle to an ASX multiplexer control.
peNode | The returned node. See asxNODE for available nodes.
pnNodeIndex | The returned node index.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
mux/main.c.

ASX32_API ASX_ERROR ASX_Multiplexer_Set | ( | ASX_HANDLE | hMux,
 |  | const enum asxNODE | eNode,
 |  | const int | nNodeIndex
 | ) |

Set the multiplexer.

Parameters:
hMux | A handle to an ASX multiplexer control.
eNode | The node to set the multiplexer to. See asxNODE for available nodes.
nNodeIndex | The node index to set.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
dual_mono_record/main.c.

Generated on Wed Mar 9 16:02:39 2005 for ASX by doxygen 1.3.9.1


ASX: Channel Mode control functions.

Channel Mode control functions.

Detailed Description

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.

Functions

ASX32_API ASX_ERROR | ASX_ChannelMode_Enumerate (ASX_HANDLE hMode, const int nIndex, enum asxCHANNELMODE *peMode, int *pnCount)
Enumerate each channel mode option.
ASX32_API ASX_ERROR | ASX_ChannelMode_Get (ASX_HANDLE hMode, enum asxCHANNELMODE *peMode)
Get the current channel mode.
ASX32_API ASX_ERROR | ASX_ChannelMode_Set (ASX_HANDLE hMode, const enum asxCHANNELMODE eMode)
Set the current channel mode.

Function Documentation

ASX32_API ASX_ERROR ASX_ChannelMode_Enumerate | ( | ASX_HANDLE | hMode,
 |  | const int | nIndex,
 |  | enum asxCHANNELMODE * | peMode,
 |  | int * | pnCount
 | ) |

Enumerate each channel mode option.

Parameters:
hMode | A handle to an ASX channel mode control.
nIndex | The index of the channel mode option to fetch.
peMode | The returned channel mode option. See asxCHANNELMODE for available settings.
pnCount | The total number of available mode options.
Returns:
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
 | ) |

Get the current channel mode.

Parameters:
hMode | A handle to an ASX channel mode control.
peMode | The returned channel mode. See asxCHANNELMODE for different mode options.
Returns:
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
 | ) |

Set the current channel mode.

Parameters:
hMode | A handle to an ASX channel mode control.
eMode | The channel mode to set. This must be one of the options returned by calls to ASX_ChannelMode_Enumerate().
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
dual_mono_record/main.c.

Generated on Wed Mar 9 16:02:39 2005 for ASX by doxygen 1.3.9.1


ASX: Adapter Mode control functions.

Adapter Mode control functions.

Detailed Description

These functions support changing the adapter mode, which typically controls the setting of the number of play devices the adapter supports.

Functions

ASX32_API ASX_ERROR | ASX_AdapterMode_Enumerate (ASX_HANDLE hMode, const int nIndex, enum asxADAPTERMODE *peMode, int *pnCount)
Enumerate each adapter mode option.
ASX32_API ASX_ERROR | ASX_AdapterMode_Get (ASX_HANDLE hMode, enum asxADAPTERMODE *peMode)
Get the current adapter mode.
ASX32_API ASX_ERROR | ASX_AdapterMode_Set (ASX_HANDLE hMode, const enum asxADAPTERMODE eMode)
Set the current adapter mode.

Function Documentation

ASX32_API ASX_ERROR ASX_AdapterMode_Enumerate | ( | ASX_HANDLE | hMode,
 |  | const int | nIndex,
 |  | enum asxADAPTERMODE * | peMode,
 |  | int * | pnCount
 | ) |

Enumerate each adapter mode option.

Parameters:
hMode | A handle to an ASX adapter mode control.
nIndex | The index of the adapter mode option to fetch.
peMode | The returned adapter mode option.
pnCount | The total number of available mode options. See asxADAPTERMODE for available options.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_AdapterMode_Get | ( | ASX_HANDLE | hMode,
 |  | enum asxADAPTERMODE * | peMode
 | ) |

Get the current adapter mode.

Parameters:
hMode | A handle to an ASX adapter mode control.
peMode | The returned adapter mode. See asxADAPTERMODE for different mode options.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_AdapterMode_Set | ( | ASX_HANDLE | hMode,
 |  | const enum asxADAPTERMODE | eMode
 | ) |

Set the current adapter mode.

Parameters:
hMode | A handle to an ASX adapter mode control.
eMode | The adapter mode to set. This must be one of the options returned by calls to ASX_AdapterMode_Enumerate().
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

Generated on Wed Mar 9 16:02:39 2005 for ASX by doxygen 1.3.9.1


ASX: Tuner control functions.

Tuner control functions.

Detailed Description

These functions support tuner operations.

Functions

ASX32_API ASX_ERROR | ASX_Tuner_EnumerateBand (ASX_HANDLE hTuner, const int nIndex, enum asxTUNERBAND *peBand, int *pnCount)
Enumerate each tuner band option.
ASX32_API ASX_ERROR | ASX_Tuner_GetBand (ASX_HANDLE hTuner, enum asxTUNERBAND *peBand)
Get the tuner band.
ASX32_API ASX_ERROR | ASX_Tuner_SetBand (ASX_HANDLE hTuner, const enum asxTUNERBAND eBand)
Set the tuner band.
ASX32_API ASX_ERROR | ASX_Tuner_SetFrequency (ASX_HANDLE hTuner, const unsigned long nFreq)
Set the tuner frequency.
ASX32_API ASX_ERROR | ASX_Tuner_GetFrequency (ASX_HANDLE hTuner, unsigned long *plFreq)
Get the tuner frequency.
ASX32_API ASX_ERROR | ASX_Tuner_GetGainRange (ASX_HANDLE hTuner, float *fMin, float *fMax, float *fStep)
Get the tuner gain range (in dB).
ASX32_API ASX_ERROR | ASX_Tuner_SetGain (ASX_HANDLE hTuner, const float fTunerGain)
Set the tuner gain.
ASX32_API ASX_ERROR | ASX_Tuner_GetGain (ASX_HANDLE hTuner, float *pfTunerGain)
Get the tuner gain.
ASX32_API ASX_ERROR | ASX_Tuner_GetRFLevel (ASX_HANDLE hTuner, float *nRFLevel)
Get the tuner RF level.
ASX32_API ASX_ERROR | ASX_Tuner_GetRawRFLevel (ASX_HANDLE hTuner, int *nRawRFLevel)
Get the Raw tuner RF level.
ASX32_API ASX_ERROR | ASX_Tuner_GetStatus (ASX_HANDLE hTuner, unsigned int *puErrorStatusMask, unsigned int *puErrorStatus)
Get the tuner status.
ASX32_API ASX_ERROR | ASX_Tuner_SetMode (ASX_HANDLE hTuner, const enum asxTUNERMODE eMode, const enum asxTUNERMODE eSetting)
Sets the tuner mode.

Function Documentation

ASX32_API ASX_ERROR ASX_Tuner_EnumerateBand | ( | ASX_HANDLE | hTuner,
 |  | const int | nIndex,
 |  | enum asxTUNERBAND * | peBand,
 |  | int * | pnCount
 | ) |

Enumerate each tuner band option.

Parameters:
hTuner | A handle to an ASX tuner control.
nIndex | The index of the tuner band option to fetch.
peBand | The returned tuner band option.
pnCount | The total number of available tuner bands.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.

ASX32_API ASX_ERROR ASX_Tuner_GetBand | ( | ASX_HANDLE | hTuner,
 |  | enum asxTUNERBAND * | peBand
 | ) |

Get the tuner band.

Parameters:
hTuner | A handle to an ASX tuner control.
peBand | The returned tuner band. This must be one of the options returned by calls to ASX_Tuner_EnumerateBand().
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_Tuner_GetFrequency | ( | ASX_HANDLE | hTuner,
 |  | unsigned long * | plFreq
 | ) |

Get the tuner frequency.

Parameters:
hTuner | A handle to an ASX tuner control.
plFreq | The returned frequency.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.

ASX32_API ASX_ERROR ASX_Tuner_GetGain | ( | ASX_HANDLE | hTuner,
 |  | float * | pfTunerGain
 | ) |

Get the tuner gain.

Parameters:
hTuner | A handle to an ASX tuner control.
pfTunerGain | The returned gain in dB.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.

ASX32_API ASX_ERROR ASX_Tuner_GetGainRange | ( | ASX_HANDLE | hTuner,
 |  | float * | fMin,
 |  | float * | fMax,
 |  | float * | fStep
 | ) |

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.

Parameters:
hTuner | A handle to an ASX tuner control.
fMin | The returned minimum gain in dB.
fMax | The returned maximum gain in dB.
fStep | The returned gain step in dB.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.

ASX32_API ASX_ERROR ASX_Tuner_GetRawRFLevel | ( | ASX_HANDLE | hTuner,
 |  | int * | nRawRFLevel
 | ) |

Get the Raw tuner RF level.

Parameters:
hTuner | A handle to an ASX tuner control.
nRawRFLevel | The returned Raw RF level in whatever units the tuner supports.
Returns:
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 tuner RF level.

Parameters:
hTuner | A handle to an ASX tuner control.
nRFLevel | The returned RF level in dBuV.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.

ASX32_API ASX_ERROR ASX_Tuner_GetStatus | ( | ASX_HANDLE | hTuner,
 |  | unsigned int * | puErrorStatusMask,
 |  | unsigned int * | puErrorStatus
 | ) |

Get the tuner status.

This function gets the tuner status and indicates which bits are valid for the current status reading.

Parameters:
hTuner | A handle to an ASX tuner control.
puErrorStatusMask | The returned status mask. This mask indicates which status bits are valid in puErrorStatus. Bits are defined by asxTUNER_STATUS.
puErrorStatus | The returned status bits.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.

ASX32_API ASX_ERROR ASX_Tuner_SetBand | ( | ASX_HANDLE | hTuner,
 |  | const enum asxTUNERBAND | eBand
 | ) |

Set the tuner band.

Parameters:
hTuner | A handle to an ASX tuner control.
eBand | The tuner band to set. This must be one of the options returned by calls to ASX_Tuner_EnumerateBand().
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.

ASX32_API ASX_ERROR ASX_Tuner_SetFrequency | ( | ASX_HANDLE | hTuner,
 |  | const unsigned long | nFreq
 | ) |

Set the tuner frequency.

This function sets the tuner frequency subject to the allowable range of frequencies for the current tuner band setting.

Parameters:
hTuner | A handle to an ASX tuner control.
nFreq | The frequency to set in kHz.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.

ASX32_API ASX_ERROR ASX_Tuner_SetGain | ( | ASX_HANDLE | hTuner,
 |  | const float | fTunerGain
 | ) |

Set the tuner gain.

Parameters:
hTuner | A handle to an ASX tuner control.
fTunerGain | The gain to set in dB.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
tuner/main.c.

ASX32_API ASX_ERROR ASX_Tuner_SetMode | ( | ASX_HANDLE | hTuner,
 |  | const enum asxTUNERMODE | eMode,
 |  | const enum asxTUNERMODE | eSetting
 | ) |

Sets the tuner mode.

Currently this can only be used for turning the RSS level reading on and off on an MT4039 tuner.

Parameters:
hTuner | A handle to an ASX tuner control.
eMode | The only valid parameter for this call is #asxTUNERMODE_RSSI.
eSetting | The mode setting. Only current valid values are asxTUNERMODE_RSSI_ENABLE or asxTUNERMODE_RSSI_DISABLE.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

Generated on Wed Mar 9 16:02:39 2005 for ASX by doxygen 1.3.9.1


ASX: Sample clock control functions.

Sample clock control functions.

Detailed Description

These functions implement sample clock operations that manipulate the adapter's sample clock generation.

Functions

ASX32_API ASX_ERROR | ASX_SampleClock_SetSampleRate (ASX_HANDLE hSampleClock, const int nSampleRate)
Set the sample rate for the adapter.
ASX32_API ASX_ERROR | ASX_SampleClock_GetSampleRate (ASX_HANDLE hSampleClock, int *pnSampleRate)
Get the adapter's sample rate.
ASX32_API ASX_ERROR | ASX_SampleClock_EnumerateClockSource (ASX_HANDLE hSampleClock, const int nIndex, enum asxSAMPLE_CLOCK_SOURCE *peClockSource, int *pnCount)
Enumerate each sample clock source option.
ASX32_API ASX_ERROR | ASX_SampleClock_SetClockSource (ASX_HANDLE hSampleClock, const enum asxSAMPLE_CLOCK_SOURCE eClockSource)
Set the sample clock source.
ASX32_API ASX_ERROR | ASX_SampleClock_GetClockSource (ASX_HANDLE hSampleClock, enum asxSAMPLE_CLOCK_SOURCE *peClockSource)
Get the sample clock source.

Function Documentation

ASX32_API ASX_ERROR ASX_SampleClock_EnumerateClockSource | ( | ASX_HANDLE | hSampleClock,
 |  | const int | nIndex,
 |  | enum asxSAMPLE_CLOCK_SOURCE * | peClockSource,
 |  | int * | pnCount
 | ) |

Enumerate each sample clock source option.

Parameters:
hSampleClock | A handle to an ASX sample clock control.
nIndex | The index of the sample clock source option to fetch.
peClockSource | The returned sample clock source option.
pnCount | The total number of available sample clock sources.
Returns:
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
 | ) |

Get the sample clock source.

Parameters:
hSampleClock | A handle to an ASX sample clock control.
peClockSource | The returned sample clock source.
Returns:
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 adapter's sample rate.

Parameters:
hSampleClock | A handle to an ASX sample clock control.
pnSampleRate | The returned sample rate.
Returns:
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
 | ) |

Set the sample clock source.

Parameters:
hSampleClock | A handle to an ASX sample clock control.
eClockSource | The sample clock source option to set.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_SampleClock_SetSampleRate | ( | ASX_HANDLE | hSampleClock,
 |  | const int | nSampleRate
 | ) |

Set the sample rate for the adapter.

Parameters:
hSampleClock | A handle to an ASX sample clock control.
nSampleRate | The sample rate to set.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

Generated on Wed Mar 9 16:02:39 2005 for ASX by doxygen 1.3.9.1


ASX: AESEBU receiver control functions.

AESEBU receiver control functions.

Detailed Description

These functions implement AESEBU receiver operations.

Functions

ASX32_API ASX_ERROR | ASX_AESEBUReceiver_GetErrorStatus (ASX_HANDLE hAESEBURx, unsigned int *pdwErrorStatusMask, unsigned int *pdwErrorStatus)
Get the status of the AESEBU receiver.
ASX32_API ASX_ERROR | ASX_AESEBUReceiver_GetSampleRate (ASX_HANDLE hAESEBURx, unsigned int *pdwSampleRate)
Get the sample rate of the AESEBU receiver.
ASX32_API ASX_ERROR | ASX_AESEBUReceiver_SetDigitalMode (ASX_HANDLE hAESEBURx, const enum asxDIGITAL_MODE eDigitalMode)
Set the mode of the AESEBU receiver.
ASX32_API ASX_ERROR | ASX_AESEBUReceiver_GetDigitalMode (ASX_HANDLE hAESEBURx, enum asxDIGITAL_MODE *peDigitalMode)
Get the mode of the AESEBU receiver.

Function Documentation

ASX32_API ASX_ERROR ASX_AESEBUReceiver_GetDigitalMode | ( | ASX_HANDLE | hAESEBURx,
 |  | enum asxDIGITAL_MODE * | peDigitalMode
 | ) |

Get the mode of the AESEBU receiver.

Parameters:
hAESEBURx | A handle to an ASX AESEBU receiver control.
peDigitalMode | The returned mode.
Returns:
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 status of the AESEBU receiver.

Parameters:
hAESEBURx | A handle to an ASX AESEBU receiver control.
pdwErrorStatusMask | A bit mask field indicating which of the bitfields defined by asxAESEBU_STATUS are returned.
pdwErrorStatus | The returned status fields.
Returns:
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
 | ) |

Get the sample rate of the AESEBU receiver.

Parameters:
hAESEBURx | A handle to an ASX AESEBU receiver control.
pdwSampleRate | The returned sample rate.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_AESEBUReceiver_SetDigitalMode | ( | ASX_HANDLE | hAESEBURx,
 |  | const enum asxDIGITAL_MODE | eDigitalMode
 | ) |

Set the mode of the AESEBU receiver.

Parameters:
hAESEBURx | A handle to an ASX AESEBU receiver control.
eDigitalMode | The mode to set the receiver control to.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

Generated on Wed Mar 9 16:02:40 2005 for ASX by doxygen 1.3.9.1


ASX: AESEBU transmitter control functions.

AESEBU transmitter control functions.

Detailed Description

These functions implement AESEBU transmitter operations.

Functions

ASX32_API ASX_ERROR | ASX_AESEBUTransmitter_SetDigitalMode (ASX_HANDLE hAESEBUTx, const enum asxDIGITAL_MODE eDigitalMode)
Set the mode of the AESEBU transmitter.
ASX32_API ASX_ERROR | ASX_AESEBUTransmitter_GetDigitalMode (ASX_HANDLE hAESEBUTx, enum asxDIGITAL_MODE *peDigitalMode)
Get the mode of the AESEBU transmitter.

Function Documentation

ASX32_API ASX_ERROR ASX_AESEBUTransmitter_GetDigitalMode | ( | ASX_HANDLE | hAESEBUTx,
 |  | enum asxDIGITAL_MODE * | peDigitalMode
 | ) |

Get the mode of the AESEBU transmitter.

Parameters:
hAESEBUTx | A handle to an ASX AESEBU transmitter control.
peDigitalMode | The returned mode.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_AESEBUTransmitter_SetDigitalMode | ( | ASX_HANDLE | hAESEBUTx,
 |  | const enum asxDIGITAL_MODE | eDigitalMode
 | ) |

Set the mode of the AESEBU transmitter.

Parameters:
hAESEBUTx | A handle to an ASX AESEBU transmitter control.
eDigitalMode | The mode to set the transmitter control to.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

Generated on Wed Mar 9 16:02:40 2005 for ASX by doxygen 1.3.9.1


ASX: GPIO control functions.

GPIO control functions.

Detailed Description

These functions implement GPIO operations.

By GPIO we here mean the control of relays and the reading of optos.

Functions

ASX32_API ASX_ERROR | ASX_GPIO_GetProperties (ASX_HANDLE hGPIO, int *pnNumberOfInputBits, int *pnNumberOfOutputBits)
Get the properties of the GPIO control.
ASX32_API ASX_ERROR | ASX_GPIO_InputGet (ASX_HANDLE hGPIO, int *pnBits, const int nNumberOfBits)
Read the state of the GPIO opto inputs.
ASX32_API ASX_ERROR | ASX_GPIO_OutputSet (ASX_HANDLE hGPIO, int *pnBits, const int nNumberOfBits)
Write to the GPIO relay outputs.

Function Documentation

ASX32_API ASX_ERROR ASX_GPIO_GetProperties | ( | ASX_HANDLE | hGPIO,
 |  | int * | pnNumberOfInputBits,
 |  | int * | pnNumberOfOutputBits
 | ) |

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.

Parameters:
hGPIO | A handle to an ASX GPIO control object.
pnNumberOfInputBits | The number of input bits.
pnNumberOfOutputBits | The number of output bits.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_GPIO_InputGet | ( | ASX_HANDLE | hGPIO,
 |  | int * | pnBits,
 |  | const int | nNumberOfBits
 | ) |

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.

Parameters:
hGPIO | A handle to an ASX GPIO control object.
pnBits | 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.
nNumberOfBits | The number of bits which should be set to the dimension of pnBits..
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_GPIO_OutputSet | ( | ASX_HANDLE | hGPIO,
 |  | int * | pnBits,
 |  | 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.

Parameters:
hGPIO | A handle to an ASX GPIO control object.
pnBits | 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.
nNumberOfBits | The number of bits which must be set to the dimension of pnBits..
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

Generated on Wed Mar 9 16:02:40 2005 for ASX by doxygen 1.3.9.1


ASX: Non-volatile memory control functions.

Non-volatile memory control functions.

Detailed Description

These functions implement non-volatile memory read and write byte operations.

All AudioScience adapters contain some amount of non-volatile memory that can be used by application writers or users however they see fit.

Functions

ASX32_API ASX_ERROR | ASX_NvMem_Write (ASX_HANDLE hNvMem, const int nAddress, const unsigned char cValue)
Write a byte to the non-volatile memory.
ASX32_API ASX_ERROR | ASX_NvMem_Read (ASX_HANDLE hNvMem, const int nAddress, unsigned char *pcValue)
Read a byte from the non-volatile memory.
ASX32_API ASX_ERROR | ASX_NvMem_GetSizeInBytes (ASX_HANDLE hNvMem, int *pnCount)
Get the number of bytes in the adapter's non-volatile memory.

Function Documentation

ASX32_API ASX_ERROR ASX_NvMem_GetSizeInBytes | ( | ASX_HANDLE | hNvMem,
 |  | int * | pnCount
 | ) |

Get the number of bytes in the adapter's non-volatile memory.

Parameters:
hNvMem | A handle to an ASX non volatile memory object.
pnCount | A pointer to the returned total number of bytes.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_NvMem_Read | ( | ASX_HANDLE | hNvMem,
 |  | const int | nAddress,
 |  | unsigned char * | pcValue
 | ) |

Read a byte from the non-volatile memory.

Parameters:
hNvMem | A handle to an ASX non volatile memory object.
nAddress | The address to read the byte from.
pcValue | A pointer to the returned byte.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_NvMem_Write | ( | ASX_HANDLE | hNvMem,
 |  | const int | nAddress,
 |  | const unsigned char | cValue
 | ) |

Write a byte to the non-volatile memory.

Parameters:
hNvMem | A handle to an ASX non volatile memory object.
nAddress | The address to write the byte to.
cValue | The byte to write.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

Generated on Wed Mar 9 16:02:40 2005 for ASX by doxygen 1.3.9.1


ASX: Vox control functions

Vox control functions

Detailed Description

These functions support vox control manipulation.

Functions

ASX32_API ASX_ERROR | ASX_Vox_SetLevel (ASX_HANDLE hVox, float fSetLevel)
Set vox level.
ASX32_API ASX_ERROR | ASX_Vox_GetLevel (ASX_HANDLE hVox, float *fGetLevel)
Get vox level.
ASX32_API ASX_ERROR | ASX_Vox_GetRange (ASX_HANDLE hVox, float *fMinLevel, float *fMaxLevel, float *fLevelStep)
Get that range of vox settings available.

Function Documentation

ASX32_API ASX_ERROR ASX_Vox_GetLevel | ( | ASX_HANDLE | hVox,
 |  | float * | fGetLevel
 | ) |

Get vox level.

Parameters:
hVox | A handle to an ASX vox control.
fGetLevel | The returned gain in dBFS, i.e. 0dB is fullscale.
Returns:
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
 | ) |

Get that range of vox settings available.

Parameters:
hVox | A handle to an ASX vox control.
fMinLevel | The returned minimum gain in dBFS, i.e. 0dB is fullscale.
fMaxLevel | The returned maximum gain in dBFS, i.e. 0dB is fullscale.
fLevelStep | The returned gain stepsize in dB.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

ASX32_API ASX_ERROR ASX_Vox_SetLevel | ( | ASX_HANDLE | hVox,
 |  | float | fSetLevel
 | ) |

Set vox level.

Parameters:
hVox | A handle to an ASX vox control.
fSetLevel | The gain to set in dBFS, i.e. 0dB is fullscale.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

Generated on Wed Mar 9 16:02:40 2005 for ASX by doxygen 1.3.9.1


ASX: Generic control functions

Generic control functions

Detailed Description

This function supports the generic control.

Functions

ASX32_API ASX_ERROR ASX_GetGenericControlName (ASX_HANDLE hControl, char *pName)
Get the name of the control.

Function Documentation

ASX32_API ASX_ERROR ASX_GetGenericControlName | ( | ASX_HANDLE | hControl,
 |  | char * | pName
 | ) |

Get the name of the control.

Parameters:
hControl | A handle to an ASX generic control.
pName | Pointer to a buffer (at least 60 chars) for the name.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.

Generated on Wed Mar 9 16:02:40 2005 for ASX by doxygen 1.3.9.1


ASX: Examples

Here is a list of all examples:
  • adapter/main.c
  • dual_mono_record/main.c
  • mixer/main.c
  • mux/main.c
  • play/main.c
  • record/main.c
  • system/main.c
  • tuner/main.c
Generated on Wed Mar 9 16:02:40 2005 for ASX by doxygen 1.3.9.1


ASX: adapter/main.c

adapter/main.c

This is an example of how to use the ASX Adapter functions.

/* $Header: /Repository/apps/asx/examples/adapter/main.c,v 1.3 2004/08/11 14:13:32 as-age Exp $ */
#include "stdio.h"
#include "stdlib.h"
#include "asx.h"

int CheckError(ASX_HANDLE hObj, int nLine);

ASX_HANDLE hSystem=0;

int main(int argc, char* argv[])
{

    ASX_ERROR asxError;
    int nAdapters=0;
    int i;

    // create the system
    ASX_System_Create(ASX_SYSTEM_TYPE_HPI,&hSystem);
    CheckError(hSystem, __LINE__);

    // find out how many adapters there are
    asxError = ASX_System_GetAdapterCount(hSystem,&nAdapters);
    CheckError(hSystem, __LINE__);
    printf("There are %d audio adapters in the system \n", nAdapters);

    // loop over the adapters
    for(i=0;i<nAdapters;i++)
    {
        char *pszAdapterName;
        ASX_HANDLE hAdapter;
        unsigned long lSerial;
        char *pszRevision;
        int nLen;
        int nDspUtilization;
        ASX_HANDLE hMixer;
        ASX_HANDLE hAdapterInfo;

        ASX_System_GetAdapter(hSystem,i,&hAdapter);
        CheckError(hSystem, __LINE__);

        ASX_Adapter_GetName(hAdapter,0,0,&nLen);
        CheckError(hAdapter, __LINE__);
        pszAdapterName = (char *)malloc(nLen);
        ASX_Adapter_GetName(hAdapter,pszAdapterName,nLen,&nLen);
        CheckError(hAdapter, __LINE__);
        printf("Adapter [%d] is %s \n", i,pszAdapterName);

        ASX_Adapter_GetMixer(hAdapter,&hMixer);
        CheckError(hAdapter, __LINE__);

        ASX_Mixer_GetControlByNodeTypeAndIndex(
                    hMixer,
                    asxNODE_ADAPTER,0,
                    asxNODE_NONE,0,
                    asxCONTROL_ADAPTER_INFO,
                    &hAdapterInfo);
        CheckError(hMixer, __LINE__);

        ASX_AdapterInfo_GetSerialNumber(hAdapterInfo,&lSerial);
        CheckError(hAdapterInfo, __LINE__);
        printf("Serial is %ld \n", lSerial);

        ASX_AdapterInfo_GetRevision(hAdapterInfo,0,0,&nLen);
        pszRevision = (char *)malloc(nLen);
        ASX_AdapterInfo_GetRevision(hAdapterInfo,pszRevision,nLen,&nLen);
        CheckError(hAdapterInfo, __LINE__);
        printf("Revision is %s \n", pszRevision);

        ASX_AdapterInfo_GetDspUtilization(hAdapterInfo,0,&nDspUtilization);
        CheckError(hAdapter, __LINE__);
        printf("Utilization is %d percent \n", nDspUtilization);

        free(pszAdapterName);
        free(pszRevision);
    }

    ASX_System_Delete(hSystem);
    printf("Press ENTER to exit\n");
    getchar();
    return 0;
}

int CheckError(ASX_HANDLE hObj, int nLine)
{
    int nError;
    int asxSubSystemErrorCode=0;
    char *pszAsxErrorString;
    char *pszAsxSubSystemErrorString;
    int nLen1,nLen2;

    ASX_Error_GetLast( hObj, &nError, &asxSubSystemErrorCode);
    if(!nError)
        return 0;
    ASX_Error_GetLastString( hObj, 0,0,&nLen1,0,0,&nLen2);
    pszAsxErrorString = (char *)malloc(nLen1);
    pszAsxSubSystemErrorString = (char *)malloc(nLen2);
    ASX_Error_GetLastString( hObj, pszAsxErrorString,nLen1,&nLen1,pszAsxSubSystemErrorString,nLen2,&nLen2);
    printf("Error: #%d, %s - Subsystem Error: #%ld, %s \n",
        nError,
        pszAsxErrorString,
        asxSubSystemErrorCode,
        pszAsxSubSystemErrorString );
    printf("When called from source %s line %d\n",__FILE__,nLine);

    printf("Press ENTER to exit\n");
    getchar();
    free(pszAsxErrorString);
    free(pszAsxSubSystemErrorString);
    ASX_System_Delete(hSystem);
    exit(1);
    return 1;
}
Generated on Wed Mar 9 16:02:32 2005 for ASX by doxygen 1.3.9.1


ASX: dual_mono_record/main.c

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.

Configuration Steps

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

Record 1 <- Line In 1 Left
Record 2 <- Line In 1 Right
Record 3 <- Line In 2 Left
Record 4 <- Line In 2 Right

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

Record 1 <- Line In 1
Record 2 <- Line In 1
Record 3 <- Line In 2
Record 4 <- Line In 2

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

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

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.

/* $Header: /Repository/apps/asx/examples/dual_mono_record/main.c,v 1.5 2004/10/13 18:16:08 as-tfe Exp $ */
#include "stdio.h"
#include "stdlib.h"
#include "asx.h"
#include "asxstring.h"

ASX_HANDLE hSystem=0;

int CheckError(ASX_HANDLE hObj, int nLine);
void PrintControlName(ASX_HANDLE hControl);

int main(int argc, char* argv[])
{
    char *pszName;
    ASX_HANDLE hAdapter;
    ASX_HANDLE hMixer;
    ASX_HANDLE hRecorder[4];
    ASX_HANDLE hChannelMode[4];
    ASX_HANDLE hMux[4];
    int nAdapterToUse=0;
    int i,nLen;
    char szFilenames[][16]={ "test1.wav","test2.wav","test3.wav","test4.wav"};

    // create the system
    ASX_System_Create(ASX_SYSTEM_TYPE_HPI,&hSystem);
    CheckError(hSystem, __LINE__);

    // get the adapter
    ASX_System_GetAdapter(hSystem,nAdapterToUse,&hAdapter);
    CheckError(hAdapter, __LINE__);

    ASX_Adapter_GetName(hAdapter,0,0,&nLen);
    CheckError(hAdapter, __LINE__);
    pszName = (char *)malloc(nLen);
    ASX_Adapter_GetName(hAdapter,pszName,nLen,&nLen);
    CheckError(hAdapter, __LINE__);
    printf("Adapter [%d] is %s \n", nAdapterToUse,pszName);

    // get the mixer handle
    ASX_Adapter_GetMixer( hAdapter, &hMixer );
    CheckError(hAdapter, __LINE__);

    // Grab a recorder, channel mode and mux control for each recorder.
    for(i=0; i<4; i++)
    {
        // get a record object
        ASX_Mixer_GetControlByNodeTypeAndIndex(
            hMixer,
            0,0,
            asxNODE_RECORDER,i,
            asxCONTROL_RECORDER,
            &hRecorder[i]);
        CheckError(hMixer, __LINE__);

        // print out some control details
        PrintControlName(hRecorder[i]);

        // get multiplexer object
        ASX_Mixer_GetControlByNodeTypeAndIndex(
            hMixer,
            0,0,
            asxNODE_RECORDER,i,
            asxCONTROL_MULTIPLEXER,
            &hMux[i]);
        CheckError(hMixer, __LINE__);

        // set the multiplexer to the correct line in
        switch(i)
        {
            case 0:
            case 1:
                ASX_Multiplexer_Set( hMux[i], asxNODE_LINE_IN, 0);
                CheckError(hMux[i], __LINE__);
                break;
            case 2:
            case 3:
                ASX_Multiplexer_Set( hMux[i], asxNODE_LINE_IN, 1);
                CheckError(hMux[i], __LINE__);
                break;
        }

        // get channel mode object
        ASX_Mixer_GetControlByNodeTypeAndIndex(
            hMixer,
            0,0,
            asxNODE_RECORDER,i,
            asxCONTROL_CHANNEL_MODE,
            &hChannelMode[i]);
        CheckError(hMixer, __LINE__);

        // set the channel mode
        switch(i)
        {
            case 0:
            case 2:
                ASX_ChannelMode_Set( hChannelMode[i], asxCHANNELMODE_NORMAL);
                CheckError(hChannelMode[i], __LINE__);
                break;
            case 1:
            case 3:
                ASX_ChannelMode_Set( hChannelMode[i], asxCHANNELMODE_SWAP);
                CheckError(hChannelMode[i], __LINE__);
                break;
        }
    }

    // open the player and pass in the file to be played
    for(i=0; i<4; i++)
    {
        printf("Open recorder %d\n",i);
        ASX_Recorder_Open(
            hRecorder[i],
            szFilenames[i],
            asxFILE_FORMAT_WAV,     // file format
            asxFILE_MODE_CREATE,    // file mode (create vs append)
            1,                      // channels = 1 or 2 at present
            asxAUDIO_FORMAT_PCM16,  // sample format
            44100,                  // sample rate = 8000 to 192000 Hz
            0,                      // 8000 to 384000 bps (MPEG only)
            asxRECORD_MODE_DONT_CARE    // MPEG mode
            );
        CheckError(hRecorder[i], __LINE__);
    }

    // start recording all files
    for(i=0; i<4; i++)
    {
        ASX_Recorder_Start( hRecorder[i] );
        CheckError(hRecorder[i], __LINE__);
    }

    // wait for recording completion
    printf("Hit enter to end recording\n");
    getchar();

    for(i=0; i<4; i++)
    {
        ASX_Recorder_Stop( hRecorder[i] );
        CheckError(hRecorder[i], __LINE__);
    }

    printf("Recording complete.\n");

    // close the file being recorded
    for(i=0; i<4; i++)
    {
        ASX_Recorder_Close(hRecorder[i]);
        CheckError(hRecorder[i], __LINE__);
    }

    printf("Press ENTER to exit\n");
    getchar();
    ASX_System_Delete(hSystem);
    return 0;
}

void PrintControlName(ASX_HANDLE hControl)
{
    char *pszName;
    int nLen;
    enum asxCONTROL eControl;

    ASX_Control_GetType(hControl, &eControl);
    ASXSTRING_EnumToString(eControl,0,0,&nLen);
    pszName=(char *)malloc(nLen);
    ASXSTRING_EnumToString(eControl,pszName,nLen,&nLen);
    printf("Control : %s\n",pszName);

    free(pszName);
}

int CheckError(ASX_HANDLE hObj, int nLine)
{
    int nError;
    int asxSubSystemErrorCode=0;
    char *pszAsxErrorString;
    char *pszAsxSubSystemErrorString;
    int nLen1,nLen2;

    ASX_Error_GetLast( hObj, &nError, &asxSubSystemErrorCode);
    if(!nError)
        return 0;
    ASX_Error_GetLastString( hObj, 0,0,&nLen1,0,0,&nLen2);
    pszAsxErrorString = (char *)malloc(nLen1);
    pszAsxSubSystemErrorString = (char *)malloc(nLen2);
    ASX_Error_GetLastString( hObj, pszAsxErrorString,nLen1,&nLen1,pszAsxSubSystemErrorString,nLen2,&nLen2);
    printf("Error: #%d, %s - Subsystem Error: #%ld, %s \n",
        nError,
        pszAsxErrorString,
        asxSubSystemErrorCode,
        pszAsxSubSystemErrorString );
    printf("When called from source %s line %d\n",__FILE__,nLine);

    printf("Press ENTER to exit\n");
    getchar();
    free(pszAsxErrorString);
    free(pszAsxSubSystemErrorString);
    ASX_System_Delete(hSystem);
    exit(1);
    return 1;
}
Generated on Wed Mar 9 16:02:32 2005 for ASX by doxygen 1.3.9.1


ASX: mixer/main.c

mixer/main.c

This is an example of how to use the ASX Mixer functions.

/* $Header: /Repository/apps/asx/examples/mixer/main.c,v 1.3 2004/08/11 14:13:35 as-age Exp $ */
#include "stdio.h"
#include "stdlib.h"
#include "asx.h"
#include "asxstring.h"

int CheckError(ASX_HANDLE hObj, int nLine);
void PrintNodeName(ASX_HANDLE hNode);
void PrintControlName(ASX_HANDLE hControl);

ASX_HANDLE hSystem=0;

int main(int argc, char* argv[])
{

    char *pszName;
    ASX_HANDLE hAdapter;
    ASX_HANDLE hMixer;
    ASX_HANDLE hNode,hSrcNode,hDestNode;
    ASX_HANDLE hControl;
    ASX_ERROR asxError;
    int nAdapterToUse=0;
    int i,j,nLen,nNodes,nControls;

    // create the system
    ASX_System_Create(ASX_SYSTEM_TYPE_HPI,&hSystem);
    CheckError(hSystem, __LINE__);

    // get the adapter
    asxError = ASX_System_GetAdapter(hSystem,nAdapterToUse,&hAdapter);
    CheckError(hSystem, __LINE__);

    ASX_Adapter_GetName(hAdapter,0,0,&nLen);
    CheckError(hAdapter, __LINE__);
    pszName = (char *)malloc(nLen);
    ASX_Adapter_GetName(hAdapter,pszName,nLen,&nLen);
    CheckError(hAdapter, __LINE__);
    printf("Adapter [%d] is %s \n", nAdapterToUse,pszName);

    // get the mixer handle
    asxError = ASX_Adapter_GetMixer( hAdapter, &hMixer );
    CheckError(hAdapter, __LINE__);

    // dump source lines
    ASX_Mixer_GetSourceNodeCount(hMixer,&nNodes);
    printf("Source nodes\n");
    for(j=0;j<nNodes;j++)
    {
        ASX_Mixer_GetSourceNode(hMixer,j,&hNode);
        PrintNodeName(hNode);
    }
    // dump destination lines
    ASX_Mixer_GetDestinationNodeCount(hMixer,&nNodes);
    printf("Destination nodes\n");
    for(j=0;j<nNodes;j++)
    {
        ASX_Mixer_GetDestinationNode(hMixer,j,&hNode);
        PrintNodeName(hNode);
    }

    // find all LineIn nodes (for exmaple)
    asxError = ASX_Mixer_GetNodeTypeCount(hMixer,asxNODE_LINE_IN,&nNodes);
    CheckError(hMixer, __LINE__);
    printf("Total of %d asxNODE_LINE_IN nodes found.\n",nNodes);

    for(i=0;i<nNodes;i++)
    {
        asxError = ASX_Mixer_GetNodeByType(hMixer,asxNODE_LINE_IN,i,&hNode);
        CheckError(hMixer, __LINE__);
        PrintNodeName(hNode);
    }

    // dump all controls
    asxError = ASX_Mixer_GetControlCount(hMixer,&nControls);
    CheckError(hMixer, __LINE__);

    printf("Retrieved controls\n");
    for(i=0;i<nControls;i++)
    {
        ASX_Mixer_GetControl(hMixer,i,&hControl);
        PrintControlName(hControl);

        printf("On node(s) ");
        ASX_Control_GetSourceNode(hControl,&hNode);
        if( hNode )
            PrintNodeName(hNode);
        ASX_Control_GetDestinationNode(hControl,&hNode);
        if( hNode )
            PrintNodeName(hNode);
        printf("\n");

    }

    //  *************** Using ASX_Mixer_GetControlByNode()
    printf("ASX_Mixer_GetControlByNode() examples\n");

    // ------------ get a peak meter on node Play 0
    printf("Finding a peak meter control of node Player 0\n");
    // first get the Player node
    asxError = ASX_Mixer_GetNodeByType(hMixer,asxNODE_PLAYER,0,&hNode);
    CheckError(hMixer, __LINE__);
    // now get the control
    asxError = ASX_Mixer_GetControlByNode(hMixer,hNode,0, asxCONTROL_METER,&hControl);
    CheckError(hMixer, __LINE__);
    // print out some controldetails
    PrintControlName(hControl);

    // ------------ get a trim/level control on Line Out 0
    printf("Finding a level/trim control of node Line Out 0\n");
    // first get the Line Out node
    asxError = ASX_Mixer_GetNodeByType(hMixer,asxNODE_LINE_OUT,0,&hNode);
    CheckError(hMixer, __LINE__);
    // now get the control
    asxError = ASX_Mixer_GetControlByNode(hMixer,0,hNode,asxCONTROL_LEVEL,&hControl);
    CheckError(hMixer, __LINE__);
    // print out some controldetails
    PrintControlName(hControl);

    // ------------ get a volume control between Play 0 and Line Out 0
    printf("Finding a volume control between Play 0 and Line Out 0\n");
    // first get the Line Out destination node
    asxError = ASX_Mixer_GetNodeByType(hMixer,asxNODE_LINE_OUT,0,&hDestNode);
    CheckError(hMixer, __LINE__);
    // second get the Play source node  node
    asxError = ASX_Mixer_GetNodeByType(hMixer,asxNODE_PLAYER,0,&hSrcNode);
    CheckError(hMixer, __LINE__);
    // now get the control
    asxError = ASX_Mixer_GetControlByNode(hMixer,hSrcNode,hDestNode,asxCONTROL_VOLUME,&hControl);
    CheckError(hMixer, __LINE__);
    // print out some controldetails
    PrintControlName(hControl);

    // *************** Using ASX_Mixer_GetControlByNodeTypeAndIndex()
    printf("ASX_Mixer_GetControlByNodeTypeAndIndex() examples\n");
    // ------------ get a peak meter on node Play 0
    printf("Finding a peak meter control of node Player 0\n");
    asxError = ASX_Mixer_GetControlByNodeTypeAndIndex(
        hMixer,
        asxNODE_PLAYER,0,
        0,0,
        asxCONTROL_METER,
        &hControl);
    CheckError(hMixer, __LINE__);
    // print out some control details
    PrintControlName(hControl);

    // ------------ get a trim/level control on Line Out 0
    printf("Finding a level/trim control of node Line Out 0\n");
    asxError = ASX_Mixer_GetControlByNodeTypeAndIndex(
        hMixer,
        0,0,
        asxNODE_LINE_OUT,0,
        asxCONTROL_LEVEL,
        &hControl);
    CheckError(hMixer, __LINE__);
    // print out some control details
    PrintControlName(hControl);

    // ------------ get a volume control between Play 0 and Line Out 0
    printf("Finding a volume control between Play 0 and Line Out 0\n");
    asxError = ASX_Mixer_GetControlByNodeTypeAndIndex(
        hMixer,
        asxNODE_PLAYER,0,
        asxNODE_LINE_OUT,0,
        asxCONTROL_VOLUME,
        &hControl);
    CheckError(hMixer, __LINE__);
    // print out some control details
    PrintControlName(hControl);

    printf("Press ENTER to exit\n");
    getchar();
    ASX_System_Delete(hSystem);
    return 0;
}

void PrintControlName(ASX_HANDLE hControl)
{
    char *pszName;
    int nLen;
    enum asxCONTROL eControl;

    ASX_Control_GetType(hControl, &eControl);
    ASXSTRING_EnumToString(eControl,0,0,&nLen);
    pszName=(char *)malloc(nLen);
    ASXSTRING_EnumToString(eControl,pszName,nLen,&nLen);
    printf("Control : %s\n",pszName);

    free(pszName);
}

void PrintNodeName(ASX_HANDLE hNode)
{
    char *pszName;
    int nLen,nIndex;
    enum asxNODE eNode;

    ASX_Mixer_GetNodeType(hNode, &eNode);
    ASX_Mixer_GetNodeIndex(hNode, &nIndex);
    ASXSTRING_EnumToString(eNode,0,0,&nLen);
    pszName=(char *)malloc(nLen);
    ASXSTRING_EnumToString(eNode,pszName,nLen,&nLen);
    printf("Node : %s_%d\n",pszName,nIndex);
    free(pszName);
}

int CheckError(ASX_HANDLE hObj, int nLine)
{
    int nError;
    int asxSubSystemErrorCode=0;
    char *pszAsxErrorString;
    char *pszAsxSubSystemErrorString;
    int nLen1,nLen2;

    ASX_Error_GetLast( hObj, &nError, &asxSubSystemErrorCode);
    if(!nError)
        return 0;
    ASX_Error_GetLastString( hObj, 0,0,&nLen1,0,0,&nLen2);
    pszAsxErrorString = (char *)malloc(nLen1);
    pszAsxSubSystemErrorString = (char *)malloc(nLen2);
    ASX_Error_GetLastString( hObj, pszAsxErrorString,nLen1,&nLen1,pszAsxSubSystemErrorString,nLen2,&nLen2);
    printf("Error: #%d, %s - Subsystem Error: #%ld, %s \n",
        nError,
        pszAsxErrorString,
        asxSubSystemErrorCode,
        pszAsxSubSystemErrorString );
    printf("When called from source %s line %d\n",__FILE__,nLine);

    printf("Press ENTER to exit\n");
    getchar();
    free(pszAsxErrorString);
    free(pszAsxSubSystemErrorString);
    ASX_System_Delete(hSystem);
    exit(1);
    return 1;
}
Generated on Wed Mar 9 16:02:32 2005 for ASX by doxygen 1.3.9.1


ASX: mux/main.c

mux/main.c

This is an example of how to use the ASX multiplexer control.

/* $Header: /Repository/apps/asx/examples/mux/main.c,v 1.5 2004/08/11 14:13:36 as-age Exp $ */
#include "stdio.h"
#include "stdlib.h"
#include "asx.h"
#include "asxstring.h"

int CheckError(ASX_HANDLE hObj, int nLine);
void PrintControlName(ASX_HANDLE hControl);

ASX_HANDLE hSystem=0;

int main(int argc, char* argv[])
{
    char *pszName;
    ASX_HANDLE hAdapter;
    ASX_HANDLE hMixer;
    ASX_HANDLE hMux;
    ASX_ERROR asxError;
    int nAdapterToUse=0;
    enum asxNODE eNode;
    int nNodeIndex;
    char szName[64];
    int nRequiredLength;
    int nCount;
    int i,nLen;

    // create the system
    ASX_System_Create(ASX_SYSTEM_TYPE_HPI,&hSystem);
    CheckError(hSystem, __LINE__);

    // get the adapter
    asxError = ASX_System_GetAdapter(hSystem,nAdapterToUse,&hAdapter);
    CheckError(hSystem, __LINE__);

    ASX_Adapter_GetName(hAdapter,0,0,&nLen);
    CheckError(hAdapter, __LINE__);
    pszName = (char *)malloc(nLen);
    ASX_Adapter_GetName(hAdapter,pszName,nLen,&nLen);
    CheckError(hAdapter, __LINE__);
    printf("Adapter [%d] is %s \n", nAdapterToUse,pszName);

    // get the mixer handle
    asxError = ASX_Adapter_GetMixer( hAdapter, &hMixer );
    CheckError(hAdapter, __LINE__);

    // get a multiplexer object
    asxError = ASX_Mixer_GetControlByNodeTypeAndIndex(
        hMixer,
        0,0,
        asxNODE_RECORDER,0,
        asxCONTROL_MULTIPLEXER,
        &hMux);
    CheckError(hMixer, __LINE__);
    // print out some control details
    PrintControlName(hMux);

    // Get the selector and print out available selections,
    asxError=0;
    i=0;
    while(!asxError)
    {

        asxError=ASX_Multiplexer_Enumerate( hMux, i,&eNode, &nNodeIndex, &nCount);
        if(i==0)
            printf("Multiplexer has total of %d options\n",nCount);

        if(!asxError)
        {
            ASXSTRING_EnumToString(eNode, szName, 64, &nRequiredLength);
            printf("Option[%d] is %s %d\n",i,szName,nNodeIndex);
            i++;
        }
    }

    // Get the current setting.
    asxError = ASX_Multiplexer_Get(hMux,&eNode,&nNodeIndex);
    ASXSTRING_EnumToString(eNode, szName, 64, &nRequiredLength);
    printf("Multiplexer currently set to enum %d, index %d, %s %d\n",eNode,nNodeIndex,szName,nNodeIndex);

    printf("Press ENTER to exit\n");
    getchar();
    ASX_System_Delete(hSystem);
    return 0;
}

void PrintControlName(ASX_HANDLE hControl)
{
    char *pszName;
    int nLen;
    enum asxCONTROL eControl;

    ASX_Control_GetType(hControl, &eControl);
    ASXSTRING_EnumToString(eControl,0,0,&nLen);
    pszName=(char *)malloc(nLen);
    ASXSTRING_EnumToString(eControl,pszName,nLen,&nLen);
    printf("Control : %s\n",pszName);

    free(pszName);
}

int CheckError(ASX_HANDLE hObj, int nLine)
{
    int nError;
    int asxSubSystemErrorCode=0;
    char *pszAsxErrorString;
    char *pszAsxSubSystemErrorString;
    int nLen1,nLen2;

    ASX_Error_GetLast( hObj, &nError, &asxSubSystemErrorCode);
    if(!nError)
        return 0;
    ASX_Error_GetLastString( hObj, 0,0,&nLen1,0,0,&nLen2);
    pszAsxErrorString = (char *)malloc(nLen1);
    pszAsxSubSystemErrorString = (char *)malloc(nLen2);
    ASX_Error_GetLastString( hObj, pszAsxErrorString,nLen1,&nLen1,pszAsxSubSystemErrorString,nLen2,&nLen2);
    printf("Error: #%d, %s - Subsystem Error: #%ld, %s \n",
        nError,
        pszAsxErrorString,
        asxSubSystemErrorCode,
        pszAsxSubSystemErrorString );
    printf("When called from source %s line %d\n",__FILE__,nLine);

    printf("Press ENTER to exit\n");
    getchar();
    free(pszAsxErrorString);
    free(pszAsxSubSystemErrorString);
    ASX_System_Delete(hSystem);
    exit(1);
    return 1;
}
Generated on Wed Mar 9 16:02:32 2005 for ASX by doxygen 1.3.9.1


ASX: play/main.c

play/main.c

This is an example of how to use the ASX Player control.

/* $Header: /Repository/apps/asx/examples/play/main.c,v 1.8 2004/08/16 18:59:14 as-tfe Exp $ */
#include "stdio.h"
#include "stdlib.h"
#include "asx.h"
#include "asxstring.h"

ASX_HANDLE hSystem=0;

void PrintControlName(ASX_HANDLE hControl);
int CheckError(ASX_HANDLE hObj, int nLine);

int main(int argc, char* argv[])
{
    char *pszName;
    char *pszFormat;
    char *pDummy;
    ASX_HANDLE hAdapter;
    ASX_HANDLE hMixer;
    ASX_HANDLE hPlayer;
    ASX_ERROR asxError;
    int nAdapterToUse=0;
    int nLen;

    if(argc<2)
    {
        printf("Filename to play is a required parameter.\n");
        return -1;
    }

    // create the system
    ASX_System_Create(ASX_SYSTEM_TYPE_HPI,&hSystem);
    CheckError(hSystem, __LINE__);

    // get the adapter
    ASX_System_GetAdapter(hSystem,nAdapterToUse,&hAdapter);
    CheckError(hAdapter, __LINE__);

    ASX_Adapter_GetName(hAdapter,0,0,&nLen);
    CheckError(hAdapter, __LINE__);
    pszName = (char *)malloc(nLen);
    ASX_Adapter_GetName(hAdapter,pszName,nLen,&nLen);
    CheckError(hAdapter, __LINE__);
    printf("Adapter [%d] is %s \n", nAdapterToUse,pszName);
    free(pszName);

    // get the mixer handle
    ASX_Adapter_GetMixer( hAdapter, &hMixer );
    CheckError(hAdapter, __LINE__);

    // get a player object
    asxError = ASX_Mixer_GetControlByNodeTypeAndIndex(
        hMixer,
        asxNODE_PLAYER,0,
        0,0,
        asxCONTROL_PLAYER,
        &hPlayer);
    CheckError(hMixer, __LINE__);

    // print out some control details
    PrintControlName(hPlayer);

    // open the player and pass in the file to be played
    ASX_Player_Open( hPlayer, argv[1]);
    CheckError(hPlayer, __LINE__);

    if(argc>2)
    {
        printf("Start at offset %s milliseconds\n",argv[2]);
        ASX_Player_PreLoad(hPlayer,asxTIMESCALE_MILLISECONDS,strtol(argv[2],&pDummy,10));
    }

    // start playing the file at offset 0 seconds.
    ASX_Player_Start( hPlayer );
    CheckError(hPlayer, __LINE__);

    ASX_Player_Format_GetString(hPlayer, &pszFormat);
    printf("Playing %s Format %s on Device %s\n",argv[1],pszFormat,pszName);

    // wait for playback completion
    printf("Waiting for playback to complete\n");
    ASX_Player_Wait(hPlayer);
    CheckError(hPlayer, __LINE__);

    printf("Playback complete.\n");

    // close the file being played
    ASX_Player_Close(hPlayer);
    CheckError(hPlayer, __LINE__);

/*

Not tested....

// start position other than 0
ASX32_API ASX_ERROR ASX_Player_Start( ASX_HANDLE hPlayer, float fPosition);
ASX32_API ASX_ERROR ASX_Player_Pause( ASX_HANDLE hPlayer);
ASX32_API ASX_ERROR ASX_Player_Stop( ASX_HANDLE hPlayer);
ASX32_API ASX_ERROR ASX_Player_GetPosition( ASX_HANDLE hPlayer, float *pfPosition);
ASX32_API ASX_ERROR ASX_Player_GetState( ASX_HANDLE hPlayer, int *pnState);
ASX32_API ASX_ERROR ASX_Player_SetTimeScale( ASX_HANDLE hPlayer, float fScaleFactor);
*/

    printf("Press ENTER to exit\n");
    getchar();
    ASX_System_Delete(hSystem);
    return 0;
}

void PrintControlName(ASX_HANDLE hControl)
{
    char *pszName;
    int nLen;
    enum asxCONTROL eControl;

    ASX_Control_GetType(hControl, &eControl);
    ASXSTRING_EnumToString(eControl,0,0,&nLen);
    pszName=(char *)malloc(nLen);
    ASXSTRING_EnumToString(eControl,pszName,nLen,&nLen);
    printf("Control : %s\n",pszName);

    free(pszName);
}
int CheckError(ASX_HANDLE hObj, int nLine)
{
    int nError;
    int asxSubSystemErrorCode=0;
    char *pszAsxErrorString;
    char *pszAsxSubSystemErrorString;
    int nLen1,nLen2;

    ASX_Error_GetLast( hObj, &nError, &asxSubSystemErrorCode);
    if(!nError)
        return 0;
    ASX_Error_GetLastString( hObj, 0,0,&nLen1,0,0,&nLen2);
    pszAsxErrorString = (char *)malloc(nLen1);
    pszAsxSubSystemErrorString = (char *)malloc(nLen2);
    ASX_Error_GetLastString( hObj, pszAsxErrorString,nLen1,&nLen1,pszAsxSubSystemErrorString,nLen2,&nLen2);
    printf("Error: #%d, %s - Subsystem Error: #%ld, %s \n",
        nError,
        pszAsxErrorString,
        asxSubSystemErrorCode,
        pszAsxSubSystemErrorString );
    printf("When called from source %s line %d\n",__FILE__,nLine);

    printf("Press ENTER to exit\n");
    getchar();
    free(pszAsxErrorString);
    free(pszAsxSubSystemErrorString);
    ASX_System_Delete(hSystem);
    exit(1);
    return 1;
}
Generated on Wed Mar 9 16:02:33 2005 for ASX by doxygen 1.3.9.1


ASX: record/main.c

record/main.c

This is an example of how to use the ASX Recorder control.

/* $Header: /Repository/apps/asx/examples/record/main.c,v 1.7 2004/10/13 18:14:39 as-tfe Exp $ */
#include "stdio.h"
#include "stdlib.h"
#include "asx.h"

ASX_HANDLE hSystem=0;

int CheckError(ASX_HANDLE hObj, int nLine);

int main(int argc, char* argv[])
{
    ASX_HANDLE hAdapter;
    ASX_HANDLE hMixer;
    ASX_HANDLE hRecorder;
    ASX_ERROR asxError;
    enum asxFILE_MODE eFileMode = asxFILE_MODE_CREATE;
    int nAdapterToUse=0;
    int c;
    int nPaused = 0;
    int nKeepGoing = 1;

    if(argc<2)
    {
        printf("Filename to record is a required parameter.\n");
        return -1;
    }
    if( (argv[1][0] == '-' || argv[1][0] == '/') &&
        (argv[1][1] == 'a' || argv[1][1] == 'A') )
    {
        eFileMode = asxFILE_MODE_APPEND;
        if(argc<3)
        {
            printf("Filename to record is a required parameter.\n");
            return -1;
        }
    }

    // create the system
    ASX_System_Create(ASX_SYSTEM_TYPE_HPI,&hSystem);
    CheckError(hSystem, __LINE__);

    // get the adapter
    ASX_System_GetAdapter(hSystem,nAdapterToUse,&hAdapter);
    CheckError(hAdapter, __LINE__);

    // get the mixer handle
    ASX_Adapter_GetMixer( hAdapter, &hMixer );
    CheckError(hAdapter, __LINE__);

    // get a recorder object
    asxError = ASX_Mixer_GetControlByNodeTypeAndIndex(
        hMixer,
        0,0,
        asxNODE_RECORDER,0,
        asxCONTROL_RECORDER,
        &hRecorder);
    CheckError(hMixer, __LINE__);

    // open the player and pass in the file to be played
    ASX_Recorder_Open(
        hRecorder, argv[argc-1],
        asxFILE_FORMAT_WAV,     // file format = asxFILE_FORMAT_WAV, _MP3, _RAW
        eFileMode,              // file mode = asxFILE_MODE_CREATE or _APPEND
        2,                      // channels = 1 or 2 at present
        asxAUDIO_FORMAT_PCM16,  // audio format = asxAUDIO_FORMAT_PCM8, _PCM16, _PCM24, _PCM32, _PCM32_FLOAT, _MPEG_L2, _MPEG_L3, _DOLBY_AC2, _MPEG_AACPLUS
        44100,                  // sample rate = 8 to 192000 Hz
        0,                      // bitrate = 8000 to 384000 bps (MPEG only
        asxRECORD_MODE_STEREO   // asxRECORD_MODE_STEREO, _JOINT_STEREO, _DUAL_MONO
    );
    CheckError(hRecorder, __LINE__);

    // start playing the file at offset 0 seconds.
    ASX_Recorder_Start( hRecorder );
    CheckError(hRecorder, __LINE__);

    // wait for record completion
    while(nKeepGoing){
        if(nPaused)
            printf("Press \'r\' to resume or \'x\' to end recording.\nCommand: ");
        else
            printf("Press \'p\' to pause or \'x\' to end recording.\nCommand: ");

        c = getchar();
        // get the rest of the line
        while(getchar()!='\n');
        switch(c){
        case 'p':
            if(nPaused)
            {
                printf("Invalid command.\n");
            }
            else
            {
                ASX_Recorder_Pause( hRecorder );
                nPaused = 1;
            }
            break;
        case 'r':
            if(!nPaused)
            {
                printf("Invalid command.\n");
            }
            else
            {
                ASX_Recorder_Start( hRecorder );
                nPaused = 0;
            }
            break;
        case 'x':
            nKeepGoing = 0;
            break;
        default:
            printf("Invalid command.\n");
            break;
        }
    }

    ASX_Recorder_Stop( hRecorder );
    CheckError(hRecorder, __LINE__);

    printf("Recording complete.\n");

    // close the file being played
    ASX_Recorder_Close(hRecorder);
    CheckError(hRecorder, __LINE__);

    printf("Press ENTER to exit\n");
    getchar();
    ASX_System_Delete(hSystem);
    return 0;
}

int CheckError(ASX_HANDLE hObj, int nLine)
{
    int nError;
    int asxSubSystemErrorCode=0;
    char *pszAsxErrorString;
    char *pszAsxSubSystemErrorString;
    int nLen1,nLen2;

    ASX_Error_GetLast( hObj, &nError, &asxSubSystemErrorCode);
    if(!nError)
        return 0;
    ASX_Error_GetLastString( hObj, 0,0,&nLen1,0,0,&nLen2);
    pszAsxErrorString = (char *)malloc(nLen1);
    pszAsxSubSystemErrorString = (char *)malloc(nLen2);
    ASX_Error_GetLastString( hObj, pszAsxErrorString,nLen1,&nLen1,pszAsxSubSystemErrorString,nLen2,&nLen2);
    printf("Error: #%d, %s - Subsystem Error: #%ld, %s \n",
        nError,
        pszAsxErrorString,
        asxSubSystemErrorCode,
        pszAsxSubSystemErrorString );
    printf("When called from source %s line %d\n",__FILE__,nLine);

    printf("Press ENTER to exit\n");
    getchar();
    free(pszAsxErrorString);
    free(pszAsxSubSystemErrorString);
    ASX_System_Delete(hSystem);
    exit(1);
    return 1;
}
Generated on Wed Mar 9 16:02:33 2005 for ASX by doxygen 1.3.9.1


ASX: system/main.c

system/main.c

This is an example of how to use the ASX System functions.

/* $Header: /Repository/apps/asx/examples/system/main.c,v 1.5 2004/08/11 14:13:46 as-age Exp $ */
#include "stdio.h"
#include "stdlib.h"
#include "asx.h"

int main(int argc, char* argv[])
{

    ASX_HANDLE system;
    ASX_ERROR asxError;
    char *pszAsxSubsysVersion;
    char *pszAsxVersion;
    int nAdapters=0;
    char *pszSystem;
    int nLen,nLen1,nLen2;

    printf("AudioScience ASX - System Example\n");

    asxError = ASX_System_Create(ASX_SYSTEM_TYPE_HPI,&system);

    if(asxError)
    {
        int asxSubSystemErrorCode=0;
        char *pszAsxErrorString;
        char *pszAsxSubSystemErrorString;

        ASX_Error_GetLast( system, &asxError, &asxSubSystemErrorCode);

        ASX_Error_GetLastString( system, 0, 0, &nLen1, 0, 0, &nLen2);
        pszAsxErrorString = (char *)malloc(nLen1);
        pszAsxSubSystemErrorString = (char *)malloc(nLen2);
        ASX_Error_GetLastString( system, pszAsxErrorString, nLen1, &nLen1, pszAsxSubSystemErrorString, nLen2, &nLen2);
        printf("Error: #%d, %s - Subsystem Error: #%ld, %s \n", asxError,  pszAsxErrorString,
        asxSubSystemErrorCode, pszAsxSubSystemErrorString );
        getchar();
        free(pszAsxErrorString);
        free(pszAsxSubSystemErrorString);
        return(0);
    }

    asxError = ASX_System_GetVersion(system, 0,0,&nLen1, 0, 0, &nLen2);
    pszAsxVersion = (char *)malloc(nLen1);
    pszAsxSubsysVersion = (char *)malloc(nLen2);
    asxError = ASX_System_GetVersion(system, pszAsxVersion, nLen1, &nLen1, pszAsxSubsysVersion, nLen2, &nLen2);

    asxError = ASX_System_GetName( system, 0,0,&nLen );
    pszSystem = (char *)malloc(nLen);
    asxError = ASX_System_GetName( system, pszSystem,nLen,&nLen );
    printf("System Ver %s\nSubsystem=%s Ver %s\n", pszAsxVersion, pszSystem, pszAsxSubsysVersion);

    asxError = ASX_System_GetAdapterCount(system,&nAdapters);
    printf("There are %d audio adapters in the system \n", nAdapters);

    printf("Press ENTER to exit\n");
    getchar();
    ASX_System_Delete(system);
    free(pszAsxVersion);
    free(pszAsxSubsysVersion);
    free(pszSystem);
    return(0);
}
Generated on Wed Mar 9 16:02:33 2005 for ASX by doxygen 1.3.9.1


ASX: tuner/main.c

tuner/main.c

This is an example of how to use the ASX tuner control functions.

/* $Header: /Repository/apps/asx/examples/tuner/main.c,v 1.6 2004/08/11 14:13:47 as-age Exp $ */
#include "stdio.h"
#include "stdlib.h"
#include "asx.h"
#include "asxstring.h"

int CheckError(ASX_HANDLE hObj, int nLine);
void PrintControlName(ASX_HANDLE hControl);
ASX_HANDLE hSystem;

int main(int argc, char* argv[])
{

    char *pszName;
    ASX_HANDLE hAdapter;
    ASX_HANDLE hMixer;
    ASX_HANDLE hTuner;
    ASX_ERROR asxError;
    int nAdapterToUse=0;
    int i,nLen;
    unsigned long lFreq;
    float fMin,fMax,fStep,fGain;
    float fLevel;
    enum asxTUNERBAND eBand;
    int nCount;
    char szString[64];
    int nRequiredStringSize;
    unsigned int nStatusBits,nStatusMask;

    // create the system
    ASX_System_Create(ASX_SYSTEM_TYPE_HPI,&hSystem);
    CheckError(hSystem, __LINE__);

    // get the adapter
    asxError = ASX_System_GetAdapter(hSystem,nAdapterToUse,&hAdapter);
    CheckError(hSystem, __LINE__);

    ASX_Adapter_GetName(hAdapter,0,0,&nLen);
    CheckError(hAdapter, __LINE__);
    pszName = (char *)malloc(nLen);
    ASX_Adapter_GetName(hAdapter,pszName,nLen,&nLen);
    CheckError(hAdapter, __LINE__);
    printf("Adapter [%d] is %s \n", nAdapterToUse,pszName);

    // get the mixer handle
    asxError = ASX_Adapter_GetMixer( hAdapter, &hMixer );
    CheckError(hAdapter, __LINE__);

    // get a tuner object (index 0)
    asxError = ASX_Mixer_GetControlByNodeTypeAndIndex(
        hMixer,
        asxNODE_TUNER_IN,0,
        0,0,
        asxCONTROL_TUNER,
        &hTuner);
    CheckError(hMixer, __LINE__);
    // print out some control details
    PrintControlName(hTuner);

    // List all the bands and print them out
    asxError=0;
    i=0;
    while(!asxError)
    {
        asxError=ASX_Tuner_EnumerateBand( hTuner, i, &eBand, &nCount);
        if(nCount==0)
            printf("Total tuner bands available is %d\n",nCount);

        if(!asxError)
        {
            ASXSTRING_EnumToString(eBand, szString, 64, &nRequiredStringSize);
            printf("Tuenr band [%d] is %s\n",szString);
            i++;
        }
    }

    // setting Tuner to band FM
    asxError=ASX_Tuner_SetBand( hTuner, asxTUNERBAND_FM );
    CheckError(hTuner, __LINE__);

    asxError = ASX_Tuner_GetFrequency( hTuner, &lFreq);
    CheckError(hTuner, __LINE__);
    asxError = ASX_Tuner_SetFrequency( hTuner, lFreq);
    CheckError(hTuner, __LINE__);

    asxError = ASX_Tuner_GetGainRange( hTuner, &fMin,&fMax,&fStep);
    CheckError(hTuner, __LINE__);
    printf("Gain range, min=%f dB, Max = %f dB, Step size is %f dB\n",
                fMin,
                fMax,
                fStep);

    asxError = ASX_Tuner_GetGain( hTuner, &fGain);
    CheckError(hTuner, __LINE__);
    asxError = ASX_Tuner_SetGain( hTuner, fGain);
    CheckError(hTuner, __LINE__);

    asxError = ASX_Tuner_GetRFLevel( hTuner, &fLevel);
    CheckError(hTuner, __LINE__);
    printf("RF level is %f \n",fGain);

    // get the status
    asxError = ASX_Tuner_GetStatus( hTuner, &nStatusMask, &nStatusBits);
    CheckError(hTuner, __LINE__);
    printf("Tuner status mask 0x%08X, vale 0x%08X\n",nStatusMask,nStatusBits);

    printf("Press ENTER to exit\n");
    getchar();
    ASX_System_Delete(hSystem);
    return 0;
}

void PrintControlName(ASX_HANDLE hControl)
{
    char *pszName;
    int nLen;
    enum asxCONTROL eControl;

    ASX_Control_GetType(hControl, &eControl);
    ASXSTRING_EnumToString(eControl,0,0,&nLen);
    pszName=(char *)malloc(nLen);
    ASXSTRING_EnumToString(eControl,pszName,nLen,&nLen);
    printf("Control : %s\n",pszName);

    free(pszName);
}

int CheckError(ASX_HANDLE hObj, int nLine)
{
    int nError;
    int asxSubSystemErrorCode=0;
    char *pszAsxErrorString;
    char *pszAsxSubSystemErrorString;
    int nLen1,nLen2;

    ASX_Error_GetLast( hObj, &nError, &asxSubSystemErrorCode);
    if(!nError)
        return 0;
    ASX_Error_GetLastString( hObj, 0,0,&nLen1,0,0,&nLen2);
    pszAsxErrorString = (char *)malloc(nLen1);
    pszAsxSubSystemErrorString = (char *)malloc(nLen2);
    ASX_Error_GetLastString( hObj, pszAsxErrorString,nLen1,&nLen1,pszAsxSubSystemErrorString,nLen2,&nLen2);
    printf("Error: #%d, %s - Subsystem Error: #%ld, %s \n",
        nError,
        pszAsxErrorString,
        asxSubSystemErrorCode,
        pszAsxSubSystemErrorString );
    printf("When called from source %s line %d\n",__FILE__,nLine);

    printf("Press ENTER to exit\n");
    getchar();
    free(pszAsxErrorString);
    free(pszAsxSubSystemErrorString);
    ASX_System_Delete(hSystem);
    exit(1);
    return 1;
}
Generated on Wed Mar 9 16:02:33 2005 for ASX by doxygen 1.3.9.1


ASX: Globals

Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- _ -

  • _RPT0 : asx.h
  • _RPT1 : asx.h

- a -

  • ASX_Adapter_GetMixer() : asx.h
  • ASX_Adapter_GetName() : asx.h
  • ASX_AdapterInfo_GetDspUtilization() : asx.h
  • ASX_AdapterInfo_GetRevision() : asx.h
  • ASX_AdapterInfo_GetSerialNumber() : asx.h
  • ASX_AdapterMode_Enumerate() : asx.h
  • ASX_AdapterMode_Get() : asx.h
  • ASX_AdapterMode_Set() : asx.h
  • ASX_AESEBUReceiver_GetDigitalMode() : asx.h
  • ASX_AESEBUReceiver_GetErrorStatus() : asx.h
  • ASX_AESEBUReceiver_GetSampleRate() : asx.h
  • ASX_AESEBUReceiver_SetDigitalMode() : asx.h
  • ASX_AESEBUTransmitter_GetDigitalMode() : asx.h
  • ASX_AESEBUTransmitter_SetDigitalMode() : asx.h
  • ASX_ChannelMode_Enumerate() : asx.h
  • ASX_ChannelMode_Get() : asx.h
  • ASX_ChannelMode_Set() : asx.h
  • ASX_Control_GetDestinationNode() : asx.h
  • ASX_Control_GetSourceNode() : asx.h
  • ASX_Control_GetType() : asx.h
  • ASX_ERROR_CALLBACK : asx.h
  • ASX_Error_GetLast() : asx.h
  • ASX_Error_GetLastString() : asx.h
  • ASX_GetGenericControlName() : asx.h
  • ASX_GPIO_GetProperties() : asx.h
  • ASX_GPIO_InputGet() : asx.h
  • ASX_GPIO_OutputSet() : asx.h
  • ASX_HANDLE : asx.h
  • ASX_Level_Get() : asx.h
  • ASX_Level_Set() : asx.h
  • ASX_LONG_STRING_SIZE : asx.h
  • ASX_Meter_GetChannels() : asx.h
  • ASX_Meter_GetPeak() : asx.h
  • ASX_Meter_GetRMS() : asx.h
  • ASX_Meter_SetBallistics() : asx.h
  • ASX_Mixer_GetControl() : asx.h
  • ASX_Mixer_GetControlByNode() : asx.h
  • ASX_Mixer_GetControlByNodeTypeAndIndex() : asx.h
  • ASX_Mixer_GetControlCount() : asx.h
  • ASX_Mixer_GetDestinationNode() : asx.h
  • ASX_Mixer_GetDestinationNodeCount() : asx.h
  • ASX_Mixer_GetNodeByType() : asx.h
  • ASX_Mixer_GetNodeIndex() : asx.h
  • ASX_Mixer_GetNodeType() : asx.h
  • ASX_Mixer_GetNodeTypeCount() : asx.h
  • ASX_Mixer_GetSourceNode() : asx.h
  • ASX_Mixer_GetSourceNodeCount() : asx.h
  • ASX_Multiplexer_Enumerate() : asx.h
  • ASX_Multiplexer_Get() : asx.h
  • ASX_Multiplexer_Set() : asx.h
  • ASX_NvMem_GetSizeInBytes() : asx.h
  • ASX_NvMem_Read() : asx.h
  • ASX_NvMem_Write() : asx.h
  • ASX_Player_Close() : asx.h
  • ASX_Player_Format_GetDetails() : asx.h
  • ASX_Player_Format_GetString() : asx.h
  • ASX_Player_GetFilename() : asx.h
  • ASX_Player_GetLoopMode() : asx.h
  • ASX_Player_GetPosition() : asx.h
  • ASX_Player_GetState() : asx.h
  • ASX_Player_GetTimeScale() : asx.h
  • ASX_Player_Open() : asx.h
  • ASX_Player_Pause() : asx.h
  • ASX_Player_PreLoad() : asx.h
  • ASX_Player_SetLoopMode() : asx.h
  • ASX_Player_SetTimeScale() : asx.h
  • ASX_Player_Start() : asx.h
  • ASX_Player_Stop() : asx.h
  • ASX_Player_Wait() : asx.h
  • ASX_Recorder_Close() : asx.h
  • ASX_Recorder_GetFilename() : asx.h
  • ASX_Recorder_GetPosition() : asx.h
  • ASX_Recorder_GetState() : asx.h
  • ASX_Recorder_Open() : asx.h
  • ASX_Recorder_Pause() : asx.h
  • ASX_Recorder_Start() : asx.h
  • ASX_Recorder_Stop() : asx.h
  • ASX_SampleClock_EnumerateClockSource() : asx.h
  • ASX_SampleClock_GetClockSource() : asx.h
  • ASX_SampleClock_GetSampleRate() : asx.h
  • ASX_SampleClock_SetClockSource() : asx.h
  • ASX_SampleClock_SetSampleRate() : asx.h
  • ASX_SHORT_STRING_SIZE : asx.h
  • ASX_System_Create() : asx.h
  • ASX_System_Delete() : asx.h
  • ASX_System_GetAdapter() : asx.h
  • ASX_System_GetAdapterCount() : asx.h
  • ASX_System_GetName() : asx.h
  • ASX_System_GetVersion() : asx.h
  • ASX_System_RegisterErrorCallback() : asx.h
  • ASX_SYSTEM_TYPE_ALSA : asx.h
  • ASX_SYSTEM_TYPE_DIRECTX : asx.h
  • ASX_SYSTEM_TYPE_HPI : asx.h
  • ASX_SYSTEM_TYPE_PCXTOOLS : asx.h
  • ASX_SYSTEM_TYPE_PORTAUDIO : asx.h
  • ASX_SYSTEM_TYPE_WAVE : asx.h
  • ASX_TIME : asx.h
  • ASX_Tuner_EnumerateBand() : asx.h
  • ASX_Tuner_GetBand() : asx.h
  • ASX_Tuner_GetFrequency() : asx.h
  • ASX_Tuner_GetGain() : asx.h
  • ASX_Tuner_GetGainRange() : asx.h
  • ASX_Tuner_GetRawRFLevel() : asx.h
  • ASX_Tuner_GetRFLevel() : asx.h
  • ASX_Tuner_GetStatus() : asx.h
  • ASX_Tuner_SetBand() : asx.h
  • ASX_Tuner_SetFrequency() : asx.h
  • ASX_Tuner_SetGain() : asx.h
  • ASX_Tuner_SetMode() : asx.h
  • ASX_VERSION : asx.h
  • ASX_Volume_GetChannels() : asx.h
  • ASX_Volume_GetGain() : asx.h
  • ASX_Volume_GetRange() : asx.h
  • ASX_Volume_SetAutofade() : asx.h
  • ASX_Volume_SetGain() : asx.h
  • ASX_Vox_GetLevel() : asx.h
  • ASX_Vox_GetRange() : asx.h
  • ASX_Vox_SetLevel() : asx.h
  • asxADAPTERMODE : asx.h
  • asxADAPTERMODE_16_PLAY : asx.h
  • asxADAPTERMODE_1_PLAY : asx.h
  • asxADAPTERMODE_4_PLAY : asx.h
  • asxADAPTERMODE_6_PLAY : asx.h
  • asxADAPTERMODE_8_PLAY : asx.h
  • asxADAPTERMODE_ILLEGAL : asx.h
  • asxADAPTERMODE_MODE_1 : asx.h
  • asxADAPTERMODE_MODE_2 : asx.h
  • asxADAPTERMODE_MODE_3 : asx.h
  • asxADAPTERMODE_MULTICHANNEL : asx.h
  • asxAESEBU_ERROR : asx.h
  • asxAESEBU_ERROR_BIPHASE_VIOLATION : asx.h
  • asxAESEBU_ERROR_CHANNELSTATUS_CRC : asx.h
  • asxAESEBU_ERROR_NOT_LOCKED : asx.h
  • asxAESEBU_ERROR_PARITY_ERROR : asx.h
  • asxAESEBU_ERROR_POOR_QUALITY : asx.h
  • asxAESEBU_ERROR_VALIDITY : asx.h
  • asxAESEBU_STATUS : asx.h
  • asxAUDIO_FORMAT : asx.h
  • asxAUDIO_FORMAT_DOLBY_AC2 : asx.h
  • asxAUDIO_FORMAT_MPEG_AACPLUS : asx.h
  • asxAUDIO_FORMAT_MPEG_L2 : asx.h
  • asxAUDIO_FORMAT_MPEG_L3 : asx.h
  • asxAUDIO_FORMAT_PCM16 : asx.h
  • asxAUDIO_FORMAT_PCM24 : asx.h
  • asxAUDIO_FORMAT_PCM32 : asx.h
  • asxAUDIO_FORMAT_PCM32_FLOAT : asx.h
  • asxAUDIO_FORMAT_PCM8 : asx.h
  • asxCHANNELMODE : asx.h
  • asxCHANNELMODE_ILLEGAL : asx.h
  • asxCHANNELMODE_LEFTTOSTEREO : asx.h
  • asxCHANNELMODE_NORMAL : asx.h
  • asxCHANNELMODE_RIGHTTOSTEREO : asx.h
  • asxCHANNELMODE_STEREOTOLEFT : asx.h
  • asxCHANNELMODE_STEREOTORIGHT : asx.h
  • asxCHANNELMODE_SWAP : asx.h
  • asxCONTROL : asx.h
  • asxCONTROL_ADAPTER_INFO : asx.h
  • asxCONTROL_ADAPTER_MODE : asx.h
  • asxCONTROL_AES18_BLOCK_GENERATOR : asx.h
  • asxCONTROL_AES18_RECEIVER : asx.h
  • asxCONTROL_AES18_TRANSMITTER : asx.h
  • asxCONTROL_AESEBU_RECEIVER : asx.h
  • asxCONTROL_AESEBU_TRANSMITTER : asx.h
  • asxCONTROL_BIT_STREAM : asx.h
  • asxCONTROL_CHANNEL_MODE : asx.h
  • asxCONTROL_COMPANDER : asx.h
  • asxCONTROL_CONNECTION : asx.h
  • asxCONTROL_GENERIC : asx.h
  • asxCONTROL_GPIO : asx.h
  • asxCONTROL_INVALID : asx.h
  • asxCONTROL_LAST_CONTROL : asx.h
  • asxCONTROL_LEVEL : asx.h
  • asxCONTROL_METER : asx.h
  • asxCONTROL_MICROPHONE : asx.h
  • asxCONTROL_MULTIPLEXER : asx.h
  • asxCONTROL_MUTE : asx.h
  • asxCONTROL_NV_MEM : asx.h
  • asxCONTROL_ON_OFF_SWITCH : asx.h
  • asxCONTROL_PARAMETRIC_EQ : asx.h
  • asxCONTROL_PLAYER : asx.h
  • asxCONTROL_RECORDER : asx.h
  • asxCONTROL_SAMPLE_CLOCK : asx.h
  • asxCONTROL_TUNER : asx.h
  • asxCONTROL_VOLUME : asx.h
  • asxCONTROL_VOX : asx.h
  • asxDIGITAL_MODE : asx.h
  • asxDIGITAL_MODE_AESEBU : asx.h
  • asxDIGITAL_MODE_SPDIF : asx.h
  • asxERROR : asx.h
  • asxERROR_AES18 : asx.h
  • asxERROR_ALREADY_OPEN : asx.h
  • asxERROR_ASXOBJECT : asx.h
  • asxERROR_BUFFER_TOO_SMALL : asx.h
  • asxERROR_COMMUNICATING_WITH_DEVICE : asx.h
  • asxERROR_ENUMERATE_INDEX_OUT_OF_RANGE : asx.h
  • asxERROR_FILE_OPEN_FAILED : asx.h
  • asxERROR_INDEX_OUT_OF_RANGE : asx.h
  • asxERROR_INTERNAL_BUFFERING_ERROR : asx.h
  • asxERROR_INVALID_CONTROL : asx.h
  • asxERROR_INVALID_CONTROL_NOT_FOUND : asx.h
  • asxERROR_INVALID_CONTROL_VALUE : asx.h
  • asxERROR_INVALID_FORMAT : asx.h
  • asxERROR_INVALID_NUMBER_OF_CHANNELS : asx.h
  • asxERROR_INVALID_OPERATION : asx.h
  • asxERROR_NO_ERROR : asx.h
  • asxERROR_NOT_OPEN : asx.h
  • asxERROR_OUTOFMEMORY : asx.h
  • asxERROR_PLAYER_FILEOPENERROR : asx.h
  • asxERROR_PLAYER_FILEREADERROR : asx.h
  • asxERROR_PLAYER_INTERNAL_STATE_FAILURE : asx.h
  • asxERROR_PLAYER_INVALIDFILEFORMAT : asx.h
  • asxERROR_PLAYER_NOFILE : asx.h
  • asxERROR_PLAYER_OUT_OF_SEQUENCE_CALL : asx.h
  • asxERROR_PLAYER_TIME_OUT : asx.h
  • asxERROR_PLAYER_TWAV : asx.h
  • asxERROR_PLAYER_UNSUPPORTEDFORMAT : asx.h
  • asxERROR_RECORDER_FILECREATEERROR : asx.h
  • asxERROR_RECORDER_FILEWRITEERROR : asx.h
  • asxERROR_RECORDER_FORMATMISMATCH : asx.h
  • asxERROR_RECORDER_INTERNAL_STATE_FAILURE : asx.h
  • asxERROR_RECORDER_INVALIDFILENAME : asx.h
  • asxERROR_RECORDER_OUT_OF_SEQUENCE_CALL : asx.h
  • asxERROR_RECORDER_TIME_OUT : asx.h
  • asxERROR_RECORDER_TWAV : asx.h
  • asxERROR_STARTING_DEVICE : asx.h
  • asxERROR_UNIMPLEMENTED : asx.h
  • asxERROR_UNKNOWN : asx.h
  • asxFILE_FORMAT : asx.h
  • asxFILE_FORMAT_RAW : asx.h
  • asxFILE_FORMAT_WAV : asx.h
  • asxFILE_MODE : asx.h
  • asxFILE_MODE_APPEND : asx.h
  • asxFILE_MODE_CREATE : asx.h
  • asxMETER_PEAK : asx.h
  • asxMETER_RMS : asx.h
  • asxMETER_TYPE : asx.h
  • asxNODE : asx.h
  • asxNODE_ADAPTER : asx.h
  • asxNODE_BITSTREAM_IN : asx.h
  • asxNODE_CLOCK_SOURCE_IN : asx.h
  • asxNODE_DIGITAL_IN : asx.h
  • asxNODE_DIGITAL_OUT : asx.h
  • asxNODE_INVALID : asx.h
  • asxNODE_LAST_DEST_NODE : asx.h
  • asxNODE_LAST_SOURCE_NODE : asx.h
  • asxNODE_LINE_IN : asx.h
  • asxNODE_LINE_OUT : asx.h
  • asxNODE_MICROPHONE_IN : asx.h
  • asxNODE_NONE : asx.h
  • asxNODE_PLAYER : asx.h
  • asxNODE_RADIO_FREQ_IN : asx.h
  • asxNODE_RADIO_FREQ_OUT : asx.h
  • asxNODE_RECORDER : asx.h
  • asxNODE_SPEAKER_OUT : asx.h
  • asxNODE_TUNER_IN : asx.h
  • asxPLAYER_DONE : asx.h
  • asxPLAYER_INIT : asx.h
  • asxPLAYER_OPEN : asx.h
  • asxPLAYER_PAUSED : asx.h
  • asxPLAYER_RUNNING : asx.h
  • asxPLAYER_STATE : asx.h
  • asxRECORD_MODE : asx.h
  • asxRECORD_MODE_DONT_CARE : asx.h
  • asxRECORD_MODE_DUAL_MONO : asx.h
  • asxRECORD_MODE_JOINT_STEREO : asx.h
  • asxRECORD_MODE_MONO : asx.h
  • asxRECORD_MODE_STEREO : asx.h
  • asxRECORDER_DONE : asx.h
  • asxRECORDER_INIT : asx.h
  • asxRECORDER_OPEN : asx.h
  • asxRECORDER_PAUSED : asx.h
  • asxRECORDER_RUNNING : asx.h
  • asxRECORDER_STATE : asx.h
  • asxSAMPLE_CLOCK_SOURCE : asx.h
  • asxSAMPLE_CLOCK_SOURCE_ADAPTER : asx.h
  • asxSAMPLE_CLOCK_SOURCE_AESEBU : asx.h
  • asxSAMPLE_CLOCK_SOURCE_SMPTE : asx.h
  • asxSAMPLE_CLOCK_SOURCE_WORD : asx.h
  • asxSAMPLE_CLOCK_SOURCE_WORD_HEADER : asx.h
  • ASXSTRING_EnumToString() : asxstring.h
  • asxTIMESCALE : asx.h
  • asxTIMESCALE_BYTES : asx.h
  • asxTIMESCALE_INVALID : asx.h
  • asxTIMESCALE_MILLISECONDS : asx.h
  • asxTIMESCALE_SAMPLES : asx.h
  • asxTUNER_STATUS : asx.h
  • asxTUNER_STATUS_FM_STEREO : asx.h
  • asxTUNER_STATUS_PLL_LOCKED : asx.h
  • asxTUNER_STATUS_VIDEO_COLOR_PRESENT : asx.h
  • asxTUNER_STATUS_VIDEO_HORZ_SYNC_MISSING : asx.h
  • asxTUNER_STATUS_VIDEO_IS_60HZ : asx.h
  • asxTUNER_STATUS_VIDEO_VALID : asx.h
  • asxTUNERBAND : asx.h
  • asxTUNERBAND_AM : asx.h
  • asxTUNERBAND_FM : asx.h
  • asxTUNERBAND_FM_STEREO : asx.h
  • asxTUNERBAND_TV : asx.h
  • asxTUNERMODE : asx.h
  • asxTUNERMODE_RSS : asx.h
  • asxTUNERMODE_RSS_DISABLE : asx.h
  • asxTUNERMODE_RSS_ENABLE : asx.h
  • asxVOLUME_AUTOFADE : asx.h
  • asxVOLUME_AUTOFADE_LINEAR : asx.h
  • asxVOLUME_AUTOFADE_LOG : asx.h
Generated on Wed Mar 9 16:02:41 2005 for ASX by doxygen 1.3.9.1


ASX: Page Index

ASX Related Pages

Here is a list of all related documentation pages:
  • Porting Applications from PCXTools
Generated on Wed Mar 9 16:02:41 2005 for ASX by doxygen 1.3.9.1


ASX: Porting Applications from PCXTools

Porting Applications from PCXTools

The following is a guide to converting an application that uses Digigram’s PCXTools API to use the ASX API.

Global

TOOLRegister(),ToolUnregister()

Call ASX_CreateSystem() and ASX_DeleteSystem().

TOOLSetOEMAuthorizationDll

No corresponding ASX call

TOOLGetLastError, TOOLGetErrorString

Call ASX_GetLastError() and ASX_GetLastErrorString()

Configuration

TOOLGetVersions

TOOLHowManyTotalOutputs

TOOLHowManyTotalInputs

TOOLGetBoardInfos

TOOLGetBoardName

Pipe

TOOLAllocatePipe

TOOLAllocatePipeEx

TOOLReleasePipe

TOOLPipeStart

TOOLPipeStop

TOOLPipeSetLevel

TOOLPipeSetMonitoringMute

TOOLPipeSetClock

TOOLPipeDefineDigitalInput

TOOLPipeSetStretch

TOOLPipeGetVuMeter

TOOLPipeGetClock

TOOLPipeGetPosition

Stream

TOOLPlayFile

TOOLPipeScrubFile

TOOLPlayFileWithLevels

TOOLRecordFile

TOOLStreamStop

TOOLStreamSetDigitalLevel

TOOLStreamSetPanLevel

TOOLStreamGoToLevel

TOOLStreamSetRecordFormat

TOOLStreamSetMpegEqualization

TOOLStreamGetPosition

TOOLStreamGetStatus

Offline

TOOLOfflineGetProgress

TOOLOfflineAbortOperation

TOOLOfflineReserveChannel

TOOLOfflineSetAncillaryData

TOOLOfflineLinkPipes

Misc

TOOLGetOffsetInputLevel

TOOLGetOffsetOutputLevel

TOOLConvertEx

TOOLConvertPart

TOOLConvertSetLevel

TOOLStretchEx

TOOLFileInfo

TOOLFileGetNormalizeInfo

TOOLGetBoardExternalClock

TOOLGetDigitalInputExternalClock

Generated on Wed Mar 9 16:02:34 2005 for ASX by doxygen 1.3.9.1


ASX: asx.h Source File

asx.h

Go to the documentation of this file.
00001 /*****************************************************************************************
00002 * $Header: /Repository/apps/asx/asx.h,v 1.175 2005/02/04 16:09:48 as-tfe Exp $
00003 *
00004 * ASX.H
00005 * Definitions for cross platform/API audio class library
00006 *
00007 * Copyright (C) AudioScience 2003
00008 *****************************************************************************************/
00009
00010 #ifndef _ASX_H_
00011 #define _ASX_H_
00012
00013
00014 // The following ifdef block is the standard way of creating macros which make exporting
00015 // from a DLL simpler. All files within this DLL are compiled with the ASX32_EXPORTS
00016 // symbol defined on the command line. this symbol should not be defined on any project
00017 // that uses this DLL. This way any other project whose source files include this file see
00018 // ASX32_API functions as being imported from a DLL, wheras this DLL sees symbols
00019 // defined with this macro as being exported.
00020 #ifdef ASX32_EXPORTS
00021 #define ASX32_API __declspec(dllexport)
00022 #endif
00023 #ifdef ASX32_IMPORTS
00024 #define ASX32_API __declspec(dllimport)
00025 #endif
00026 #ifndef ASX32_API
00027 #define ASX32_API
00028 #endif
00029
00154 #ifdef __cplusplus
00155 extern "C" {
00156 #endif
00157
00158 #ifndef ASX_VERSION
00159 #define ASX_VERSION "294rc6"
00160 #endif
00161
00162 /**************************
00163  * Defines
00164  **************************/
00165
00166 #define ASX_SYSTEM_TYPE_HPI 0
00167 #define ASX_SYSTEM_TYPE_WAVE 1
00168 #define ASX_SYSTEM_TYPE_ALSA 2
00169 #define ASX_SYSTEM_TYPE_DIRECTX 3
00170 #define ASX_SYSTEM_TYPE_PORTAUDIO 4
00171 #define ASX_SYSTEM_TYPE_PCXTOOLS 5
00172
00173 #define ASX_SHORT_STRING_SIZE (32)
00174 #define ASX_LONG_STRING_SIZE (128)
00175
00176 #ifndef _RPT0
00177 #define _RPT0(l,s) printf(s)
00178 #define _RPT1(l,s,d1) printf(s,d1)
00179 #endif
00180
00181 /**************************
00182  * Enums
00183  **************************/
00184
00186 enum asxERROR {
00187     asxERROR_NO_ERROR=0,
00188     // leave a gap here so that any 8-bit bit enums will never map to error codes.
00189     asxERROR_ASXOBJECT=256,
00190     asxERROR_INDEX_OUT_OF_RANGE,
00191     asxERROR_UNIMPLEMENTED,
00192     asxERROR_COMMUNICATING_WITH_DEVICE,
00193     asxERROR_STARTING_DEVICE,
00194     asxERROR_NOT_OPEN,
00195     asxERROR_ALREADY_OPEN,
00196     asxERROR_INVALID_FORMAT,
00197     asxERROR_INTERNAL_BUFFERING_ERROR,
00198     asxERROR_AES18,
00199     asxERROR_INVALID_OPERATION,
00200     asxERROR_ENUMERATE_INDEX_OUT_OF_RANGE,
00201     asxERROR_BUFFER_TOO_SMALL,
00202     asxERROR_OUTOFMEMORY,
00203
00204     asxERROR_INVALID_CONTROL,
00205     asxERROR_INVALID_CONTROL_VALUE,
00206     asxERROR_INVALID_CONTROL_NOT_FOUND,
00207     asxERROR_INVALID_NUMBER_OF_CHANNELS,
00208
00209     asxERROR_FILE_OPEN_FAILED,
00210
00211     asxERROR_PLAYER_INTERNAL_STATE_FAILURE,
00212     asxERROR_PLAYER_TIME_OUT,
00213     asxERROR_PLAYER_OUT_OF_SEQUENCE_CALL,
00214     asxERROR_PLAYER_TWAV,
00215     asxERROR_PLAYER_NOFILE,
00216     asxERROR_PLAYER_INVALIDFILEFORMAT,
00217     asxERROR_PLAYER_UNSUPPORTEDFORMAT,
00218     asxERROR_PLAYER_FILEREADERROR,
00219     asxERROR_PLAYER_FILEOPENERROR,
00220
00221     asxERROR_RECORDER_INTERNAL_STATE_FAILURE,
00222     asxERROR_RECORDER_TIME_OUT,
00223     asxERROR_RECORDER_OUT_OF_SEQUENCE_CALL,
00224     asxERROR_RECORDER_TWAV,
00225     asxERROR_RECORDER_FILECREATEERROR,
00226     asxERROR_RECORDER_FILEWRITEERROR,
00227     asxERROR_RECORDER_FORMATMISMATCH,
00228     asxERROR_RECORDER_INVALIDFILENAME,
00229
00230     asxERROR_UNKNOWN
00231 };
00232
00234 enum asxNODE {
00235     asxNODE_NONE=0,
00236     asxNODE_INVALID=400,
00237
00238     asxNODE_ADAPTER,
00239     asxNODE_PLAYER,
00240     asxNODE_LINE_IN,
00241     asxNODE_DIGITAL_IN,
00242     asxNODE_TUNER_IN,
00243     asxNODE_RADIO_FREQ_IN,
00244     asxNODE_CLOCK_SOURCE_IN,
00245     asxNODE_BITSTREAM_IN,
00246     asxNODE_MICROPHONE_IN,
00247
00248     asxNODE_LAST_SOURCE_NODE,
00249
00250     asxNODE_RECORDER,
00251     asxNODE_LINE_OUT,
00252     asxNODE_DIGITAL_OUT,
00253     asxNODE_RADIO_FREQ_OUT,
00254     asxNODE_SPEAKER_OUT,
00255
00256     asxNODE_LAST_DEST_NODE
00257 };
00258
00260 enum asxCONTROL {
00261     asxCONTROL_INVALID=500,
00262
00263     asxCONTROL_CONNECTION,
00264     asxCONTROL_VOLUME,
00265     asxCONTROL_METER,
00266     asxCONTROL_MUTE,
00267     asxCONTROL_MULTIPLEXER,
00268     asxCONTROL_AESEBU_TRANSMITTER,
00269     asxCONTROL_AESEBU_RECEIVER,
00270     asxCONTROL_LEVEL,
00271     asxCONTROL_TUNER,
00272     asxCONTROL_ON_OFF_SWITCH,
00273     asxCONTROL_VOX,
00274     asxCONTROL_AES18_TRANSMITTER,
00275     asxCONTROL_AES18_RECEIVER,
00276     asxCONTROL_AES18_BLOCK_GENERATOR,
00277     asxCONTROL_CHANNEL_MODE,
00278     asxCONTROL_BIT_STREAM,
00279     asxCONTROL_SAMPLE_CLOCK,
00280     asxCONTROL_MICROPHONE,
00281     asxCONTROL_PARAMETRIC_EQ,
00282     asxCONTROL_COMPANDER,
00283     asxCONTROL_PLAYER,
00284     asxCONTROL_RECORDER,
00285     asxCONTROL_GPIO,
00286     asxCONTROL_NV_MEM,
00287     asxCONTROL_ADAPTER_MODE,
00288     asxCONTROL_ADAPTER_INFO,
00289     asxCONTROL_GENERIC,
00290
00291     asxCONTROL_LAST_CONTROL
00292 };
00293
00294 /****************************************
00295  * Various control enums
00296 *****************************************/
00297
00299 enum asxCHANNELMODE {
00300     asxCHANNELMODE_ILLEGAL=1000,
00301     asxCHANNELMODE_NORMAL,
00302     asxCHANNELMODE_SWAP,
00303     asxCHANNELMODE_STEREOTOLEFT,
00304     asxCHANNELMODE_STEREOTORIGHT,
00305     asxCHANNELMODE_LEFTTOSTEREO,
00306     asxCHANNELMODE_RIGHTTOSTEREO
00307 };
00309 enum asxADAPTERMODE {
00310     asxADAPTERMODE_ILLEGAL=1100,
00311     asxADAPTERMODE_4_PLAY,
00312     asxADAPTERMODE_6_PLAY,
00313     asxADAPTERMODE_8_PLAY,
00314     asxADAPTERMODE_16_PLAY,
00315     asxADAPTERMODE_1_PLAY,
00316     asxADAPTERMODE_MODE_1,
00317     asxADAPTERMODE_MODE_2,
00318     asxADAPTERMODE_MODE_3,
00319     asxADAPTERMODE_MULTICHANNEL
00320 };
00322 enum asxTUNERBAND {
00323     asxTUNERBAND_AM=1200,
00324     asxTUNERBAND_FM,
00325     asxTUNERBAND_TV,
00326     asxTUNERBAND_FM_STEREO
00327 };
00329 enum asxTUNERMODE {
00330     asxTUNERMODE_RSS=1250,
00331     asxTUNERMODE_RSS_ENABLE,
00332     asxTUNERMODE_RSS_DISABLE
00333 };
00334
00336 enum asxSAMPLE_CLOCK_SOURCE {
00337     asxSAMPLE_CLOCK_SOURCE_ADAPTER=1400,
00338     asxSAMPLE_CLOCK_SOURCE_AESEBU,
00339     asxSAMPLE_CLOCK_SOURCE_WORD,
00340     asxSAMPLE_CLOCK_SOURCE_WORD_HEADER,
00341     asxSAMPLE_CLOCK_SOURCE_SMPTE
00342 };
00343
00344 enum asxDIGITAL_MODE {
00345     asxDIGITAL_MODE_AESEBU=1450,
00346     asxDIGITAL_MODE_SPDIF
00347 };
00348
00349 /****************************************
00350  * Various player and recorder enums
00351 *****************************************/
00352
00354 enum asxFILE_FORMAT {
00355     asxFILE_FORMAT_WAV=10000,
00356     asxFILE_FORMAT_RAW
00357 };
00359 enum asxFILE_MODE {
00360     asxFILE_MODE_CREATE=10100,
00361     asxFILE_MODE_APPEND
00362 };
00364 enum asxAUDIO_FORMAT {
00365     asxAUDIO_FORMAT_PCM8=10200,
00366     asxAUDIO_FORMAT_PCM16,
00367     asxAUDIO_FORMAT_PCM24,
00368     asxAUDIO_FORMAT_PCM32,
00369     asxAUDIO_FORMAT_PCM32_FLOAT,
00370     asxAUDIO_FORMAT_MPEG_L2,
00371     asxAUDIO_FORMAT_MPEG_L3,
00372     asxAUDIO_FORMAT_MPEG_AACPLUS,
00373     asxAUDIO_FORMAT_DOLBY_AC2
00374 };
00376 enum asxRECORD_MODE {
00377     asxRECORD_MODE_STEREO=10300,
00378     asxRECORD_MODE_JOINT_STEREO,
00379     asxRECORD_MODE_DUAL_MONO,
00380     asxRECORD_MODE_MONO,
00381     asxRECORD_MODE_DONT_CARE
00382 };
00384 enum asxPLAYER_STATE{
00385     asxPLAYER_INIT=10400,
00386     asxPLAYER_OPEN,
00387 #ifndef EXCLUDEHIDDENSTATES
00388     asxPLAYER_PREFILL,
00389 #endif
00390     asxPLAYER_RUNNING,
00391     asxPLAYER_PAUSED,
00392     asxPLAYER_DONE,
00393 #ifndef EXCLUDEHIDDENSTATES
00394     asxPLAYER_DESTROY
00395 #endif
00396 };
00398 enum asxRECORDER_STATE{
00399     asxRECORDER_INIT=10500,
00400     asxRECORDER_OPEN,
00401     asxRECORDER_RUNNING,
00402     asxRECORDER_PAUSED,
00403     asxRECORDER_DONE,
00404 #ifndef EXCLUDEHIDDENSTATES
00405     asxRECORDER_DESTROY
00406 #endif
00407 };
00408
00410 enum asxTIMESCALE {
00411     asxTIMESCALE_INVALID=10600,
00412     asxTIMESCALE_BYTES,
00413     asxTIMESCALE_MILLISECONDS,
00414     asxTIMESCALE_SAMPLES
00415 };
00416
00417 /******************************************************************************************************
00418  * The following enums apply to bitfields and other settings and therefore not translable by #ASXSTRING_EnumToString();
00419  ******************************************************************************************************/
00420
00422 enum asxTUNER_STATUS {
00423     asxTUNER_STATUS_VIDEO_VALID=1,
00424     asxTUNER_STATUS_VIDEO_COLOR_PRESENT=2,
00425     asxTUNER_STATUS_VIDEO_IS_60HZ=4,
00426     asxTUNER_STATUS_VIDEO_HORZ_SYNC_MISSING=8,
00427     asxTUNER_STATUS_PLL_LOCKED=16,
00428     asxTUNER_STATUS_FM_STEREO=32
00429 };
00430
00432 enum asxAESEBU_STATUS {
00433     asxAESEBU_ERROR=0x01,
00434     asxAESEBU_ERROR_NOT_LOCKED=0x02,
00435     asxAESEBU_ERROR_POOR_QUALITY=0x04,
00436     asxAESEBU_ERROR_PARITY_ERROR=0x08,
00437     asxAESEBU_ERROR_BIPHASE_VIOLATION=0x10,
00438     asxAESEBU_ERROR_VALIDITY=0x20,
00439     asxAESEBU_ERROR_CHANNELSTATUS_CRC=0x40
00440 };
00441
00442
00443
00444
00445 /**************************
00446  * Typedefs
00447  **************************/
00448
00449
00450 typedef unsigned int ASX_HANDLE;
00451 typedef enum asxERROR ASX_ERROR;
00452 typedef enum asxNODE ASX_NODE;
00453 typedef int ASX_TIME;
00454 typedef void ASX_ERROR_CALLBACK(ASX_HANDLE hASX_Object,const char *pszCallingFunction,void *pUser1,void *pUser2);
00455
00456 /**************************************************************************************
00457  * Functions
00458  **************************************************************************************/
00459
00460 /*******************************************************************/
00479 ASX32_API ASX_ERROR ASX_System_Create( const int asxSystemType, ASX_HANDLE *phSystem );
00480
00486 ASX32_API ASX_ERROR ASX_System_Delete( ASX_HANDLE hSystem );
00487
00498 ASX32_API ASX_ERROR ASX_System_RegisterErrorCallback(
00499                             ASX_HANDLE hSystem,
00500                             ASX_ERROR_CALLBACK *pCallback,
00501                             void *pUser1,
00502                             void *pUser2);
00503
00522 ASX32_API ASX_ERROR ASX_System_GetName(
00523                             ASX_HANDLE hSystem,
00524                             char *szString,
00525                             const int nStringLength,
00526                             int *pnRequiredLength );
00540 ASX32_API ASX_ERROR ASX_System_GetVersion( ASX_HANDLE hSystem,
00541                                           char *pszSystemVersion,
00542                                           int nSystemVersionLength,
00543                                           int *pnRequiredSystemVersionLength,
00544                                           char *pszSubSystemVersion,
00545                                           int nSubSystemVersionLength,
00546                                           int *pnRequiredSubSystemVersionLength);
00553 ASX32_API ASX_ERROR ASX_System_GetAdapterCount( ASX_HANDLE hSystem, int *pnCount );
00561 ASX32_API ASX_ERROR ASX_System_GetAdapter( ASX_HANDLE hSystem, const int nAdapter, ASX_HANDLE *phAdapter );
00562
00571 ASX32_API ASX_ERROR ASX_Error_GetLast(
00572                             ASX_HANDLE hASXObject,
00573                             ASX_ERROR *pnAsxErrorCode,
00574                             int *pnAsxSubSystemErrorCode);
00575
00591 ASX32_API ASX_ERROR ASX_Error_GetLastString(
00592                             ASX_HANDLE hASXObject,
00593                             char *pszAsxErrorString,
00594                             int nAsxErrorStringLength,
00595                             int *pnRequiredAsxErrorStringLength,
00596                             char *pszAsxSubSystemErrorString,
00597                             int nAsxSubSystemErrorStringLength,
00598                             int *pnRequiredAsxSubSystemErrorStringLength);
00599
00600
00601  // end of System group
00603
00608 /*******************************************************************
00609  * Adapter functions
00610  */
00628 ASX32_API ASX_ERROR ASX_Adapter_GetName(
00629                             ASX_HANDLE hAdapter,
00630                             char *szString,
00631                             const int nStringLength,
00632                             int *RequiredLength );
00640 ASX32_API ASX_ERROR ASX_Adapter_GetMixer(
00641                             ASX_HANDLE hAdapter,
00642                             ASX_HANDLE *phMixer );
00643  // end of Adapter group
00645
00650 /*******************************************************************
00651  * Mixer functions
00652  */
00664 ASX32_API ASX_ERROR ASX_Mixer_GetSourceNodeCount(
00665                     ASX_HANDLE hMixer,
00666                     int *pnCount);
00667
00676 ASX32_API ASX_ERROR ASX_Mixer_GetSourceNode(
00677                     ASX_HANDLE hMixer,
00678                     const int nSourceNode,
00679                     ASX_HANDLE *phNode );
00680
00681
00688 ASX32_API ASX_ERROR ASX_Mixer_GetDestinationNodeCount(
00689                     ASX_HANDLE hMixer,
00690                     int *pnCount);
00691
00700 ASX32_API ASX_ERROR ASX_Mixer_GetDestinationNode(
00701                     ASX_HANDLE hMixer,
00702                     const int nDestinationNode,
00703                     ASX_HANDLE *phNode );
00704
00715 ASX32_API ASX_ERROR ASX_Mixer_GetNodeByType(
00716                     ASX_HANDLE hMixer,
00717                     const enum asxNODE eType,
00718                     const int nIndex,
00719                     ASX_HANDLE *phNode);
00720
00730 ASX32_API ASX_ERROR ASX_Mixer_GetNodeTypeCount(
00731                     ASX_HANDLE hMixer,
00732                     const enum asxNODE eType,
00733                     int *pnCount);
00734
00735
00736
00743 ASX32_API ASX_ERROR ASX_Mixer_GetControlCount(
00744                     ASX_HANDLE hMixer,
00745                     int *pnControls);
00746
00754 ASX32_API ASX_ERROR ASX_Mixer_GetControl(
00755                     ASX_HANDLE hMixer,
00756                     const int nControl,
00757                     ASX_HANDLE *phControl );
00758
00770 ASX32_API ASX_ERROR ASX_Mixer_GetControlByNode(
00771                     const ASX_HANDLE hMixer,
00772                     const ASX_HANDLE hSourceNode,
00773                     const ASX_HANDLE hDestinationNode,
00774                     const enum asxCONTROL eControlType,
00775                     ASX_HANDLE *phControl );
00776
00790 ASX32_API ASX_ERROR ASX_Mixer_GetControlByNodeTypeAndIndex(
00791                     ASX_HANDLE hMixer,
00792                     const enum asxNODE nSourceNodeType,
00793                     const int nSourceIndex,
00794                     const enum asxNODE nDestinationNodeType,
00795                     const int nDestinationIndex,
00796                     const enum asxCONTROL eControlType,
00797                     ASX_HANDLE *phControl );
00798
00799
00800  // end of Mixer group
00802
00803 /*******************************************************************
00804  * Node functions
00805  */
00820 ASX32_API ASX_ERROR ASX_Mixer_GetNodeType(
00821                     ASX_HANDLE hNode,
00822                     enum asxNODE *peType);
00823
00831 ASX32_API ASX_ERROR ASX_Mixer_GetNodeIndex(
00832                     ASX_HANDLE hNode,
00833                     int *pnIndex); // end of Node group
00835
00840 /******************************************************************
00841  * Control functions
00842  */
00856 ASX32_API ASX_ERROR ASX_Control_GetType( ASX_HANDLE hControl, enum asxCONTROL *peControl);
00863 ASX32_API ASX_ERROR ASX_Control_GetSourceNode( ASX_HANDLE hControl, ASX_HANDLE *phNode );
00870 ASX32_API ASX_ERROR ASX_Control_GetDestinationNode( ASX_HANDLE hControl, ASX_HANDLE *phNode ); // end of Control group
00872 /*******************************************************************
00873  * Adapter Info Control
00874  */
00887 ASX32_API ASX_ERROR ASX_AdapterInfo_GetSerialNumber(
00888                             ASX_HANDLE hAdapterInfo,
00889                             unsigned long * pdwSerialNumber );
00890
00904  ASX32_API ASX_ERROR ASX_AdapterInfo_GetRevision(
00905                             ASX_HANDLE hAdapterInfo,
00906                             char *pszRevision,
00907                             int nStringLength,
00908                             int *pnRequiredLength);
00909
00920 ASX32_API ASX_ERROR ASX_AdapterInfo_GetDspUtilization(
00921                             ASX_HANDLE hAdapterInfo,
00922                             int nDspIndex,
00923                             int *pnDspUtilization);
00924  // end of AdapterInfo group
00926
00927
00928 /*******************************************************************
00929  * Player Control
00930  */
01002 ASX32_API ASX_ERROR ASX_Player_Open( ASX_HANDLE hPlayer, const char *pszFile);
01009 ASX32_API ASX_ERROR ASX_Player_Format_GetString( ASX_HANDLE hPlayer, char **pszFormat);
01019 ASX32_API ASX_ERROR ASX_Player_Format_GetDetails( ASX_HANDLE hPlayer,
01020                                                 enum asxAUDIO_FORMAT *peFormat,
01021                                                 int *pnChannnels,
01022                                                 int *pnSampleRate,
01023                                                 int *pnBitRate);
01037 ASX32_API ASX_ERROR ASX_Player_PreLoad( ASX_HANDLE hPlayer, enum asxTIMESCALE nType, const unsigned long lPosition);
01043 ASX32_API ASX_ERROR ASX_Player_Start( ASX_HANDLE hPlayer);
01050 ASX32_API ASX_ERROR ASX_Player_Pause( ASX_HANDLE hPlayer);
01057 ASX32_API ASX_ERROR ASX_Player_Stop( ASX_HANDLE hPlayer);
01064 ASX32_API ASX_ERROR ASX_Player_Wait( ASX_HANDLE hPlayer);
01070 ASX32_API ASX_ERROR ASX_Player_Close( ASX_HANDLE hPlayer);
01080 ASX32_API ASX_ERROR ASX_Player_GetPosition( ASX_HANDLE hPlayer, enum asxTIMESCALE nType, unsigned long *plPosition);
01087 ASX32_API ASX_ERROR ASX_Player_GetState( ASX_HANDLE hPlayer, enum asxPLAYER_STATE *pnState);
01097 ASX32_API ASX_ERROR ASX_Player_SetTimeScale( ASX_HANDLE hPlayer, float fTimeScale);
01106 ASX32_API ASX_ERROR ASX_Player_GetTimeScale( ASX_HANDLE hPlayer, float *pfTimeScale);
01116 ASX32_API ASX_ERROR ASX_Player_GetFilename( ASX_HANDLE hPlayer, char *pszFilename, int nStringLength, int *pnRequiredLength );
01124 ASX32_API ASX_ERROR ASX_Player_SetLoopMode( ASX_HANDLE hPlayer, int nLooping );
01132 ASX32_API ASX_ERROR ASX_Player_GetLoopMode( ASX_HANDLE hPlayer, int *pnLooping );
01133  // end of Player group
01135
01140 /******************************************************************
01141  * Recorder Control
01142  */
01222 ASX32_API ASX_ERROR ASX_Recorder_Open(
01223     ASX_HANDLE hRecorder, const char *pszFile,
01224     enum asxFILE_FORMAT nFileType,
01225     enum asxFILE_MODE nFileMode,
01226     int nChannels,
01227     enum asxAUDIO_FORMAT nFormat,
01228     long lSampleRate,
01229     long lBitrate,
01230     enum asxRECORD_MODE nMode
01231     );
01237 ASX32_API ASX_ERROR ASX_Recorder_Start( ASX_HANDLE hRecorder );
01243 ASX32_API ASX_ERROR ASX_Recorder_Stop( ASX_HANDLE hRecorder);
01249 ASX32_API ASX_ERROR ASX_Recorder_Pause( ASX_HANDLE hRecorder);
01255 ASX32_API ASX_ERROR ASX_Recorder_Close( ASX_HANDLE hRecorder);
01263 ASX32_API ASX_ERROR ASX_Recorder_GetPosition( ASX_HANDLE hRecorder, enum asxTIMESCALE nType, unsigned long *plPosition);
01270 ASX32_API ASX_ERROR ASX_Recorder_GetState( ASX_HANDLE hRecorder, enum asxRECORDER_STATE *peState);
01280 ASX32_API ASX_ERROR ASX_Recorder_GetFilename( ASX_HANDLE hRecorder, char *pszFilename, int nStringLength, int *pnRequiredLength ); // end of Recorder group
01282
01334 /*******************************************************************
01335  * Meter Control
01336  */
01341
01342 enum asxMETER_TYPE {
01343     asxMETER_PEAK,
01344     asxMETER_RMS
01345 };
01352 ASX32_API ASX_ERROR ASX_Meter_GetChannels( ASX_HANDLE hMeter, int *pnChannels);
01353
01373 ASX32_API ASX_ERROR ASX_Meter_GetPeak( ASX_HANDLE hMeter, float *fGetDb, const int nChannels);
01387 ASX32_API ASX_ERROR ASX_Meter_GetRMS(  ASX_HANDLE hMeter, float *fGetDb, const int nChannels);
01475 ASX32_API ASX_ERROR ASX_Meter_SetBallistics( ASX_HANDLE hMeter, enum asxMETER_TYPE nMeterType, float fAttackTimeMs, float fDecayTimeMs); // end of Meter group
01477
01478 /********************************************************************
01479  * Volume Control
01480  */
01485 enum asxVOLUME_AUTOFADE {
01486     asxVOLUME_AUTOFADE_LOG,
01487     asxVOLUME_AUTOFADE_LINEAR
01488 };
01495 ASX32_API ASX_ERROR ASX_Volume_GetChannels( ASX_HANDLE hMeter, int *pnChannels);
01503 ASX32_API ASX_ERROR ASX_Volume_SetGain( ASX_HANDLE hVolume, float *fSetGain, const int nChannels);
01511 ASX32_API ASX_ERROR ASX_Volume_GetGain( ASX_HANDLE hVolume, float *fGetGain, const int nChannels);
01520 ASX32_API ASX_ERROR ASX_Volume_GetRange( ASX_HANDLE hVolume,
01521                              float *fMinGain,
01522                              float *fMaxGain,
01523                              float *fGainStep);
01536 ASX32_API ASX_ERROR ASX_Volume_SetAutofade( ASX_HANDLE hVolume, float *fSetGain, const int nChannels, ASX_TIME nDuration, enum asxVOLUME_AUTOFADE eProfile); // end of Volume group
01538
01539 /*******************************************************************
01540  * Level Control
01541  */
01553 ASX32_API ASX_ERROR ASX_Level_Set( ASX_HANDLE hLevel, float fGain);
01560 ASX32_API ASX_ERROR ASX_Level_Get( ASX_HANDLE hLevel, float *fGain); // end of Level group
01562
01563 /*******************************************************************
01564  * Multiplexer Control
01565  */
01583 ASX32_API ASX_ERROR ASX_Multiplexer_Enumerate( ASX_HANDLE hMux, const int nIndex, enum asxNODE *peNode, int *pnNodeIndex, int *pnCount);
01591 ASX32_API ASX_ERROR ASX_Multiplexer_Get( ASX_HANDLE hMux, enum asxNODE *peNode, int *pnNodeIndex);
01599 ASX32_API ASX_ERROR ASX_Multiplexer_Set( ASX_HANDLE hMux, const enum asxNODE eNode, const int nNodeIndex); // end of Multiplexer group
01604 /******************************************************************
01605  * Channel Mode Control
01606  */
01620 ASX32_API ASX_ERROR ASX_ChannelMode_Enumerate( ASX_HANDLE hMode, const int nIndex, enum asxCHANNELMODE *peMode, int *pnCount);
01627 ASX32_API ASX_ERROR ASX_ChannelMode_Get( ASX_HANDLE hMode, enum asxCHANNELMODE *peMode);
01634 ASX32_API ASX_ERROR ASX_ChannelMode_Set( ASX_HANDLE hMode, const enum asxCHANNELMODE eMode); // end of ChannelMode group
01636 /******************************************************************
01637  * Adapter Mode Control
01638  */
01652 ASX32_API ASX_ERROR ASX_AdapterMode_Enumerate( ASX_HANDLE hMode, const int nIndex, enum asxADAPTERMODE *peMode, int *pnCount);
01659 ASX32_API ASX_ERROR ASX_AdapterMode_Get( ASX_HANDLE hMode, enum asxADAPTERMODE *peMode);
01666 ASX32_API ASX_ERROR ASX_AdapterMode_Set( ASX_HANDLE hMode, const enum asxADAPTERMODE eMode); // end of AdapterMode group
01668
01669 /******************************************************************
01670  * Tuner Control
01671  */
01684 ASX32_API ASX_ERROR ASX_Tuner_EnumerateBand( ASX_HANDLE hTuner, const int nIndex, enum asxTUNERBAND *peBand, int *pnCount);
01691 ASX32_API ASX_ERROR ASX_Tuner_GetBand( ASX_HANDLE hTuner, enum asxTUNERBAND *peBand);
01698 ASX32_API ASX_ERROR ASX_Tuner_SetBand( ASX_HANDLE hTuner, const enum asxTUNERBAND eBand);
01706 ASX32_API ASX_ERROR ASX_Tuner_SetFrequency( ASX_HANDLE hTuner, const unsigned long nFreq);
01713 ASX32_API ASX_ERROR ASX_Tuner_GetFrequency( ASX_HANDLE hTuner, unsigned long *plFreq);
01714 //  virtual ASX_ERROR GetFrequencyRange(){return asxERROR_NO_ERROR;};
01724 ASX32_API ASX_ERROR ASX_Tuner_GetGainRange(ASX_HANDLE hTuner, float *fMin, float *fMax, float *fStep);
01731 ASX32_API ASX_ERROR ASX_Tuner_SetGain(ASX_HANDLE hTuner, const float fTunerGain);
01738 ASX32_API ASX_ERROR ASX_Tuner_GetGain(ASX_HANDLE hTuner, float *pfTunerGain);
01745 ASX32_API ASX_ERROR ASX_Tuner_GetRFLevel(ASX_HANDLE hTuner, float *nRFLevel);
01752 ASX32_API ASX_ERROR ASX_Tuner_GetRawRFLevel(ASX_HANDLE hTuner, int *nRawRFLevel);
01762 ASX32_API ASX_ERROR ASX_Tuner_GetStatus(ASX_HANDLE hTuner, unsigned int *puErrorStatusMask, unsigned int *puErrorStatus);
01771 ASX32_API ASX_ERROR ASX_Tuner_SetMode(ASX_HANDLE hTuner, const enum asxTUNERMODE eMode, const enum asxTUNERMODE eSetting); // end of Tuner group
01777 /******************************************************************
01778  * Sample Clock Control
01779  */
01791 ASX32_API ASX_ERROR ASX_SampleClock_SetSampleRate( ASX_HANDLE hSampleClock, const int nSampleRate);
01798 ASX32_API ASX_ERROR ASX_SampleClock_GetSampleRate( ASX_HANDLE hSampleClock, int *pnSampleRate);
01807 ASX32_API ASX_ERROR ASX_SampleClock_EnumerateClockSource( ASX_HANDLE hSampleClock, const int nIndex, enum asxSAMPLE_CLOCK_SOURCE *peClockSource, int *pnCount);
01814 ASX32_API ASX_ERROR ASX_SampleClock_SetClockSource( ASX_HANDLE hSampleClock, const enum asxSAMPLE_CLOCK_SOURCE eClockSource);
01821 ASX32_API ASX_ERROR ASX_SampleClock_GetClockSource( ASX_HANDLE hSampleClock, enum asxSAMPLE_CLOCK_SOURCE *peClockSource); // end of SampleClock group
01823
01824 /******************************************************************
01825  * AESEBU Receiver Control
01826  **/
01839 ASX32_API ASX_ERROR ASX_AESEBUReceiver_GetErrorStatus(ASX_HANDLE hAESEBURx, unsigned int *pdwErrorStatusMask, unsigned int *pdwErrorStatus );
01846 ASX32_API ASX_ERROR ASX_AESEBUReceiver_GetSampleRate(ASX_HANDLE hAESEBURx, unsigned int *pdwSampleRate );
01853 ASX32_API ASX_ERROR ASX_AESEBUReceiver_SetDigitalMode(ASX_HANDLE hAESEBURx, const enum asxDIGITAL_MODE eDigitalMode );
01860 ASX32_API ASX_ERROR ASX_AESEBUReceiver_GetDigitalMode(ASX_HANDLE hAESEBURx, enum asxDIGITAL_MODE *peDigitalMode ); // end of AESEBU_Rx group
01862
01863 /******************************************************************
01864  * AESEBU Transmitter Control
01865  **/
01876 ASX32_API ASX_ERROR ASX_AESEBUTransmitter_SetDigitalMode(ASX_HANDLE hAESEBUTx, const enum asxDIGITAL_MODE eDigitalMode );
01883 ASX32_API ASX_ERROR ASX_AESEBUTransmitter_GetDigitalMode(ASX_HANDLE hAESEBUTx, enum asxDIGITAL_MODE *peDigitalMode ); // end of AESEBU_Tx group
01885
01886 /******************************************************************
01887  * GPIO Control
01888  */
01903 ASX32_API ASX_ERROR ASX_GPIO_GetProperties( ASX_HANDLE hGPIO, int *pnNumberOfInputBits,int *pnNumberOfOutputBits);
01915 ASX32_API ASX_ERROR ASX_GPIO_InputGet( ASX_HANDLE hGPIO, int *pnBits, const int nNumberOfBits);
01925 ASX32_API ASX_ERROR ASX_GPIO_OutputSet( ASX_HANDLE hGPIO, int *pnBits, const int nNumberOfBits); // end of GPIO group
01927
01928 /******************************************************************
01929  * Non Volatile Memory Control
01930  */
01944 ASX32_API ASX_ERROR ASX_NvMem_Write( ASX_HANDLE hNvMem, const int nAddress, const unsigned char cValue);
01952 ASX32_API ASX_ERROR ASX_NvMem_Read( ASX_HANDLE hNvMem, const int nAddress, unsigned char *pcValue);
01959 ASX32_API ASX_ERROR ASX_NvMem_GetSizeInBytes( ASX_HANDLE hNvMem, int *pnCount); // end of NvMem group
01961
01962 /********************************************************************
01963  * Vox Control
01964  */
01975 ASX32_API ASX_ERROR ASX_Vox_SetLevel( ASX_HANDLE hVox, float fSetLevel);
01982 ASX32_API ASX_ERROR ASX_Vox_GetLevel( ASX_HANDLE hVox, float *fGetLevel);
01991 ASX32_API ASX_ERROR ASX_Vox_GetRange( ASX_HANDLE hVox,
01992                              float *fMinLevel,
01993                              float *fMaxLevel,
01994                              float *fLevelStep); // end of Vox group
01996
01997 /********************************************************************
01998  * Generic Control
01999  */
02010 ASX32_API ASX_ERROR ASX_GetGenericControlName( ASX_HANDLE hControl, char *pName); // end of Generic group
02012
02013 #ifdef __cplusplus
02014 }
02015 #endif
02016 #endif  /* _ASX_H_ */
02017
02018 /***********************************************************
02019 *
02020 ***********************************************************/
Generated on Wed Mar 9 16:02:33 2005 for ASX by doxygen 1.3.9.1


ASX: asxstring.h Source File

asxstring.h

Go to the documentation of this file.
00001 /*****************************************************************************************
00002 * $Header: /Repository/apps/asx/asxstring.h,v 1.4 2004/08/10 19:34:15 as-age Exp $
00003 *
00004 * ASXSTRING.H
00005 * String definitions for cross platform/API audio class library
00006 *
00007 * Copyright (C) AudioScience 2004
00008 *****************************************************************************************/
00009
00010 #ifndef _ASXSTRING_H_
00011 #define _ASXSTRING_H_
00012
00013
00014 // The following ifdef block is the standard way of creating macros which make exporting
00015 // from a DLL simpler. All files within this DLL are compiled with the ASX32_EXPORTS
00016 // symbol defined on the command line. this symbol should not be defined on any project
00017 // that uses this DLL. This way any other project whose source files include this file see
00018 // ASX32_API functions as being imported from a DLL, wheras this DLL sees symbols
00019 // defined with this macro as being exported.
00020 #ifdef ASX32_EXPORTS
00021 #define ASX32_API __declspec(dllexport)
00022 #endif
00023 #ifdef ASX32_IMPORTS
00024 #define ASX32_API __declspec(dllimport)
00025 #endif
00026 #ifndef ASX32_API
00027 #define ASX32_API
00028 #endif
00029
00030
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034
00045 ASX32_API int ASXSTRING_EnumToString(const int nEnum, char *szString, const int nLength, int *pRequiredLength);
00046
00047
00048 #ifdef __cplusplus
00049 }
00050 #endif
00051
00052 #endif
Generated on Wed Mar 9 16:02:33 2005 for ASX by doxygen 1.3.9.1


ASX: Globals - Defines

  • _RPT0 : asx.h
  • _RPT1 : asx.h
  • ASX_LONG_STRING_SIZE : asx.h
  • ASX_SHORT_STRING_SIZE : asx.h
  • ASX_SYSTEM_TYPE_ALSA : asx.h
  • ASX_SYSTEM_TYPE_DIRECTX : asx.h
  • ASX_SYSTEM_TYPE_HPI : asx.h
  • ASX_SYSTEM_TYPE_PCXTOOLS : asx.h
  • ASX_SYSTEM_TYPE_PORTAUDIO : asx.h
  • ASX_SYSTEM_TYPE_WAVE : asx.h
  • ASX_VERSION : asx.h
Generated on Wed Mar 9 16:02:41 2005 for ASX by doxygen 1.3.9.1


ASX: Globals - Enumerations

  • asxADAPTERMODE : asx.h
  • asxAESEBU_STATUS : asx.h
  • asxAUDIO_FORMAT : asx.h
  • asxCHANNELMODE : asx.h
  • asxCONTROL : asx.h
  • asxDIGITAL_MODE : asx.h
  • asxERROR : asx.h
  • asxFILE_FORMAT : asx.h
  • asxFILE_MODE : asx.h
  • asxMETER_TYPE : asx.h
  • asxNODE : asx.h
  • asxPLAYER_STATE : asx.h
  • asxRECORD_MODE : asx.h
  • asxRECORDER_STATE : asx.h
  • asxSAMPLE_CLOCK_SOURCE : asx.h
  • asxTIMESCALE : asx.h
  • asxTUNER_STATUS : asx.h
  • asxTUNERBAND : asx.h
  • asxTUNERMODE : asx.h
  • asxVOLUME_AUTOFADE : asx.h
Generated on Wed Mar 9 16:02:41 2005 for ASX by doxygen 1.3.9.1


ASX: Globals - Enumeration values

a

- a -

  • asxADAPTERMODE_16_PLAY : asx.h
  • asxADAPTERMODE_1_PLAY : asx.h
  • asxADAPTERMODE_4_PLAY : asx.h
  • asxADAPTERMODE_6_PLAY : asx.h
  • asxADAPTERMODE_8_PLAY : asx.h
  • asxADAPTERMODE_ILLEGAL : asx.h
  • asxADAPTERMODE_MODE_1 : asx.h
  • asxADAPTERMODE_MODE_2 : asx.h
  • asxADAPTERMODE_MODE_3 : asx.h
  • asxADAPTERMODE_MULTICHANNEL : asx.h
  • asxAESEBU_ERROR : asx.h
  • asxAESEBU_ERROR_BIPHASE_VIOLATION : asx.h
  • asxAESEBU_ERROR_CHANNELSTATUS_CRC : asx.h
  • asxAESEBU_ERROR_NOT_LOCKED : asx.h
  • asxAESEBU_ERROR_PARITY_ERROR : asx.h
  • asxAESEBU_ERROR_POOR_QUALITY : asx.h
  • asxAESEBU_ERROR_VALIDITY : asx.h
  • asxAUDIO_FORMAT_DOLBY_AC2 : asx.h
  • asxAUDIO_FORMAT_MPEG_AACPLUS : asx.h
  • asxAUDIO_FORMAT_MPEG_L2 : asx.h
  • asxAUDIO_FORMAT_MPEG_L3 : asx.h
  • asxAUDIO_FORMAT_PCM16 : asx.h
  • asxAUDIO_FORMAT_PCM24 : asx.h
  • asxAUDIO_FORMAT_PCM32 : asx.h
  • asxAUDIO_FORMAT_PCM32_FLOAT : asx.h
  • asxAUDIO_FORMAT_PCM8 : asx.h
  • asxCHANNELMODE_ILLEGAL : asx.h
  • asxCHANNELMODE_LEFTTOSTEREO : asx.h
  • asxCHANNELMODE_NORMAL : asx.h
  • asxCHANNELMODE_RIGHTTOSTEREO : asx.h
  • asxCHANNELMODE_STEREOTOLEFT : asx.h
  • asxCHANNELMODE_STEREOTORIGHT : asx.h
  • asxCHANNELMODE_SWAP : asx.h
  • asxCONTROL_ADAPTER_INFO : asx.h
  • asxCONTROL_ADAPTER_MODE : asx.h
  • asxCONTROL_AES18_BLOCK_GENERATOR : asx.h
  • asxCONTROL_AES18_RECEIVER : asx.h
  • asxCONTROL_AES18_TRANSMITTER : asx.h
  • asxCONTROL_AESEBU_RECEIVER : asx.h
  • asxCONTROL_AESEBU_TRANSMITTER : asx.h
  • asxCONTROL_BIT_STREAM : asx.h
  • asxCONTROL_CHANNEL_MODE : asx.h
  • asxCONTROL_COMPANDER : asx.h
  • asxCONTROL_CONNECTION : asx.h
  • asxCONTROL_GENERIC : asx.h
  • asxCONTROL_GPIO : asx.h
  • asxCONTROL_INVALID : asx.h
  • asxCONTROL_LAST_CONTROL : asx.h
  • asxCONTROL_LEVEL : asx.h
  • asxCONTROL_METER : asx.h
  • asxCONTROL_MICROPHONE : asx.h
  • asxCONTROL_MULTIPLEXER : asx.h
  • asxCONTROL_MUTE : asx.h
  • asxCONTROL_NV_MEM : asx.h
  • asxCONTROL_ON_OFF_SWITCH : asx.h
  • asxCONTROL_PARAMETRIC_EQ : asx.h
  • asxCONTROL_PLAYER : asx.h
  • asxCONTROL_RECORDER : asx.h
  • asxCONTROL_SAMPLE_CLOCK : asx.h
  • asxCONTROL_TUNER : asx.h
  • asxCONTROL_VOLUME : asx.h
  • asxCONTROL_VOX : asx.h
  • asxDIGITAL_MODE_AESEBU : asx.h
  • asxDIGITAL_MODE_SPDIF : asx.h
  • asxERROR_AES18 : asx.h
  • asxERROR_ALREADY_OPEN : asx.h
  • asxERROR_ASXOBJECT : asx.h
  • asxERROR_BUFFER_TOO_SMALL : asx.h
  • asxERROR_COMMUNICATING_WITH_DEVICE : asx.h
  • asxERROR_ENUMERATE_INDEX_OUT_OF_RANGE : asx.h
  • asxERROR_FILE_OPEN_FAILED : asx.h
  • asxERROR_INDEX_OUT_OF_RANGE : asx.h
  • asxERROR_INTERNAL_BUFFERING_ERROR : asx.h
  • asxERROR_INVALID_CONTROL : asx.h
  • asxERROR_INVALID_CONTROL_NOT_FOUND : asx.h
  • asxERROR_INVALID_CONTROL_VALUE : asx.h
  • asxERROR_INVALID_FORMAT : asx.h
  • asxERROR_INVALID_NUMBER_OF_CHANNELS : asx.h
  • asxERROR_INVALID_OPERATION : asx.h
  • asxERROR_NO_ERROR : asx.h
  • asxERROR_NOT_OPEN : asx.h
  • asxERROR_OUTOFMEMORY : asx.h
  • asxERROR_PLAYER_FILEOPENERROR : asx.h
  • asxERROR_PLAYER_FILEREADERROR : asx.h
  • asxERROR_PLAYER_INTERNAL_STATE_FAILURE : asx.h
  • asxERROR_PLAYER_INVALIDFILEFORMAT : asx.h
  • asxERROR_PLAYER_NOFILE : asx.h
  • asxERROR_PLAYER_OUT_OF_SEQUENCE_CALL : asx.h
  • asxERROR_PLAYER_TIME_OUT : asx.h
  • asxERROR_PLAYER_TWAV : asx.h
  • asxERROR_PLAYER_UNSUPPORTEDFORMAT : asx.h
  • asxERROR_RECORDER_FILECREATEERROR : asx.h
  • asxERROR_RECORDER_FILEWRITEERROR : asx.h
  • asxERROR_RECORDER_FORMATMISMATCH : asx.h
  • asxERROR_RECORDER_INTERNAL_STATE_FAILURE : asx.h
  • asxERROR_RECORDER_INVALIDFILENAME : asx.h
  • asxERROR_RECORDER_OUT_OF_SEQUENCE_CALL : asx.h
  • asxERROR_RECORDER_TIME_OUT : asx.h
  • asxERROR_RECORDER_TWAV : asx.h
  • asxERROR_STARTING_DEVICE : asx.h
  • asxERROR_UNIMPLEMENTED : asx.h
  • asxERROR_UNKNOWN : asx.h
  • asxFILE_FORMAT_RAW : asx.h
  • asxFILE_FORMAT_WAV : asx.h
  • asxFILE_MODE_APPEND : asx.h
  • asxFILE_MODE_CREATE : asx.h
  • asxMETER_PEAK : asx.h
  • asxMETER_RMS : asx.h
  • asxNODE_ADAPTER : asx.h
  • asxNODE_BITSTREAM_IN : asx.h
  • asxNODE_CLOCK_SOURCE_IN : asx.h
  • asxNODE_DIGITAL_IN : asx.h
  • asxNODE_DIGITAL_OUT : asx.h
  • asxNODE_INVALID : asx.h
  • asxNODE_LAST_DEST_NODE : asx.h
  • asxNODE_LAST_SOURCE_NODE : asx.h
  • asxNODE_LINE_IN : asx.h
  • asxNODE_LINE_OUT : asx.h
  • asxNODE_MICROPHONE_IN : asx.h
  • asxNODE_NONE : asx.h
  • asxNODE_PLAYER : asx.h
  • asxNODE_RADIO_FREQ_IN : asx.h
  • asxNODE_RADIO_FREQ_OUT : asx.h
  • asxNODE_RECORDER : asx.h
  • asxNODE_SPEAKER_OUT : asx.h
  • asxNODE_TUNER_IN : asx.h
  • asxPLAYER_DONE : asx.h
  • asxPLAYER_INIT : asx.h
  • asxPLAYER_OPEN : asx.h
  • asxPLAYER_PAUSED : asx.h
  • asxPLAYER_RUNNING : asx.h
  • asxRECORD_MODE_DONT_CARE : asx.h
  • asxRECORD_MODE_DUAL_MONO : asx.h
  • asxRECORD_MODE_JOINT_STEREO : asx.h
  • asxRECORD_MODE_MONO : asx.h
  • asxRECORD_MODE_STEREO : asx.h
  • asxRECORDER_DONE : asx.h
  • asxRECORDER_INIT : asx.h
  • asxRECORDER_OPEN : asx.h
  • asxRECORDER_PAUSED : asx.h
  • asxRECORDER_RUNNING : asx.h
  • asxSAMPLE_CLOCK_SOURCE_ADAPTER : asx.h
  • asxSAMPLE_CLOCK_SOURCE_AESEBU : asx.h
  • asxSAMPLE_CLOCK_SOURCE_SMPTE : asx.h
  • asxSAMPLE_CLOCK_SOURCE_WORD : asx.h
  • asxSAMPLE_CLOCK_SOURCE_WORD_HEADER : asx.h
  • asxTIMESCALE_BYTES : asx.h
  • asxTIMESCALE_INVALID : asx.h
  • asxTIMESCALE_MILLISECONDS : asx.h
  • asxTIMESCALE_SAMPLES : asx.h
  • asxTUNER_STATUS_FM_STEREO : asx.h
  • asxTUNER_STATUS_PLL_LOCKED : asx.h
  • asxTUNER_STATUS_VIDEO_COLOR_PRESENT : asx.h
  • asxTUNER_STATUS_VIDEO_HORZ_SYNC_MISSING : asx.h
  • asxTUNER_STATUS_VIDEO_IS_60HZ : asx.h
  • asxTUNER_STATUS_VIDEO_VALID : asx.h
  • asxTUNERBAND_AM : asx.h
  • asxTUNERBAND_FM : asx.h
  • asxTUNERBAND_FM_STEREO : asx.h
  • asxTUNERBAND_TV : asx.h
  • asxTUNERMODE_RSS : asx.h
  • asxTUNERMODE_RSS_DISABLE : asx.h
  • asxTUNERMODE_RSS_ENABLE : asx.h
  • asxVOLUME_AUTOFADE_LINEAR : asx.h
  • asxVOLUME_AUTOFADE_LOG : asx.h
Generated on Wed Mar 9 16:02:41 2005 for ASX by doxygen 1.3.9.1


ASX: Globals - Functions

a

- a -

  • ASX_Adapter_GetMixer() : asx.h
  • ASX_Adapter_GetName() : asx.h
  • ASX_AdapterInfo_GetDspUtilization() : asx.h
  • ASX_AdapterInfo_GetRevision() : asx.h
  • ASX_AdapterInfo_GetSerialNumber() : asx.h
  • ASX_AdapterMode_Enumerate() : asx.h
  • ASX_AdapterMode_Get() : asx.h
  • ASX_AdapterMode_Set() : asx.h
  • ASX_AESEBUReceiver_GetDigitalMode() : asx.h
  • ASX_AESEBUReceiver_GetErrorStatus() : asx.h
  • ASX_AESEBUReceiver_GetSampleRate() : asx.h
  • ASX_AESEBUReceiver_SetDigitalMode() : asx.h
  • ASX_AESEBUTransmitter_GetDigitalMode() : asx.h
  • ASX_AESEBUTransmitter_SetDigitalMode() : asx.h
  • ASX_ChannelMode_Enumerate() : asx.h
  • ASX_ChannelMode_Get() : asx.h
  • ASX_ChannelMode_Set() : asx.h
  • ASX_Control_GetDestinationNode() : asx.h
  • ASX_Control_GetSourceNode() : asx.h
  • ASX_Control_GetType() : asx.h
  • ASX_Error_GetLast() : asx.h
  • ASX_Error_GetLastString() : asx.h
  • ASX_GetGenericControlName() : asx.h
  • ASX_GPIO_GetProperties() : asx.h
  • ASX_GPIO_InputGet() : asx.h
  • ASX_GPIO_OutputSet() : asx.h
  • ASX_Level_Get() : asx.h
  • ASX_Level_Set() : asx.h
  • ASX_Meter_GetChannels() : asx.h
  • ASX_Meter_GetPeak() : asx.h
  • ASX_Meter_GetRMS() : asx.h
  • ASX_Meter_SetBallistics() : asx.h
  • ASX_Mixer_GetControl() : asx.h
  • ASX_Mixer_GetControlByNode() : asx.h
  • ASX_Mixer_GetControlByNodeTypeAndIndex() : asx.h
  • ASX_Mixer_GetControlCount() : asx.h
  • ASX_Mixer_GetDestinationNode() : asx.h
  • ASX_Mixer_GetDestinationNodeCount() : asx.h
  • ASX_Mixer_GetNodeByType() : asx.h
  • ASX_Mixer_GetNodeIndex() : asx.h
  • ASX_Mixer_GetNodeType() : asx.h
  • ASX_Mixer_GetNodeTypeCount() : asx.h
  • ASX_Mixer_GetSourceNode() : asx.h
  • ASX_Mixer_GetSourceNodeCount() : asx.h
  • ASX_Multiplexer_Enumerate() : asx.h
  • ASX_Multiplexer_Get() : asx.h
  • ASX_Multiplexer_Set() : asx.h
  • ASX_NvMem_GetSizeInBytes() : asx.h
  • ASX_NvMem_Read() : asx.h
  • ASX_NvMem_Write() : asx.h
  • ASX_Player_Close() : asx.h
  • ASX_Player_Format_GetDetails() : asx.h
  • ASX_Player_Format_GetString() : asx.h
  • ASX_Player_GetFilename() : asx.h
  • ASX_Player_GetLoopMode() : asx.h
  • ASX_Player_GetPosition() : asx.h
  • ASX_Player_GetState() : asx.h
  • ASX_Player_GetTimeScale() : asx.h
  • ASX_Player_Open() : asx.h
  • ASX_Player_Pause() : asx.h
  • ASX_Player_PreLoad() : asx.h
  • ASX_Player_SetLoopMode() : asx.h
  • ASX_Player_SetTimeScale() : asx.h
  • ASX_Player_Start() : asx.h
  • ASX_Player_Stop() : asx.h
  • ASX_Player_Wait() : asx.h
  • ASX_Recorder_Close() : asx.h
  • ASX_Recorder_GetFilename() : asx.h
  • ASX_Recorder_GetPosition() : asx.h
  • ASX_Recorder_GetState() : asx.h
  • ASX_Recorder_Open() : asx.h
  • ASX_Recorder_Pause() : asx.h
  • ASX_Recorder_Start() : asx.h
  • ASX_Recorder_Stop() : asx.h
  • ASX_SampleClock_EnumerateClockSource() : asx.h
  • ASX_SampleClock_GetClockSource() : asx.h
  • ASX_SampleClock_GetSampleRate() : asx.h
  • ASX_SampleClock_SetClockSource() : asx.h
  • ASX_SampleClock_SetSampleRate() : asx.h
  • ASX_System_Create() : asx.h
  • ASX_System_Delete() : asx.h
  • ASX_System_GetAdapter() : asx.h
  • ASX_System_GetAdapterCount() : asx.h
  • ASX_System_GetName() : asx.h
  • ASX_System_GetVersion() : asx.h
  • ASX_System_RegisterErrorCallback() : asx.h
  • ASX_Tuner_EnumerateBand() : asx.h
  • ASX_Tuner_GetBand() : asx.h
  • ASX_Tuner_GetFrequency() : asx.h
  • ASX_Tuner_GetGain() : asx.h
  • ASX_Tuner_GetGainRange() : asx.h
  • ASX_Tuner_GetRawRFLevel() : asx.h
  • ASX_Tuner_GetRFLevel() : asx.h
  • ASX_Tuner_GetStatus() : asx.h
  • ASX_Tuner_SetBand() : asx.h
  • ASX_Tuner_SetFrequency() : asx.h
  • ASX_Tuner_SetGain() : asx.h
  • ASX_Tuner_SetMode() : asx.h
  • ASX_Volume_GetChannels() : asx.h
  • ASX_Volume_GetGain() : asx.h
  • ASX_Volume_GetRange() : asx.h
  • ASX_Volume_SetAutofade() : asx.h
  • ASX_Volume_SetGain() : asx.h
  • ASX_Vox_GetLevel() : asx.h
  • ASX_Vox_GetRange() : asx.h
  • ASX_Vox_SetLevel() : asx.h
  • ASXSTRING_EnumToString() : asxstring.h
Generated on Wed Mar 9 16:02:41 2005 for ASX by doxygen 1.3.9.1


ASX: Globals - Typedefs

  • ASX_ERROR_CALLBACK : asx.h
  • ASX_HANDLE : asx.h
  • ASX_TIME : asx.h
Generated on Wed Mar 9 16:02:41 2005 for ASX by doxygen 1.3.9.1


ASX: pcxport.txt File Reference

pcxport.txt File Reference

Generated on Wed Mar 9 16:02:34 2005 for ASX by doxygen 1.3.9.1