c - alsa-lib - Can't locate structure definition. A low level design pattern? -


on line 63 of this example header file there typedef:

typedef struct _snd_ctl_elem_info snd_ctl_elem_info_t; 

there multiple examples of typedefs through code. goal actual definition of structure _snd_ctl_elem_info have grepped source , googled found no traces of actual definition. because of search failure, i've started think might missing concepts , might kernel , backwards compatibility?

my motivation able gdb step through alsa , have overview of structures.

is form of low level structure definition pattern?

this structure used alsa-lib communicate kernel, reuses kernel's definition.

the kernel header installed /usr/include/sound/asound.h, avoid dependence on kernel headers being installed correctly, alsa-lib has own copy of file in alsa-lib/include/sound/asound.h.

applications not supposed access members of structure directly, alsa-lib not include asound.h official headers (and not install it; it's used when compiling alsa-lib).

to actual definition, need #include <sound/asound.h>.


Comments