Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GIl0w-0006em-Mt for qemu-devel@nongnu.org; Thu, 31 Aug 2006 07:47:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GIl0w-0006e9-23 for qemu-devel@nongnu.org; Thu, 31 Aug 2006 07:47:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIl0v-0006dt-Sj for qemu-devel@nongnu.org; Thu, 31 Aug 2006 07:47:17 -0400 Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GIlAX-0000e6-IM for qemu-devel@nongnu.org; Thu, 31 Aug 2006 07:57:13 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GIl0Z-0001hm-LQ for qemu-devel@nongnu.org; Thu, 31 Aug 2006 13:46:57 +0200 Received: from n100h003.catv.ext.ru ([n100h003.catv.ext.ru]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 31 Aug 2006 13:46:55 +0200 Received: from malc by n100h003.catv.ext.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 31 Aug 2006 13:46:55 +0200 From: malc Date: Thu, 31 Aug 2006 11:46:45 +0000 (UTC) Message-ID: References: <20060830104549.fe233e29.cylix@solace.info> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: news Subject: [Qemu-devel] Re: esd audio output patch and debuging. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Frederick Reeve solace.info> writes: > > Hello. > > Attached you will find a patch for esd audio support in QEMU. It is more or less a large modification of > audio/wavaudio.c. The patch will apply against the latest tarball release > http://fabrice.bellard.free.fr/qemu/qemu-0.8.2.tar.gz (0.8.2 at the time of this writing). You > will of course need libesd to compile this. To apply and test on linux/*nix simply: > > $ cd qemu-src-dir > $ patch -Np1 -i path/to/patch/file > $ ./configure --enable-esd > $ make > $ sudo make install > $ export QEMU_AUDIO_DRV=esd > $ qemu (your options here) -soundhw es1370 > [..snip..] There are several problems with this patch: a. esd_play_stream returns negative values on error (not zero) b. esd_play_stream can return with EINTR c. no error checking whatsoever on write to the socket d. the socket is most likely opened in blocking mode e. i don't think it's wise to use anything other than esd itself as a audio-clock source So basically the only way it can work (given the circumstances) is to have a thread that would perform a blocking write to the esd, and the rest as per coreaudio and sdladuio. P.S. Oh yeah, mixing tabs and spaces is also not a great idea.