Load the user-intended volume
#include <sys/asoundlib.h> int snd_pcm_set_apx_user_volume( snd_pcm_t *pcm, int16_t vol_mB );
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.
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).
One of the following causes:
QNX Neutrino
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | No |
Thread | No |