ASX Version4.20.14
Functions

Mixer functions

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

Functions

ASX32_API ASX_ERROR ASX_Mixer_ResetControls (ASX_HANDLE hMixer)
 This function sets all the controls in the mixer to a known state.
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 *p_hNode)
 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 *p_hNode)
 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 *p_hNode)
 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 *p_hControlBase)
 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 *p_hControlBase)
 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 *p_hControlBase)
 Given source and destination node specifications as well as the control type, return the specified control.
ASX32_API ASX_ERROR ASX_Mixer_GetControlByLocationAndIndex (ASX_HANDLE hMixer, const enum asxNODE nSourceNodeType, const int nSourceIndex, const enum asxNODE nDestinationNodeType, const int nDestinationIndex, const enum asxCONTROL eControlType, const int nControlIndex, ASX_HANDLE *p_hControlBase)
 Given source and destination node specifications as well as the control type, return the specified control.
ASX32_API ASX_ERROR ASX_Mixer_GetBlockControlByNodeTypeAndIndex (ASX_HANDLE hMixer, const enum asxNODE nSourceNodeType, const int nSourceIndex, const enum asxNODE nDestinationNodeType, const int nDestinationIndex, const char *pszBlockName, ASX_HANDLE *p_hControlBase)
 Given source and destination node specifications as well as the block control name, return the specified control.

Detailed Description

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


Function Documentation

ASX32_API ASX_ERROR ASX_Mixer_GetBlockControlByNodeTypeAndIndex ( ASX_HANDLE  hMixer,
const enum asxNODE  nSourceNodeType,
const int  nSourceIndex,
const enum asxNODE  nDestinationNodeType,
const int  nDestinationIndex,
const char *  pszBlockName,
ASX_HANDLE p_hControlBase 
)

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

Parameters:
hMixerA handle to an ASX mixer object.
nSourceNodeTypeThe 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.
nSourceIndexThe source node index. This may be set to 0 if the requested control does not have a source node.
nDestinationNodeTypeThe 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.
nDestinationIndexThe destination node index. This may be set to 0 if the requested control does not have a destination node.
pszBlockNameThe block control name.
p_hControlBaseThe returned ASX control handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Mixer_GetControl ( ASX_HANDLE  hMixer,
const int  nControl,
ASX_HANDLE p_hControlBase 
)

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

Parameters:
hMixerA handle to an ASX mixer object.
nControlThe index of the control handle to return.
p_hControlBaseThe returned ASX control handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
cobranet/main.c, and mixer/main.c.
ASX32_API ASX_ERROR ASX_Mixer_GetControlByLocationAndIndex ( ASX_HANDLE  hMixer,
const enum asxNODE  nSourceNodeType,
const int  nSourceIndex,
const enum asxNODE  nDestinationNodeType,
const int  nDestinationIndex,
const enum asxCONTROL  eControlType,
const int  nControlIndex,
ASX_HANDLE p_hControlBase 
)

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

Parameters:
hMixerA handle to an ASX mixer object.
nSourceNodeTypeThe 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.
nSourceIndexThe source node index. This may be set to 0 if the requested control does not have a source node.
nDestinationNodeTypeThe 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.
nDestinationIndexThe destination node index. This may be set to 0 if the requested control does not have a destination node.
eControlTypeThe control type. Should be set to one of asxCONTROL.
nControlIndexThe control index (zero based). If multiple controls of the same type are present on the given nodes they can be retrieved using this parameter.
p_hControlBaseThe returned ASX control handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_Mixer_GetControlByNode ( const ASX_HANDLE  hMixer,
const ASX_HANDLE  hSourceNode,
const ASX_HANDLE  hDestinationNode,
const enum asxCONTROL  eControlType,
ASX_HANDLE p_hControlBase 
)

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

Parameters:
hMixerA handle to an ASX mixer object.
hSourceNodeA 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.
hDestinationNodeA 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.
eControlTypeThe control type. Should be set to one of asxCONTROL.
p_hControlBaseThe 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 p_hControlBase 
)

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

Parameters:
hMixerA handle to an ASX mixer object.
nSourceNodeTypeThe 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.
nSourceIndexThe source node index. This may be set to 0 if the requested control does not have a source node.
nDestinationNodeTypeThe 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.
nDestinationIndexThe destination node index. This may be set to 0 if the requested control does not have a destination node.
eControlTypeThe control type. Should be set to one of asxCONTROL.
p_hControlBaseThe returned ASX control handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
cobranet/main.c, dual_mono_play/main.c, dual_mono_record/main.c, mixer/main.c, mux/main.c, play/main.c, playlist/main.c, record/main.c, tuner/main.c, and volume/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:
hMixerA handle to an ASX mixer object.
pnControlsThe returned number of controls.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
cobranet/main.c, and mixer/main.c.
ASX32_API ASX_ERROR ASX_Mixer_GetDestinationNode ( ASX_HANDLE  hMixer,
const int  nDestinationNode,
ASX_HANDLE p_hNode 
)

This function gets the handle of the specified destination node.

Parameters:
hMixerA handle to an ASX mixer object.
nDestinationNodeThe 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().
p_hNodeThe returned destination node handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
cobranet/main.c, and 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:
hMixerA handle to an ASX mixer object.
pnCountThe retuned number of destination nodes.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
cobranet/main.c, and mixer/main.c.
ASX32_API ASX_ERROR ASX_Mixer_GetNodeByType ( ASX_HANDLE  hMixer,
const enum asxNODE  eType,
const int  nIndex,
ASX_HANDLE p_hNode 
)

Get a node by type.

This function searches all mixer nodes for a node of a particular type and index. This function could be used to find a "LineOut" 1 node for example.

Parameters:
hMixerA handle to an ASX mixer object.
eTypeThe node type to get. This should be set to one of asxNODE.
nIndexThe 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.
p_hNodeThe 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:
hMixerA handle to an ASX mixer object.
eTypeThe node type to get. This should be set to one of asxNODE.
pnCountThe 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 p_hNode 
)

This function gets the handle of a particular source node.

Parameters:
hMixerA handle to an ASX mixer object.
nSourceNodeThe 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().
p_hNodeThe returned source node handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
cobranet/main.c, and 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:
hMixerA handle to an ASX mixer object.
pnCountThe retuned number of source nodes.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
cobranet/main.c, and mixer/main.c.
ASX32_API ASX_ERROR ASX_Mixer_ResetControls ( ASX_HANDLE  hMixer)

This function sets all the controls in the mixer to a known state.

  • SampleClock is set to Local and 44.1kHz
  • Volume controls on a single node are set to 0dB
  • Channel Modes are set to Normal
  • Volume controls between a src and dest node are set to 0dB if the node indexes match, otherwise -100db
  • Multiplexers are set to LineIn
  • Level controls are set to +14dBu.
  • VOX control set to -100dB (off)
Parameters:
hMixerA handle to an ASX mixer object.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.