mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Add protocl version check
- Added protocl version check. The caller of snd_pcm_{io|ext}plug_create()
must fill version field with SND_PCM_{IO|EXT}PLUG_VERSION beforehand.
- Added poll_descriptors and poll_descriptors_count callbacks for ioplug.
This commit is contained in:
parent
97010dbfdb
commit
e61d385993
4 changed files with 80 additions and 1 deletions
|
|
@ -32,8 +32,23 @@ enum {
|
|||
typedef struct snd_pcm_extplug snd_pcm_extplug_t;
|
||||
typedef struct snd_pcm_extplug_callback snd_pcm_extplug_callback_t;
|
||||
|
||||
/**
|
||||
* Protocol version
|
||||
*/
|
||||
#define SND_PCM_EXTPLUG_VERSION_MAJOR 1
|
||||
#define SND_PCM_EXTPLUG_VERSION_MINOR 0
|
||||
#define SND_PCM_EXTPLUG_VERSION_TINY 0
|
||||
#define SND_PCM_EXTPLUG_VERSION ((SND_PCM_EXTPLUG_VERSION_MAJOR<<16) |\
|
||||
(SND_PCM_EXTPLUG_VERSION_MINOR<<8) |\
|
||||
(SND_PCM_EXTPLUG_VERSION_TINY))
|
||||
|
||||
/** handle of extplug */
|
||||
struct snd_pcm_extplug {
|
||||
/**
|
||||
* protocol version; SND_PCM_EXTPLUG_VERSION must be filled here
|
||||
* before calling #snd_pcm_extplug_create()
|
||||
*/
|
||||
unsigned int version;
|
||||
/**
|
||||
* name of this plugin; must be filled before calling #snd_pcm_extplug_create()
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue