Functions | |
| HPI_ERR | HPI_Volume_QueryChannels (const HPI_HSUBSYS *phSubSys, const HPI_HCONTROL hVolume, HW32 *pChannels) |
| Get the number of channels supported by this volume control. | |
| HPI_ERR | HPI_VolumeSetGain (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, short anLogGain[HPI_MAX_CHANNELS]) |
| Set the gain of a volume control. | |
| HPI_ERR | HPI_VolumeGetGain (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, short anLogGain[HPI_MAX_CHANNELS]) |
| Gets the current gain of a volume control. | |
| HPI_ERR | HPI_VolumeQueryRange (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, short *nMinGain_01dB, short *nMaxGain_01dB, short *nStepGain_01dB) |
| Query the range of a volume or level control. | |
| HPI_ERR | HPI_VolumeAutoFadeProfile (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, short anStopGain0_01dB[HPI_MAX_CHANNELS], HW32 dwDurationMs, HW16 wProfile) |
| Starts an automatic ramp of the volume control from the current gain setting to the specified setting over the specified duration (in milliseconds). | |
| HPI_ERR | HPI_VolumeAutoFade (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, short anStopGain0_01dB[HPI_MAX_CHANNELS], HW32 dwDurationMs) |
They can also be present on source nodes, such as Ostream or LineIn. They control the gain/attenuation of the signal passing through them.
For example if you have a -10dB (relative to digital full-scale) signal passing through a volume control with a gain set to -6dB, then the output signal would be -16dB.
The units of gain parameters are milliBels (mB), equivalent to 1/1000 of a Bel, or 1/100 of a decibel. For example a gain of -14.00dB is represented as -1400.
Gain parameters are stereo, stored in a 2 element array, element 0 is the left channel and element 1 is the right channel.
A gain value of HPI_GAIN_OFF will set the gain to its maximum attenuation or mute if the adapter supports it.
While most volume controls are attenuation only, some volume controls support gain as well. This is adapter and control dependant. Use the HPI_VolumeGetRange() function to determine if the control supports gain.
|
||||||||||||||||
|
Get the number of channels supported by this volume control.
|
|
||||||||||||||||
|
Set the gain of a volume control. Setting the gain of a volume control has the side effect that any autofades currently underway are terminated. The volume would become that of the current Set command.
|
|
||||||||||||||||
|
Gets the current gain of a volume control.
|
|
||||||||||||||||||||||||
|
Query the range of a volume or level control. Gets the max,min and step of the specified volume control.
|
|
||||||||||||||||||||||||
|
Starts an automatic ramp of the volume control from the current gain setting to the specified setting over the specified duration (in milliseconds). The gain starts at the current gain value and fades up/down to anStopGain0_01dB[] over the specified duration. The fade profile can be either log or linear. When wProfile==HPI_VOLUME_AUTOFADE_LOG the gain in dB changes linearly over time. When wProfile==HPI_VOLUME_AUTOFADE_LINEAR the gain multiplier changes linearly over time. For example half way through the fade time of a fade from 0dB (100%) to -100dB (approx 0%) the gain will be -6dB (50%).
|
|
||||||||||||||||||||
|
|
1.4.6-NO