At this point it's useful to discuss all
the supported elements types, their respective attributes,
any associated controls, and the function you can call to create one:
- 3 Dimensional Effect type 1 (3d_effect1)
- Not currently in use in any driver.
- Accumulator type 1 (accu1)
- This element sums or adds together its input signal
to produce an output signal.
The number of output channels equals the input channels.
For example, for stereo, all left inputs are summed to the left output
and all right inputs are summed to the right output.
These elements may also introduce a fixed amount of
attenuation to the signal, and thus have an attenuation attribute.
Creation function:
ado_mixer_element_accu1()
- Accumulator type 2 (accu2)
- This element is similar to type 1,
except all input signals are summed together to a mono output.
It also has an attenuation attribute.
Creation function:
ado_mixer_element_accu2()
- Accumulator type 3 (accu3)
- This element is similar to type 1,
except the attenuation is variable.
As a result, it has a control function and
an attribute of how many channels to control.
Creation function:
ado_mixer_element_accu3()
- Converter (converter)
- This element converts a PCM stream from one
frequency to another.
It has an attribute of the bit resolution.
- Input Output (io)
- This element is a place holder for where
a signal enters (input) or exits (output) the mixer.
Typically, this a mechanical connector in the real world.
This element has attributes for the number of channels
and the channels that it contains.
In the simple case of stereo, there are two channels:
front left and front right.
Creation function:
ado_mixer_element_io()
- Multiplexer type 1 (mux1)
- This element selects one of its inputs
for connection to its output.
In the case of multiple channels, each channel input
is individually controlled.
For example, in the diagram above, the multiplexer
could select the left channel from the CD,
and the right channel from the MIC.
This element's attributes include the number of voices it controls,
and a control function.
Creation function:
ado_mixer_element_mux1()
- Multiplexer type 2 (mux2)
- This is a simplified type-1 multiplexer, in that it handles only
mono channels.
Creation function:
ado_mixer_element_mux2()
- Pan Control type 1 (pan_control1)
- Not currently in use in any driver.
- Pulse Code Modulator type 1 (pcm1)
- This element is a Digital to Analog Converter (DAC)
for output, or an Analog to Digital Converter (ADC) for input.
It's the bridging element between the analog mixer and
the digital PCM sections of a soundcard.
This element has an attribute that identifies which PCM device it is.
Creation function:
ado_mixer_element_pcm1()
- Pulse Code Modulator type 2 (pcm2)
- This element is used when a pcm1 supports multiple subchannels.
Each active subchannel is shown as a pcm2 element
connected via a possible volume-and-mute element
to a pcm1 element. Typically these elements are
created and maintained through the
ado_pcm_subchn_mixer_create()
API function call, and not used directly when building a mixer.
Creation function:
ado_mixer_element_pcm2()
- Switch type 1 (sw1)
- This element is array of simple on-or-off switches,
one for every channel that the switch controls.
It has a control function for setting the state of the switches.
Typically, these switches are used as mute controls for streams containing
more than one channel.
Creation function:
ado_mixer_element_sw1()
- Switch type 2 (sw2)
- This element is a simple on-or-off switch.
It has a control function to set its state.
Typically, these are used as mute switches on mono channels.
Creation function:
ado_mixer_element_sw2()
- Switch type 3 (sw3)
- This element is a matrix switch that controls
routing of the signals it controls.
To conceptualize this switch, think of a matrix with
all inputs along the left side, and all outputs
along the bottom. The total number of switches is
thus input × outputs. This element has an attribute
of the number of inputs and outputs, as well as a
control function. These elements are sometimes used
where a multiplexer would normally be used on the
input side of the mixer to allow recording
from multiple sources simultaneously.
Creation function:
ado_mixer_element_sw3()
- Tone Control type 1 (tone_control1)
- Not currently in use in any driver.
- Volume type 1 (volume1)
- This element controls the amplitude, or gain,
of analog signals that pass through it.
It has attributes of the number of channels it controls,
the range of gains it can control, and a control function.
Creation function:
ado_mixer_element_volume1()
You can associate instance data with the more complex elements.
If you need to access this instance data later, you have to call
ado_mixer_get_element_instance_data()
because ado_mixer_delement_t is an opaque data type.