Received: from eggs.gnu.org ([2001:4830:134:3::10]:40313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2bA1-0004ek-TL for qemu-devel@nongnu.org; Thu, 03 Jul 2014 03:10:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2b9t-0001g2-4B for qemu-devel@nongnu.org; Thu, 03 Jul 2014 03:10:25 -0400 Received: from oxygen.pond.sub.org ([144.76.244.19]:56247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2b9s-0001fi-UG for qemu-devel@nongnu.org; Thu, 03 Jul 2014 03:10:17 -0400 From: Markus Armbruster References: <204C8AEC-4973-4F6D-A7D4-4E0108F754C0@gmail.com> Date: Thu, 03 Jul 2014 09:10:12 +0200 In-Reply-To: <204C8AEC-4973-4F6D-A7D4-4E0108F754C0@gmail.com> (Programmingkid's message of "Thu, 12 Jun 2014 11:57:35 -0400") Message-ID: <87lhsaudd7.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] Help debugging audio problem List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Programmingkid Cc: qemu-devel@nongnu.org Programmingkid 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.