Mixer and Controls


Modules

 AES/EBU Digital audio receiver controls
 The AESEBU receiver receives audio from a standard digital audio interface (AESEBU or SPDIF).
 AES/EBU Digital audio transmitter control
 The AESEBU transmitter transmits audio via a standard digital audio interface (AESEBU or SPDIF).
 Bitstream control
 Control synchronous bitstream I/O.
 Channel Mode control
 A Channel Mode allows you to swap the left and right channels, mix the left and right channels into the left or right channel only, or send the left or right channels to both left and right.
 Cobranet control
 A cobranet adapter has one cobranet control for each cobranet interface (usually only one).
 Compressor Expander control
 The compander multiplies its input signal by a factor that is dependent on the amplitude of that signal.
 Level Control
 The level control sets the full scale reference level of the line (analog) inputs and outputs The level is in units of 0.01dBu (0dBu = 0.775 VRMS).
 Meter Control
 The meter control returns information about the level of the audio signal at the position of the control.
 Microphone control
 A Microphone control of type HPI_CONTROL_MICROPHONE is always located on a source node of type HPI_SOURCE_NODE_MICROPHONE.
 Multiplexer control
 This control allows one of many sources to be connected to a destination Typically used on the instream (record) side to select a record input or on the linein to select analog or digital input.
 SampleClock control
 The SampleClock control is used to control the clock source for the adapter.
 Tone Detector control
 The tone detector monitors its inputs for the presence of any of a number of tones.
 Silence Detector Controls
 The silence detector control monitors its input for silence exceeding a set duration.
 Tuner Controls
 The tuner control sets the band and frequency of a tuner, and measures the RF level.
 PAD Control
 The PAD control supports the reading of "Program Associated Data" from a tuner node.
 Volume Control
 Volume controls are usually situated on a "connection" between a source node and a destination node.
 Vox control
 VOX controls are always situated on a destination node of type HPI_DESTNODE_ISTREAM.
 Universal Control
 Universal controls.
 RDS analysis functions
 Parametric Equalizer control
 The parametric equalizer control consists of a series of filters that are applied successively to the signal.

Enumerations

enum  HPI_SOURCENODES {
  HPI_SOURCENODE_NONE = 100, HPI_SOURCENODE_OSTREAM = 101, HPI_SOURCENODE_LINEIN = 102, HPI_SOURCENODE_AESEBU_IN = 103,
  HPI_SOURCENODE_TUNER = 104, HPI_SOURCENODE_RF = 105, HPI_SOURCENODE_CLOCK_SOURCE = 106, HPI_SOURCENODE_RAW_BITSTREAM = 107,
  HPI_SOURCENODE_MICROPHONE = 108, HPI_SOURCENODE_COBRANET = 109, HPI_SOURCENODE_ANALOG = 110, HPI_SOURCENODE_ADAPTER = 111,
  HPI_SOURCENODE_LAST_INDEX = 111
}
 Source node types. More...
enum  HPI_DESTNODES {
  HPI_DESTNODE_NONE = 200, HPI_DESTNODE_ISTREAM = 201, HPI_DESTNODE_LINEOUT = 202, HPI_DESTNODE_AESEBU_OUT = 203,
  HPI_DESTNODE_RF = 204, HPI_DESTNODE_SPEAKER = 205, HPI_DESTNODE_COBRANET = 206, HPI_DESTNODE_ANALOG = 207,
  HPI_DESTNODE_LAST_INDEX = 207
}
 Destination node types. More...
enum  HPI_CONTROLS {
  HPI_CONTROL_GENERIC = 0, HPI_CONTROL_CONNECTION = 1, HPI_CONTROL_VOLUME = 2, HPI_CONTROL_METER = 3 ,
  HPI_CONTROL_MULTIPLEXER = 5, HPI_CONTROL_AESEBU_TRANSMITTER = 6 , HPI_CONTROL_AESEBU_RECEIVER = 7 , HPI_CONTROL_LEVEL = 8,
  HPI_CONTROL_TUNER = 9, HPI_CONTROL_VOX = 11, HPI_CONTROL_CHANNEL_MODE = 15, HPI_CONTROL_BITSTREAM = 16,
  HPI_CONTROL_SAMPLECLOCK = 17, HPI_CONTROL_MICROPHONE = 18, HPI_CONTROL_PARAMETRIC_EQ = 19 , HPI_CONTROL_COMPANDER = 20,
  HPI_CONTROL_COBRANET = 21, HPI_CONTROL_TONEDETECTOR = 22, HPI_CONTROL_SILENCEDETECTOR = 23, HPI_CONTROL_PAD = 24,
  HPI_CONTROL_SRC = 25, HPI_CONTROL_UNIVERSAL = 26, HPI_CONTROL_LAST_INDEX = 26
}
 Mixer control types. More...
