Load volume controls external to io-audio
#include <sys/asoundlib.h> int snd_pcm_set_apx_external_volume( snd_pcm_t *pcm, int nVoices, int16_t *vol_mB );
The snd_pcm_set_apx_external_volume() function allows clients to let an APX module know about volume controls that are external to io-audio (e.g., an external amplifier).
The nVoices and vol_mB arguments allow you to specify an array for cases where there are differences among channels. The external volume is used in SPM's speaker protection as well as SFO's default user volume calculation (when it is not overriden).
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 |