External Filter plugin SDK
Overview
See the PCM (digital audio) interface page for more details. More…
// typedefs typedef snd_pcm_extplug snd_pcm_extplug_t; typedef snd_pcm_extplug_callback snd_pcm_extplug_callback_t; // enums enum { @5::SND_PCM_EXTPLUG_HW_FORMAT, @5::SND_PCM_EXTPLUG_HW_CHANNELS, @5::SND_PCM_EXTPLUG_HW_PARAMS, }; // structs struct snd_pcm_extplug; struct snd_pcm_extplug_callback; // global functions int snd_pcm_extplug_create( snd_pcm_extplug_t* ext, const char* name, snd_config_t* root, snd_config_t* slave_conf, snd_pcm_stream_t stream, int mode ); int snd_pcm_extplug_delete(snd_pcm_extplug_t* ext); void snd_pcm_extplug_params_reset(snd_pcm_extplug_t* ext); int snd_pcm_extplug_set_param_list( snd_pcm_extplug_t* extplug, int type, unsigned int num_list, const unsigned int* list ); int snd_pcm_extplug_set_param_minmax( snd_pcm_extplug_t* extplug, int type, unsigned int min, unsigned int max ); int snd_pcm_extplug_set_slave_param_list( snd_pcm_extplug_t* extplug, int type, unsigned int num_list, const unsigned int* list ); int snd_pcm_extplug_set_slave_param_minmax( snd_pcm_extplug_t* extplug, int type, unsigned int min, unsigned int max ); static __inline__ int snd_pcm_extplug_set_param( snd_pcm_extplug_t* extplug, int type, unsigned int val ); static __inline__ int snd_pcm_extplug_set_slave_param( snd_pcm_extplug_t* extplug, int type, unsigned int val ); // macros #define SND_PCM_EXTPLUG_VERSION #define SND_PCM_EXTPLUG_VERSION_MAJOR #define SND_PCM_EXTPLUG_VERSION_MINOR #define SND_PCM_EXTPLUG_VERSION_TINY
Detailed Documentation
See the PCM (digital audio) interface page for more details.
Enum Values
SND_PCM_EXTPLUG_HW_FORMAT
format
SND_PCM_EXTPLUG_HW_CHANNELS
channels
SND_PCM_EXTPLUG_HW_PARAMS
max number of hw constraints
Typedefs
typedef snd_pcm_extplug snd_pcm_extplug_t
Handle of external filter plugin
typedef snd_pcm_extplug_callback snd_pcm_extplug_callback_t
Callback table of extplug
Global Functions
int snd_pcm_extplug_create( snd_pcm_extplug_t* ext, const char* name, snd_config_t* root, snd_config_t* slave_conf, snd_pcm_stream_t stream, int mode )
Create an extplug instance.
Creates the extplug instance based on the given handle. The slave_conf argument is mandatory, and usually taken from the config tree of the PCM plugin as “slave” config value. name, root, stream and mode arguments are the values used for opening the PCM.
The callback is the mandatory field of extplug handle. At least, start, stop and pointer callbacks must be set before calling this function.
Parameters:
extplug |
the extplug handle |
name |
name of the PCM |
root |
configuration tree root |
slave_conf |
slave configuration root |
stream |
stream direction |
mode |
PCM open mode |
Returns:
0 if successful, or a negative error code
int snd_pcm_extplug_delete(snd_pcm_extplug_t* ext)
Delete the extplug instance.
The destructor of extplug instance. Closes the PCM and deletes the associated resources.
Parameters:
extplug |
the extplug handle to delete |
Returns:
0 if successful, or a negative error code
void snd_pcm_extplug_params_reset(snd_pcm_extplug_t* ext)
Reset extplug parameters.
Resets the all parameters for the given extplug handle.
Parameters:
extplug |
the extplug handle |
int snd_pcm_extplug_set_param_list( snd_pcm_extplug_t* extplug, int type, unsigned int num_list, const unsigned int* list )
Set master parameter as the list.
Sets the master parameter as the list. The available values of the given parameter type of this PCM (as input) is restricted to the ones of the given list.
Parameters:
extplug |
the extplug handle |
type |
parameter type |
num_list |
number of available values |
list |
the list of available values |
Returns:
0 if successful, or a negative error code
int snd_pcm_extplug_set_param_minmax( snd_pcm_extplug_t* extplug, int type, unsigned int min, unsigned int max )
Set master parameter as the min/max values.
Sets the master parameter as the min/max values. The available values of the given parameter type of this PCM (as input) is restricted between the given minimum and maximum values.
Parameters:
extplug |
the extplug handle |
type |
parameter type |
min |
the minimum value |
max |
the maximum value |
Returns:
0 if successful, or a negative error code
int snd_pcm_extplug_set_slave_param_list( snd_pcm_extplug_t* extplug, int type, unsigned int num_list, const unsigned int* list )
Set slave parameter as the list.
Sets the slave parameter as the list. The available values of the given parameter type of the slave PCM is restricted to the ones of the given list.
Parameters:
extplug |
the extplug handle |
type |
parameter type |
num_list |
number of available values |
list |
the list of available values |
Returns:
0 if successful, or a negative error code
int snd_pcm_extplug_set_slave_param_minmax( snd_pcm_extplug_t* extplug, int type, unsigned int min, unsigned int max )
Set slave parameter as the min/max values.
Sets the slave parameter as the min/max values. The available values of the given parameter type of the slave PCM is restricted between the given minimum and maximum values.
Parameters:
extplug |
the extplug handle |
type |
parameter type |
min |
the minimum value |
max |
the maximum value |
Returns:
0 if successful, or a negative error code
static __inline__ int snd_pcm_extplug_set_param( snd_pcm_extplug_t* extplug, int type, unsigned int val )
set the parameter constraint with a single value
static __inline__ int snd_pcm_extplug_set_slave_param( snd_pcm_extplug_t* extplug, int type, unsigned int val )
set the parameter constraint for slave PCM with a single value
Macros
#define SND_PCM_EXTPLUG_VERSION
Filter-plugin protocol version
#define SND_PCM_EXTPLUG_VERSION_MAJOR
Protocol major version
#define SND_PCM_EXTPLUG_VERSION_MINOR
Protocol minor version
#define SND_PCM_EXTPLUG_VERSION_TINY
Protocol tiny version