[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: esd audio output patch and debuging.

From: malc
Subject: [Qemu-devel] Re: esd audio output patch and debuging.
Date: Fri, 1 Sep 2006 19:02:26 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Leonardo E. Reiter <lreiter <at> win4lin.com> writes:

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

Mute/wav rendering works by the virtue of having one clock source, i.e.
vm clock, furthermore the writes are non-blocking and instantaneous[1].
With esd one has to deal with two clock sources - one is vm clock other
is esds ability to consume the data. If vm clock is a bit lower w.r.t.
the audio clock esd uses - you will always starve the esd and in turn
audio subsystem it uses.

All in all real-time(in a loose sense) audio will only work if your
only constraint is the receivers ability to consume data. Given esds
interface the only safe way to do that is by emulating of a blocking
write, this in trun (given all other things into consideration) means
threads and interaction with QEMUs audio/main loop a'la sdlaudio or

[1] Less so for wav due to I/O, but close enough for all intents and

reply via email to

[Prev in Thread] Current Thread [Next in Thread]