Linux Sound subsystem development
 help / color / mirror / Atom feed
From: est@hyperreal.org
To: linux-sound@vger.kernel.org
Subject: Re: [linux-audio-dev] streaming from disk to terminatorX added (via
Date: Sun, 24 Oct 1999 20:32:41 +0000	[thread overview]
Message-ID: <marc-linux-sound-94079724725307@msgid-missing> (raw)
In-Reply-To: <marc-linux-sound-94078505714168@msgid-missing>

Paul Barton-Davis discourseth:
> Benno writes:
> 
> >Since the kernel loads pages of the file into mem when they are
> >needed, it could cause audio-dropouts when working with low audio
> >buffer sizes (low latency) since, the playing thread might wait too
> >long for the kernel which tries to load the pages into mem.
> 
> >One trick to avoid this it to add a low priority thread , which does
> >basically read-ahead and read-behind, by accessing to pages before
> >and past the actual playing position.  It doesn't matter if this
> >thread blocks for a moment, since it doesn't play any audio data.
> >The audio thread will always find the needed pages in memory and will
> >not drop out.
> 
> i know that est@hyperreal.org will have something to say about this :)

Yes, I've been busy vacationing (which I still am :)

I don't see how mmap() can be reliable for this sort of thing.  Even
if you touch pages to bring them in, you could get unlucky.  Also,
this assumes we aren't mlocked to begin with which means that *any*
part of our process could be paged with resultant delays.  If we *do*
mlock() everything, the we need enough RAM for the entire sound file
and I'm not even sure exactly what would happen when doing the mmap().

> well, perhaps not, but he should. oolaboola (sp?)

Indeed..that's the usual translitteration. :)

> has been evolving
> toward some fairly sophisticated memory management to handle this kind
> of stuff.

Yes, and it's all ultimately based around intelligent advance `file'
(meaning `slow device') reads.  alsaplayer's buffering scheme may (as
Andy suggests) also be adequate.  oola has more support for loops and
marks but it doesn't yet handle negative rates.

Eric

  parent reply	other threads:[~1999-10-24 20:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-24 17:07 [linux-audio-dev] streaming from disk to terminatorX added (via mmap) Paul Barton-Davis
1999-10-24 17:09 ` [linux-audio-dev] streaming from disk to terminatorX added (via Andy Lo A Foe
1999-10-24 20:32 ` est [this message]
1999-10-25 12:52 ` [linux-audio-dev] streaming from disk to terminatorX added (via mmap) Benno Senoner
1999-10-25 12:58 ` Benno Senoner
1999-10-26  6:59 ` [linux-audio-dev] streaming from disk to terminatorX added (via Andy Lo A Foe

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=marc-linux-sound-94079724725307@msgid-missing \
    --to=est@hyperreal.org \
    --cc=linux-sound@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox