From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GIqCK-0001UT-Pz for qemu-devel@nongnu.org; Thu, 31 Aug 2006 13:19:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GIqCI-0001Rs-W5 for qemu-devel@nongnu.org; Thu, 31 Aug 2006 13:19:24 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GIqCI-0001Ri-Th for qemu-devel@nongnu.org; Thu, 31 Aug 2006 13:19:22 -0400 Received: from [70.91.254.68] (helo=antec.thindesktop.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GIqLy-000278-1c for qemu-devel@nongnu.org; Thu, 31 Aug 2006 13:29:22 -0400 Message-ID: <44F71A14.6070509@win4lin.com> Date: Thu, 31 Aug 2006 13:19:16 -0400 From: "Leonardo E. Reiter" MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: esd audio output patch and debuging. References: <20060830104549.fe233e29.cylix@solace.info> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 malc, Other than the lack of error handling and blocking mode, what is the problem with using QEMU's VM clock as the audio clock source? In my experience from older projects using esd (not related to QEMU), it is almost impossible to get reliable timing from ESD, especially if you are transporting over a network. The timing will certainly not be accurate enough for example for Windows guests using Windows Media Player, etc. Plus, you have to factor in socket buffering and underruns due to network latency if you expect anything synchronous on the socket. So what is the reason for objecting to the QEMU vm clock, much like the mute audio driver uses? I just want to know your reasoning for it just to further my own understanding. Thank you, Leo Reiter P.S. I can attest that using the mute audio driver you used, if the host clock resolution is well above 100Hz such as on Linux and FreeBSD, Windows Media Player guests have no problem with multimedia streams. I keep referring to WMP because it is extremely picky about timing in general, more so than other applications even. It seems that QEMU's vm clock is accurate enough for this task, just FYI. malc wrote: > 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. > > > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel -- Leonardo E. Reiter Vice President of Product Development, CTO Win4Lin, Inc. Virtual Computing that means Business Main: +1 512 339 7979 Fax: +1 512 532 6501 http://www.win4lin.com