Mixer functions


Detailed Description

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


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.


Function Documentation

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:
hMixer A handle to an ASX mixer object.
nControl The index of the control handle to return.
p_hControlBase 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 p_hControlBase
 

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

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.
p_hControlBase The returned ASX control handle.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
dual_mono_play/main.c, dual_mono_record/main.c, mixer/main.c, mux/main.c, play/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:
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 p_hNode
 

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().
p_hNode 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 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:
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.
p_hNode 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 p_hNode
 

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().
p_hNode 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.

ASX32_API ASX_ERROR ASX_Mixer_ResetControls ASX_HANDLE  hMixer  ) 
 

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

  • 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:
hMixer A handle to an ASX mixer object.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.


Generated on Tue Nov 18 13:03:40 2008 for ASX by  doxygen 1.4.6-NO