enum  HPI_MIXER_STORE_COMMAND {
  HPI_MIXER_STORE_SAVE = 1, HPI_MIXER_STORE_RESTORE = 2, HPI_MIXER_STORE_DELETE = 3, HPI_MIXER_STORE_ENABLE = 4,
  HPI_MIXER_STORE_DISABLE = 5, HPI_MIXER_STORE_SAVE_SINGLE = 6
}
 Commands used by HPI_MixerStore(). More...
enum  HPI_SWITCH_STATES { HPI_SWITCH_OFF = 0, HPI_SWITCH_ON = 1 }
 Used by mixer plugin enable functions. More...

Functions

HPI_ERR HPI_MixerOpen (const HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HPI_HMIXER *phMixer)
 Opens and initializes an adapters mixer.
HPI_ERR HPI_MixerClose (const HPI_HSUBSYS *phSubSys, HPI_HMIXER hMixer)
 Closes a mixer.
HPI_ERR HPI_MixerGetControl (const HPI_HSUBSYS *phSubSys, HPI_HMIXER hMixer, HW16 wSrcNodeType, HW16 wSrcNodeTypeIndex, HW16 wDstNodeType, HW16 wDstNodeTypeIndex, HW16 wControlType, HPI_HCONTROL *phControl)
 Gets a mixer control.
HPI_ERR HPI_MixerGetControlByIndex (const HPI_HSUBSYS *phSubSys, HPI_HMIXER hMixer, HW16 wControlIndex, HW16 *pwSrcNodeType, HW16 *pwSrcNodeIndex, HW16 *pwDstNodeType, HW16 *pwDstNodeIndex, HW16 *pwControlType, HPI_HCONTROL *phControl)
 Get the location and type of a mixer control by index.
HPI_ERR HPI_MixerStore (const HPI_HSUBSYS *phSubSys, HPI_HMIXER hMixer, enum HPI_MIXER_STORE_COMMAND command, HW16 wIndex)
 Execute a command on the Mixer Control store.
HPI_ERR HPI_ControlQuery (const HPI_HSUBSYS *phSubSys, const HPI_HCONTROL hControl, const HW16 wAttrib, const HW32 dwIndex, const HW32 dwParam, HW32 *pdwSetting)

Enumeration Type Documentation

enum HPI_SOURCENODES
 

Source node types.

Enumerator:
HPI_SOURCENODE_NONE  This define can be used instead of 0 to indicate that there is no valid source node.

A control that exists on a destination node can be searched for using a source node value of either 0, or HPI_SOURCENODE_NONE

HPI_SOURCENODE_OSTREAM  Out Stream (Play) node.
HPI_SOURCENODE_LINEIN  Line in node - could be analog, AES/EBU or network.
HPI_SOURCENODE_AESEBU_IN  AES/EBU input node.
HPI_SOURCENODE_TUNER  Tuner node.
HPI_SOURCENODE_RF  RF input node.
HPI_SOURCENODE_CLOCK_SOURCE  Clock source node.
HPI_SOURCENODE_RAW_BITSTREAM  Raw bitstream node.
HPI_SOURCENODE_MICROPHONE  Microphone node.
HPI_SOURCENODE_COBRANET  Cobranet input node - Audio samples come from the Cobranet network and into the device.
HPI_SOURCENODE_ANALOG  Analog input node.
HPI_SOURCENODE_ADAPTER  Adapter node.
HPI_SOURCENODE_LAST_INDEX  largest ID

enum HPI_DESTNODES
 

Destination node types.

Enumerator:
HPI_DESTNODE_NONE  This define can be used instead of 0 to indicate that there is no valid destination node.

A control that exists on a source node can be searched for using a destination node value of either 0, or HPI_DESTNODE_NONE

HPI_DESTNODE_ISTREAM  In Stream (Record) node.
HPI_DESTNODE_LINEOUT  Line Out node.
HPI_DESTNODE_AESEBU_OUT  AES/EBU output node.
HPI_DESTNODE_RF  RF output node.
HPI_DESTNODE_SPEAKER  Speaker output node.
HPI_DESTNODE_COBRANET  Cobranet output node - Audio samples from the device are sent out on the Cobranet network.
HPI_DESTNODE_ANALOG  Analog output node.
HPI_DESTNODE_LAST_INDEX  largest ID

enum HPI_CONTROLS
 

Mixer control types.

Enumerator:
HPI_CONTROL_GENERIC  Generic control.
HPI_CONTROL_CONNECTION  A connection between nodes.
HPI_CONTROL_VOLUME  Volume control - works in dBFs.
HPI_CONTROL_METER  Peak meter control.
HPI_CONTROL_MULTIPLEXER  Multiplexer control.
HPI_CONTROL_AESEBU_TRANSMITTER  AES/EBU transmitter control.
HPI_CONTROL_AESEBU_RECEIVER  AES/EBU receiver control.
HPI_CONTROL_LEVEL  Level/trim control - works in dBu.
HPI_CONTROL_TUNER  Tuner control.
HPI_CONTROL_VOX  Vox control.
HPI_CONTROL_CHANNEL_MODE  Channel mode control.
HPI_CONTROL_BITSTREAM  Bitstream control.
HPI_CONTROL_SAMPLECLOCK  Sample clock control.
HPI_CONTROL_MICROPHONE  Microphone control.
HPI_CONTROL_PARAMETRIC_EQ  Parametric EQ control.
HPI_CONTROL_COMPANDER  Compander control.
HPI_CONTROL_COBRANET  Cobranet control.
HPI_CONTROL_TONEDETECTOR  Tone detector control.
HPI_CONTROL_SILENCEDETECTOR  Silence detector control.
HPI_CONTROL_PAD  Tuner PAD control.
HPI_CONTROL_SRC  Samplerate converter control.
HPI_CONTROL_UNIVERSAL  Universal control.
HPI_CONTROL_LAST_INDEX  Highest control type ID.

enum HPI_MIXER_STORE_COMMAND
 

Commands used by HPI_MixerStore().

Enumerator:
HPI_MIXER_STORE_SAVE  Save all mixer control settings.
HPI_MIXER_STORE_RESTORE  Restore all controls from saved.
HPI_MIXER_STORE_DELETE  Delete saved control settings.
HPI_MIXER_STORE_ENABLE  Enable auto storage of some control settings.
HPI_MIXER_STORE_DISABLE  Disable auto storage of some control settings.
HPI_MIXER_STORE_SAVE_SINGLE  Save the attributes of a single control.

enum HPI_SWITCH_STATES
 

Used by mixer plugin enable functions.

E.g. HPI_ParametricEQ_SetState()

Enumerator:
HPI_SWITCH_OFF  Turn the mixer plugin on.
HPI_SWITCH_ON  Turn the mixer plugin off.


Function Documentation

HPI_ERR HPI_MixerOpen const HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HPI_HMIXER *  phMixer
 

Opens and initializes an adapters mixer.

An Adapter index is passed in and a Mixer handle is passed back. The handle is used for all future calls to that Mixer.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
wAdapterIndex  Index of adapter to be opened. Ranges from 0 to 15 and corresponds to the Adapter Index set on the adapter hardware.
phMixer  Returned handle to the Mixer.

HPI_ERR HPI_MixerClose const HPI_HSUBSYS *  phSubSys,
HPI_HMIXER  hMixer
 

Closes a mixer.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
hMixer  Handle to the adapter mixer to close.

HPI_ERR HPI_MixerGetControl const HPI_HSUBSYS *  phSubSys,
HPI_HMIXER  hMixer,
HW16  wSrcNodeType,
HW16  wSrcNodeTypeIndex,
HW16  wDstNodeType,
HW16  wDstNodeTypeIndex,
HW16  wControlType,
HPI_HCONTROL *  phControl
 

Gets a mixer control.

The control maybe located in one of three places:

  1. On a connection between a source node and a destination node.
    You specify both source and destination nodes (via type and type index).
  2. On a source node.
    You specify the source node and leave the destination node type and index as 0.
  3. On a destination node.
    You specify the destination node and leave the source node type and index as 0.

Note:
Not all adapters have controls at all nodes, or between all nodes. Consult the Mixer Map for your particular adapter to find out the location and type of controls in its mixer.
Say you have an audio adapter with a mixer that has the following layout:

mixer_get_control.png

You can see that the mixer has two meter controls, located on each of the Outstream source nodes, two volume controls, located between the OutStream sources and the LineOut destination nodes and one level control located on the LineOut destination node.

You would use the following code to obtain a handle to the volume control that lies on the connection between OutStream#1 and LineOut#0:

