Read handsfree acoustic processing events.
#include <acoustic/hf.h> ssize_t ioap_hf_read_events(int apd, void *buf, size_t buf_len);
libacoustic
The ioap_hf_read_events() function reads handsfree acoustic processing events. Before calling this function, you must register for events and intialize the queue by calling ioap_hf_register_events().
Each event consists of an ioap_event_t data structure. This structure may be followed by additional data, then by a variable number of padding bytes to ensure 8-byte alignment. Declaring your event buffer type double will ensure that it is 8-bit aligned.
The ioap_hf_read_events() function never returns partial events; it returns only the events that can fit into the length of the buffer that is provided. If the first event does not fit into this buffer, the function returns an error and sets E2BIG.
If the event buffer holds more that one event, you should use ioap_event_next() to extract the next event, based on the previous event's address and contents.
See IOAP_HF_EVENT_* for information about the individual handsfree acoustic processing events.
QNX Neutrino
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |