歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> 關於Unix >> structure used in alsa project

structure used in alsa project

日期:2017/3/6 15:18:33   编辑:關於Unix
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 integ 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.

Copyright © Linux教程網 All Rights Reserved