Example:
wHE = HPI_MixerGetControl(
                &hSubSys,
                hMixer,
                HPI_SOURCENODE_OSTREAM,
                1,
                HPI_DESTNODE_LINEOUT,
                0,
                HPI_CONTROL_VOLUME,
                &hVolControl
                );
You would use the following code to obtain a handle to the level control that lies on the LineOut#0 node:
Example:
        wHE = HPI_MixerGetControl(
                        &hSubSys,
                        hMixer,
                        0,
                        0,
                        HPI_DESTNODE_LINEOUT,
                        0,
                        HPI_CONTROL_LEVEL,
                        &hLevControl
                        );
Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
hMixer  Mixer handle.
wSrcNodeType  Source node type i.e. HPI_SOURCENODE_OSTREAM.
wSrcNodeTypeIndex  Index of particular source node type i.e. the 2nd HPI_SOURCENODE_OSTREAM would be specified as index=1.
wDstNodeType  Destination node type i.e. HPI_DESTNODE_LINEOUT.
wDstNodeTypeIndex  Index of particular source node type i.e. the 3rd HPI_DESTNODE_LINEOUT would be specified as index=2
wControlType  Type of mixer control i.e. One of the HPI_CONTROLS
phControl  Handle to the particular control

HPI_ERR HPI_MixerGetControlByIndex const HPI_HSUBSYS *  phSubSys,
HPI_HMIXER  hMixer,
HW16  wControlIndex,
HW16 *  pwSrcNodeType,
HW16 *  pwSrcNodeIndex,
HW16 *  pwDstNodeType,
HW16 *  pwDstNodeIndex,
HW16 *  pwControlType,
HPI_HCONTROL *  phControl
 

Get the location and type of a mixer control by index.

This function is primarily intended to be used to enumerate all the controls in a mixer. To enumerate all the mixer controls of an adapter, iterate wControlIndex from 0 until the function returns HPI_ERROR_INVALID_OBJ_INDEX. The iteration should not be terminated if error HPI_ERROR_CONTROL_DISABLED is returned. This indicates that a control that normally exists is disabled for some reason (possibly hardware failure). The application should not access such controls, but may for instance display a grayed-out GUI control.

A control may exist between two nodes, or on a single node in which case the non-existent node type is set to HPI_SOURCENODE_NONE or HPI_DESTNODE_NONE.

An invalid source node returns HPI_SOURCENODE_NONE, while an invalid destination node will return HPI_DESTNODE_NONE.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Return values:
HPI_ERROR_INVALID_OBJ_INDEX when wControlIndex > number of mixer controls
Parameters:
phSubSys  Pointer to HPI subsystem handle.
hMixer  Mixer handle.
wControlIndex  Control Index to query.
pwSrcNodeType  Returned source node type for control at index wControlIndex.
pwSrcNodeIndex  Returned source node index for control at index wControlIndex.
pwDstNodeType  Returned destination node type for control at index wControlIndex.
pwDstNodeIndex  Returned destination node index for control at index wControlIndex.
pwControlType  Returned control type for control at index wControlIndex.
phControl  Returned control handle for control at index wControlIndex.

HPI_ERR HPI_MixerStore const HPI_HSUBSYS *  phSubSys,
HPI_HMIXER  hMixer,
enum HPI_MIXER_STORE_COMMAND  command,
HW16  wIndex
 

Execute a command on the Mixer Control store.

Valid commands are members of HPI_MIXER_STORE_COMMAND

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Return values:
HPI_ERROR_INVALID_OBJ_INDEX when wControlIndex > number of mixer controls
Parameters:
phSubSys  Pointer to HPI subsystem handle.
hMixer  Mixer handle.
command  Command to execute.
wIndex  Optional index.

HPI_ERR HPI_ControlQuery const HPI_HSUBSYS *  phSubSys,
const HPI_HCONTROL  hControl,
const HW16  wAttrib,
const HW32  dwIndex,
const HW32  dwParam,
HW32 *  pdwSetting
 

Parameters:
phSubSys  Pointer to HPI subsystem handle
hControl  Control to query
wAttrib  An attribute of the control
dwIndex  Index for possible attribute values
dwParam  Supplementary parameter
pdwSetting  One of N possible settings for the control attribute, specified by dwIndex=0..N-1(and possibly depending on the value of the supplementary parameter)


Generated on Thu Jul 29 09:56:42 2010 for AudioScience HPI by  doxygen 1.4.6-NO