* [Qemu-devel] Help debugging audio problem
@ 2014-06-12 15:57 Programmingkid
2014-07-03 7:10 ` Markus Armbruster
0 siblings, 1 reply; 3+ messages in thread
From: Programmingkid @ 2014-06-12 15:57 UTC (permalink / raw)
To: qemu-devel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Help debugging audio problem
2014-06-12 15:57 [Qemu-devel] Help debugging audio problem Programmingkid
@ 2014-07-03 7:10 ` Markus Armbruster
2014-07-04 9:24 ` Anshul Makkar
0 siblings, 1 reply; 3+ messages in thread
From: Markus Armbruster @ 2014-07-03 7:10 UTC (permalink / raw)
To: Programmingkid; +Cc: qemu-devel
Programmingkid <programmingkidx@gmail.com> writes:
> 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.
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Help debugging audio problem
2014-07-03 7:10 ` Markus Armbruster
@ 2014-07-04 9:24 ` Anshul Makkar
0 siblings, 0 replies; 3+ messages in thread
From: Anshul Makkar @ 2014-07-04 9:24 UTC (permalink / raw)
To: Markus Armbruster; +Cc: Programmingkid, qemu-devel
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
On Thu, Jul 3, 2014 at 9:10 AM, Markus Armbruster <armbru@redhat.com> wrote:
> Programmingkid <programmingkidx@gmail.com> writes:
>
>> 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.
>
> 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.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-04 9:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-12 15:57 [Qemu-devel] Help debugging audio problem Programmingkid
2014-07-03 7:10 ` Markus Armbruster
2014-07-04 9:24 ` Anshul Makkar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).