qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anshul Makkar <anshul.makkar@profitbricks.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Programmingkid <programmingkidx@gmail.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Help debugging audio problem
Date: Fri, 4 Jul 2014 11:24:22 +0200	[thread overview]
Message-ID: <CAM4NYE8MJiCovNO1-1OdFOKBfSvrVVLmvE3UtUCP+MS29_hjBw@mail.gmail.com> (raw)
In-Reply-To: <87lhsaudd7.fsf@blackfin.pond.sub.org>

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.
>

      reply	other threads:[~2014-07-04  9:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM4NYE8MJiCovNO1-1OdFOKBfSvrVVLmvE3UtUCP+MS29_hjBw@mail.gmail.com \
    --to=anshul.makkar@profitbricks.com \
    --cc=armbru@redhat.com \
    --cc=programmingkidx@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).