All of lore.kernel.org
 help / color / mirror / Atom feed
* playing underruns
@ 2003-02-12 22:56 Chris Raphael
  2003-02-12 23:34 ` Paul Davis
  2003-02-13  9:55 ` Takashi Iwai
  0 siblings, 2 replies; 9+ messages in thread
From: Chris Raphael @ 2003-02-12 22:56 UTC (permalink / raw)
  To: alsa-devel


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

^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <200302122330.h1CNUMn05990@thales.math.umass.edu>]
[parent not found: <200302131435.h1DEZWn21451@thales.math.umass.edu>]
[parent not found: <200302131911.h1DJBBn08117@thales.math.umass.edu>]

end of thread, other threads:[~2003-02-13 20:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-12 22:56 playing underruns Chris Raphael
2003-02-12 23:34 ` Paul Davis
2003-02-13  9:55 ` Takashi Iwai
     [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

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.