All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Reimar Döffinger" <Reimar.Doeffinger@stud.uni-karlsruhe.de>
Cc: Lee Revell <rlrevell@joe-job.com>, alsa-devel@lists.sourceforge.net
Subject: Re: Re: [Fwd: Re: [MPlayer-dev-eng] AV out of sync with "-ao alsa" in gmplayer, mplayer works ok]
Date: Wed, 19 Jan 2005 10:35:42 +0100	[thread overview]
Message-ID: <s5hbrblvk0h.wl@alsa2.suse.de> (raw)
In-Reply-To: <20050118202309.GA1147@rz.uni-karlsruhe.de>

At Tue, 18 Jan 2005 21:23:09 +0100,
Reimar Döffinger wrote:
> 
> Hi,
> On Thu, Jan 13, 2005 at 03:11:15PM -0500, Lee Revell wrote:
> > Are there any plans to fix the ALSA output so that it doesn't reset the
> > stream with every xrun?  Since you don't use a realtime thread to handle
> > the audio there are certain to be some xruns, for example whenever using
> > the GUI controls in any way or moving the mouse.
> 
> xruns just should not happen. Ignoring them seems to be the very wrong
> way. Also a real-time thread should not be necessary just to avoid xruns
> when only moving the mouse IMHO.

No, it's not guaranteed at all.

> Maybe you can just increase the buffer size somehow? At least for
> MPlayer a big buffer should cause no problems.

The hardware buffer size is limited.  Suppose the hardware which
can have the max buffer size 64kB.  When you play a DVD with 5.1
output, it corresponds to 0.11 second.

The dedicated audio thread works better than the single thread model
because of the following reasons (maybe more):

- It has a large intermediate buffer.  The buffer size can be as large
  as you like.
- It runs only in short time and sleeps.
  This is the preferred behavior for the kernel scheduler.  So, this
  thread may receive higher priority bonus.
- You can change the priority of only audio thread but keep others.


Takashi


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt

      reply	other threads:[~2005-01-19  9:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-29  9:11 [Fwd: Re: [MPlayer-dev-eng] AV out of sync with "-ao alsa" in gmplayer, mplayer works ok] Lee Revell
2004-12-29 10:19 ` Måns Rullgård
2004-12-29 10:25   ` Lee Revell
2005-01-13 15:10   ` Reimar Döffinger
2005-01-13 20:11     ` Lee Revell
2005-01-18 20:23       ` Reimar Döffinger
2005-01-19  9:35         ` Takashi Iwai [this message]

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=s5hbrblvk0h.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=Reimar.Doeffinger@stud.uni-karlsruhe.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=rlrevell@joe-job.com \
    /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.