Prepare the system for acoustic processing.
Synopsis:
#include <acoustic/hf.h>
int ioap_hf_prepare(int apd) ;
Arguments:
- apd
- The handle to io-acoustic.
Description:
The ioap_hf_prepare() function prepares the system for acoustic processing. You must
call this function before you call io_hf_go() to start acoustic processing, including acoustic echo
cancellation. It can only be called when acoustic processing is stopped.
This function:
- Validates the acoustic processing routing against the current configuration specified by ioap_hf_route() and ensures that
there are no inconsistencies.
- Allocates the memory needed for audio transfer.
- Opens the audio devices in START_ON_GO mode. Audio transfer isn't started until
ioap_hf_go() is called.
When ioap_hf_prepare() finishes preparing the system, it delivers the acoustic
processing event IOAP_HF_EVENT_PREPARED.
Returns:
- 0
- Success
- -1
- An error occurred (errno is set).
Errors:
- EACCES
- Acoustic processing is not stopped.
- EINVAL
- Invalid handle or null pointer argument.
- EIO
- Setup error with input or output.
- ENODEV
- No memory available for data structures.
- ENOMEM
- No memory available for data structures.
Classification:
QNX Neutrino
Safety: |
|
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |