Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Chris Raphael <raphael@math.umass.edu>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: playing underruns
Date: Thu, 13 Feb 2003 10:55:49 +0100	[thread overview]
Message-ID: <s5h3cmsmrmi.wl@alsa2.suse.de> (raw)
In-Reply-To: <200302122256.h1CMuJ628990@fafner.math.umass.edu>

Hi,

check LAD site,
	http://www.linuxdj.com/audio/lad/resourceslatency.php3

you'll find some good information how to get low-latency.


Takashi

At Wed, 12 Feb 2003 17:56:19 -0500,
Chris Raphael wrote:
> 
> 
> Hello List,  
> 
>   This is my first post and I am new (a couple of weeks) to ALSA.
> 
> I am working on an application that plays audio output in response
> to audio input --- the relationship between input and output is 
> complicated and I will not describe it in any detail here --- I
> am building a musical accompaniment system.  I want the output to "respond"
> to the input with low latency so I cannot write the output samples
> very long before they are actually going to be played.  Currently
> I have a function that is called repeatedly (through a signal) and
> writes the samples about .05 secs before they will actually be played.  
> I monitor the delay, in samples, (I can't remember the name of the
> function (snd_delay_???) and see that the number of unplayed samples
> fluctuates but there does not seem to be an increasing or decreasing
> trend.  So I assume that I am writing at very close to the right
> rate and mostly the playback sounds fine.  But every so often,
> maybe once every 10 secs or so, I get a playback underrun.  I
> always check the system clock when my writing routine begins,
> so I know the underruns are almost always *not* due to my writing 
> routine getting a late callback.  By everything I can measure, the 
> samples are written on time.  Can anyone tell me what I need to do 
> to fix this problem? Perhaps it is not reasonable of me to hope to 
> write samples such a short time before they need to be played?
> 
> I would really appreciate any help I can get on this and will supply
> any relevant details.  I just didn't want to clutter up my question
> with lots of irrelevant info.
> 
> Thanks,
> 
> Christopher Raphael
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

  parent reply	other threads:[~2003-02-13  9:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-12 22:56 playing underruns Chris Raphael
2003-02-12 23:34 ` Paul Davis
2003-02-13  9:55 ` Takashi Iwai [this message]
     [not found] <200302122330.h1CNUMn05990@thales.math.umass.edu>
2003-02-13 14:10 ` Chris Raphael
2003-02-13 14:35   ` Paul Davis
     [not found] <200302131435.h1DEZWn21451@thales.math.umass.edu>
2003-02-13 19:07 ` Chris Raphael
2003-02-13 19:10   ` Paul Davis
2003-02-13 19:26     ` Mark Knecht
     [not found] <200302131911.h1DJBBn08117@thales.math.umass.edu>
2003-02-13 20:13 ` Chris Raphael

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=s5h3cmsmrmi.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=raphael@math.umass.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox