ioap_hf_mute()

Set or get the acoustic processing input or output mute status.

Synopsis:

#include <acoustic/hf.h>

int ioap_hf_mute(int adp, uint32_t direction, int32_t* muteaction);

Arguments:

apd
The handle to io-acoustic.
direction
The direction of the acoustic processing, either IOAP_INPUT or IOAP_OUTPUT.
muteaction
A pointer to value specifying the mute action to perform. This action can be one of:
  • IOAP_ON
  • IOAP_OFF
  • IOAP_NOCHANGE (Only retrieve the mute state.)

Library:

libacoustic

Description:

The ioap_hf_mute() function sets and gets the mute state for acoustic processing input and output.

Applying hardware mutes when you are using acoustic processing is not advised since the hardware will mute the microphone audio before it is input to the acoustic processing library. With no input coming from the microphone, the noise and signal estimates that the acoustic processing maintains will decay down to zero. When the mute is later released, acoustic processing requires time to rebuild these statistics, which it requires for correct operation in the current acoustic environment.

When you use the acoustic processing library to apply mutes, if acoustic processing isn't active, the mute action has no effect. However, the new setting is maintained until the next time that acoustic processing is started, and applied at that time.

Returns:

>0
Success
-1
An error occurred (errno is set).

Errors:

EINVAL
Invalid handle, direction, or null pointer argument.

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread Yes