snd_pcm_set_apx_user_volume()
Load the user-intended volume
Synopsis:
#include <sys/asoundlib.h>
int snd_pcm_set_apx_user_volume( snd_pcm_t *pcm,
int16_t vol_mB );
Arguments:
- pcm
- The handle for the PCM device, which you must have opened by calling snd_pcm_open_name(), snd_pcm_open(), or snd_pcm_open_preferred().
- vol_mB
- The user volume in millibels (mB).
Library:
libasound.so
Use the -l asound option with qcc to link against this library.
Description:
The snd_pcm_set_apx_user_volume() function allows applications to provide an APX module with the volume set by the user. This user volume overrides SFO's default behavior, which is to calculate the volume across all common mixers and taking the maximum channel. After the user volume is set, SFO stops this default calculation and it is expected that changes to the user volume will use this call.
Because this function is only used with acoustic (SFO, SPM) APX modules, it must be called on the playback PCM device.
Returns:
EOK on success, or a negative errno value if an error occurred.
This function can also return the negative values that ioctl() can assign to errno (see ioctl() in the QNX Neutrino C Library Reference).
Errors:
- EINVAL
-
One of the following causes:
- The handle pcm is not opened.
- The value of pcm is NULL.
- The software mixer is not set up on the pcm device.
- ENODEV
- SFO is not configured.
Classification:
QNX Neutrino
| Safety: | |
|---|---|
| Cancellation point | Yes |
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
