These functions support volume control manipulation.
More...
Functions |
| ASX32_API ASX_ERROR | ASX_Volume_GetChannels (ASX_HANDLE hVolume, int *pnChannels) |
| | Returns the number of channels this volume control has.
|
| ASX32_API ASX_ERROR | ASX_Volume_SetMute (ASX_HANDLE hVolume, int *mute, const int nChannels) |
| | Sets mute for this volume control.
|
| ASX32_API ASX_ERROR | ASX_Volume_GetMute (ASX_HANDLE hVolume, int *mute, const int nChannels) |
| | Returns the mute setting for this volume control.
|
| ASX32_API ASX_ERROR | ASX_Volume_SetGain (ASX_HANDLE hVolume, float *fSetdB, const int nChannels) |
| | Set volume.
|
| ASX32_API ASX_ERROR | ASX_Volume_GetGain (ASX_HANDLE hVolume, float *fdB, const int nChannels) |
| | Get volume.
|
| ASX32_API ASX_ERROR | ASX_Volume_GetRange (ASX_HANDLE hVolume, float *fMinGain, float *fMaxGain, float *fGainStep) |
| | Get that range of volume settings available.
|
| ASX32_API ASX_ERROR | ASX_Volume_SetAutofade (ASX_HANDLE hVolume, const float *fSetdB, const int nChannels, const ASX_TIME nDuration, const enum asxVOLUME_AUTOFADE eProfile) |
| | Set an autofade operation.
|
Detailed Description
These functions support volume control manipulation.
Function Documentation
Returns the number of channels this volume control has.
- Parameters:
-
| hVolume | A handle to an ASX volume object. |
| pnChannels | The returned number of channels. |
- Returns:
- Returns 0 if there is no error, otherwise one of asxERROR is returned.
- Examples:
- volume/main.c.
| ASX32_API ASX_ERROR ASX_Volume_GetGain |
( |
ASX_HANDLE |
hVolume, |
|
|
float * |
fdB, |
|
|
const int |
nChannels |
|
) |
| |
Get volume.
- Parameters:
-
| hVolume | A handle to an ASX volume control. |
| fdB | The returned gain in dBFS, i.e. 0dB is fullscale. |
| nChannels | The number of channels. This should match the number of elements in the fGetGain array. |
- Returns:
- Returns 0 if there is no error, otherwise one of asxERROR is returned.
- Examples:
- dual_mono_play/main.c.
Returns the mute setting for this volume control.
All returned settings will contain the same value.
- Parameters:
-
| hVolume | A handle to an ASX volume object. |
| mute | The returned mute setting. 1 is mute, 0 is unmuted. |
- Returns:
- Returns 0 if there is no error, otherwise one of asxERROR is returned.
| ASX32_API ASX_ERROR ASX_Volume_GetRange |
( |
ASX_HANDLE |
hVolume, |
|
|
float * |
fMinGain, |
|
|
float * |
fMaxGain, |
|
|
float * |
fGainStep |
|
) |
| |
Get that range of volume settings available.
- Parameters:
-
| hVolume | A handle to an ASX volume control. |
| fMinGain | The returned minimum gain in dBFS, i.e. 0dB is fullscale. |
| fMaxGain | The returned maximum gain in dBFS, i.e. 0dB is fullscale. |
| fGainStep | The returned gain stepsize in dB. |
- Returns:
- Returns 0 if there is no error, otherwise one of asxERROR is returned.
- Examples:
- volume/main.c.
Set an autofade operation.
This function commands the adapter to automatically fade the volume to the specified volume setting. The autofade operation begins when the command is issued.
- Parameters:
-
| hVolume | A handle to an ASX volume control. |
| fSetdB | The target gain in dBFS, i.e. 0dB is fullscale. |
| nChannels | The number of channels. This should match the number of elements in the fGetGain array. |
| nDuration | The duration in milliseconds. |
| eProfile | The fading profile. See asxVOLUME_AUTOFADE. All ASI adapters support asxVOLUME_AUTOFADE_LINEAR. |
- Returns:
- Returns 0 if there is no error, otherwise one of asxERROR is returned.
| ASX32_API ASX_ERROR ASX_Volume_SetGain |
( |
ASX_HANDLE |
hVolume, |
|
|
float * |
fSetdB, |
|
|
const int |
nChannels |
|
) |
| |
Set volume.
- Parameters:
-
| hVolume | A handle to an ASX volume control. |
| fSetdB | The gain to set in dBFS, i.e. 0dB is fullscale. |
| nChannels | The number of channels. This should match the number of elements in the fSetGain array. |
- Returns:
- Returns 0 if there is no error, otherwise one of asxERROR is returned.
- Examples:
- dual_mono_play/main.c, and volume/main.c.
Sets mute for this volume control.
All channels must contain the same setting.
- Parameters:
-
| hVolume | A handle to an ASX volume object. |
| mute | The mute setting. 1 is mute, 0 is unmuted. |
- Returns:
- Returns 0 if there is no error, otherwise one of asxERROR is returned.