鱼嘴凉拖鞋图片:data structure used in alsa project

来源:百度文库 编辑:九乡新闻网 时间:2024/05/03 22:26:38
understand the data structure used in alsa project is the key to the full understanding of the entire project.
typedef struct _snd_config snd_config_t;

struct _snd_config {
    char *id;
    snd_config_type_t type;
    union {
        long integer;
        long long integer64;
        char *string;
        double real;
        const void *ptr;
        struct {
            struct list_head fields;
            int join;
        } compound;
    } u;
    struct list_head list;
    snd_config_t *father;
};

usage: the complete definition of sound card is stored in such structure

typedef struct _snd_config_update snd_config_update_t;

struct _snd_config_update {
    unsigned int count;
    struct finfo *finfo;
};

usage: this structure stored the file information of alsa definition

struct finfo {
    char *name;
    dev_t dev;    //typedef short dev_t
    ino_t ino;
    time_t mtime;
};
usage: this structure stored file name, device ,inode,created time,etc.