All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: Paul Davis <paul@linuxaudiosystems.com>
Cc: "alsa-devel@lists.sourceforge.net" <alsa-devel@lists.sourceforge.net>
Subject: Re: Avoiding xruns... was Re: smix plugin available?
Date: Thu, 28 Nov 2002 01:03:14 +1100	[thread overview]
Message-ID: <3DE4D0A2.8070801@superbug.demon.co.uk> (raw)
In-Reply-To: <1038405126.2021588.0@newmx2.fast.net>

Paul Davis wrote:

>>I am currently taking the following approach: -
>>Always prepare 2 audio hardware periods of sample frames in advance 
>>inside the user app.
>>
>>1) snd_pcm_wait()
>>2) write()
>>3) prepare new sample frames, then go back to (1).
>>    
>>
>
>for lower latency, you'd do:
>
> 1) snd_pcm_wait()
> 2) prepare new sample frames
> 3) write(), then go back to (1).
>
>but for the kinds of things you are describing, your original order
>seems OK.
>
>--p
>
>  
>
I suppose it depends on what latency we are measuring.
My first concern is avoiding xruns, and preparing new sample frames 
takes quite a lot of time.
For my application, it does not really matter how long it takes for the 
samples to reach the speakers, it is just that we have to know very 
accurately how long it is in fact taking. (so we use the delay() function.)
The other issue is the avoiding of xruns, so I think my suggestion is 
better than yours for xrun avoidance.

Cheers
James




-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en

       reply	other threads:[~2002-11-27 14:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1038405126.2021588.0@newmx2.fast.net>
2002-11-27 14:03 ` James Courtier-Dutton [this message]
2002-11-27  9:29 smix plugin available? Jaroslav Kysela
2002-11-27 13:07 ` Avoiding xruns... was " James Courtier-Dutton
2002-11-27 13:55   ` Paul Davis

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=3DE4D0A2.8070801@superbug.demon.co.uk \
    --to=james@superbug.demon.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=paul@linuxaudiosystems.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.