Load an acoustic processing data set into a running AFM
Synopsis:
#include <sys/asoundlib.h>
int snd_afm_load_ap_dataset( snd_afm_t *handle,
const char *dataset,
int *ap_status );
Arguments:
- handle
- The handle for the AFM device, which you must have opened by calling
snd_afm_open_name()
or
snd_afm_open().
- dataset
- The name of the data set to load.
- ap_status
- A pointer to a location where the function can store the acoustic library return code.
Library:
libasound
Use the -l asound option with
qcc
to link against this library.
Description:
Note: This function can only be used if you have QNX Acoustic Management Platform 3.0 installed.
The snd_afm_load_ap_dataset() function specifies the name of an acoustic
processing parameter data set that can be used to qualify the parameter tuning specified with snd_afm_set_audio_mode(). The
dataset name is appended to the string ap_dataset_qcf_ to create a
.conf key used to look up the acoustic dataset file path. An error is returned
if the dataset file can't be found; otherwise, the name of the dataset is stored and one of the
following actions is taken:
- If the AFM is running, the data set is loaded immediately. The library return code is returned
in the ap_status argument. An application should check both the return value of
snd_afm_load_ap_dataset() and the ap_status argument to
determine if a call is successful. Passing an empty dataset while running returns the error
EBUSY.
- If the AFM isn't running, the data set is loaded when the AFM is started, after the library is
initialized with the qcf configuration file for the specified mode, but before processing is
started. If an error occurs when loading the data set, the AFM continues to run. Passing an empty
dataset while idle clears the stored dataset and no dataset is loaded on the next start.
Once set, the data set is loaded each time the AFM is started until a new data set is applied.
This function is applicable only to acoustic (ASD, CSA, ICC, QVP) AFMs.
Returns:
EOK on success, or a negative errno value upon failure.
This function can also return the return values of devctl() (see devctl() in the QNX Neutrino
C Library Reference).
Errors:
- -EINVAL
- The value of handle, dataset, or ap_status
is NULL.
Classification:
QNX Neutrino
Safety: |
|
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
Caveats:
This function is not thread safe if the handle (snd_afm_t) is used across multiple
threads.