ioap_hf_set_output_volume()

Set the output volume.

Synopsis:

#include <acoustic/hf.h>

int ioap_hf_set_output_volume(int apd,
                int32_t* volume);
        

Arguments:

apd
The handle to io-acoustic.
volume
Pointer to the acoustic processing volume.

Library:

libacoustic

Description:

The ioap_hf_set output_volume() sets the handsfree acoustic processing volume. The valid range is 0 (minumum) to 100 (maximum). Values outside this range are clamped; for example, if you try to set the volume to 120, the system will set it at 100.

If acoustic processing is active, the volume change takes effect immediately. If acoustic processing isn't active, the change takes effect the next time acoustic processing is started.

To retrieve the volume setting, call ioap_hf_get_output_volume().

Note: To use this function, acoustic processing on your system must be configured to allow the volume to be set through the API (volumecontrol is set to true in the configuration file).

Returns:

0
Success: the volume setting.
-1
An error occurred (errno is set).

Errors:

EINVAL
Invalid handle or null pointer argument.
EIO
Acoustic processing is configured for fixed volume control, so the volume can't be set through the API.

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes