Help debugging audio problem
What does this code mean?
if (!glue (s->nb_hw_voices_, TYPE)) {
return NULL;
}The code is found in audio_template.h at line 244.
I tried using GDB to figure out what it was doing, but had little luck.
The AC97 sound card does not work, and I'm trying to change that.
Any help would be great. Thanks.
Quoted 6 lines · Programmingkid
What does this code mean?
if (!glue (s->nb_hw_voices_, TYPE)) { return NULL; }
Quoted 7 lines
The code is found in
audio_template.hat line 244.I tried using GDB to figure out what it was doing, but had little luck.
The AC97 sound card does not work, and I'm trying to change that.
Any help would be great. Thanks.
Definition of macro glue is in osdep.h. It glues together its arguments. Consult your textbook on C to understand how that kind of arcane preprocessor magic works.
The audio subsystem is exceedingly fond of magic.
In actual use, macro TYPE has either value in or out, thus the result is either s->nb_hw_voices_in or s->nb_hw_voices_out.
Use of glue is heavily uses in audio code. I completely redesigned it for Virtualbox and removed all the hard to understand glue code :) .
Not sure if this glue magic is such heavily used anywhere else also.
Moreover audio code uses one big monolythic big audio file audio.c . So bringing modularity was another aim of my redesigning.
Anshul Makkar
Quoted 25 lines · Markus Armbruster
Quoted 6 lines · Programmingkid
What does this code mean?
if (!glue (s->nb_hw_voices_, TYPE)) { return NULL; }Quoted 7 lines
The code is found in
audio_template.hat line 244.I tried using GDB to figure out what it was doing, but had little luck.
The AC97 sound card does not work, and I'm trying to change that.
Any help would be great. Thanks.
Definition of macro glue is in
osdep.h. It glues together its arguments. Consult your textbook on C to understand how that kind of arcane preprocessor magic works.The audio subsystem is exceedingly fond of magic.
In actual use, macro TYPE has either value in or out, thus the result is either
s->nb_hw_voices_inors->nb_hw_voices_out.