Skip to contentSkip to conversation

(no subject)

DISCUSSION 郝舜 2 participants 2 messages Apr 3, 2008

lore
Share & tools
lore

郝舜

author
#0 lore raw

Hi:
I'm confused by a problem when i modify a test application "alsa-lib-1.0.13/test/control.c".
I wanna use the structure "snd_ctl_elem_value_t",but when i write like this:
snd_ctl_elem_value_t aaa;
there will be an error:
storage size of 'aaa' isn't known
while
snd_ctl_elem_value_t *aaa;
makes no errors. But i can't change it directly such as:
aaa->id=test_id ; //test_id is defined before
cause it will bring an error:
dereferencing pointer to incomplete type
I think i should use the function like "snd_ctl_elem_info_set_id",but i just want to know why,i don't think it disobeys the C syntax.Is there something different in the ALSA making procedure?or Makefile?

haoshun
2008-04-03

#1 lore raw
Quoted 6 lines · 郝舜

I'm confused by a problem when i modify a test application "alsa-lib-1.0.13/test/control.c". I wanna use the structure "snd_ctl_elem_value_t",but when i write like this:

       snd_ctl_elem_value_t aaa;

there will be an error:
...
I think i should use the function like "snd_ctl_elem_info_set_id",

Yes.

Quoted 1 line

but i just want to know why,i don't think it disobeys the C syntax.

These structures are only defined internally in alsa-lib and are not exported. It was made this way to make the library binary compatible with future versions where the layout of these structures may change.

HTH
Clemens
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel