ASX Version4.10.32
Functions

Volume control functions

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

ASX32_API ASX_ERROR ASX_Volume_GetChannels ( ASX_HANDLE  hVolume,
int *  pnChannels 
)

Returns the number of channels this volume control has.

Parameters:
hVolumeA handle to an ASX volume object.
pnChannelsThe 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:
hVolumeA handle to an ASX volume control.
fdBThe returned gain in dBFS, i.e. 0dB is fullscale.
nChannelsThe 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.
ASX32_API ASX_ERROR ASX_Volume_GetMute ( ASX_HANDLE  hVolume,
int *  mute,
const int  nChannels 
)

Returns the mute setting for this volume control.

All returned settings will contain the same value.

Parameters:
hVolumeA handle to an ASX volume object.
muteThe 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:
hVolumeA handle to an ASX volume control.
fMinGainThe returned minimum gain in dBFS, i.e. 0dB is fullscale.
fMaxGainThe returned maximum gain in dBFS, i.e. 0dB is fullscale.
fGainStepThe returned gain stepsize in dB.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
Examples:
volume/main.c.
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.

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:
hVolumeA handle to an ASX volume control.
fSetdBThe target gain in dBFS, i.e. 0dB is fullscale.
nChannelsThe number of channels. This should match the number of elements in the fGetGain array.
nDurationThe duration in milliseconds.
eProfileThe 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:
hVolumeA handle to an ASX volume control.
fSetdBThe gain to set in dBFS, i.e. 0dB is fullscale.
nChannelsThe 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.
ASX32_API ASX_ERROR ASX_Volume_SetMute ( ASX_HANDLE  hVolume,
int *  mute,
const int  nChannels 
)

Sets mute for this volume control.

All channels must contain the same setting.

Parameters:
hVolumeA handle to an ASX volume object.
muteThe mute setting. 1 is mute, 0 is unmuted.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.