All of lore.kernel.org
 help / color / mirror / Atom feed
From: malc <malc@pulsesoft.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: esd audio output patch and debuging.
Date: Fri, 1 Sep 2006 19:02:26 +0000 (UTC)	[thread overview]
Message-ID: <loom.20060901T205129-806@post.gmane.org> (raw)
In-Reply-To: 44F71A14.6070509@win4lin.com

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

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

  reply	other threads:[~2006-09-01 19:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-30 15:45 [Qemu-devel] esd audio output patch and debuging Frederick Reeve
2006-08-31 11:46 ` [Qemu-devel] " malc
2006-08-31 17:19   ` Leonardo E. Reiter
2006-09-01 19:02     ` malc [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-09-03 22:33 malc
2006-09-04  8:56 ` Peter Oberndorfer
2006-09-04 12:01   ` Christophe Fillot
2006-09-04 14:04     ` Peter Oberndorfer
2006-09-04 12:02   ` malc
2006-09-04  0:07 malc
2006-09-04  5:33 ` Frederick Reeve

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=loom.20060901T205129-806@post.gmane.org \
    --to=malc@pulsesoft.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.