Re: [linux-audio-dev] Re: Realtime restrictions when running multiple audio apps .. Was: Re: disksampler ...

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Re: Realtime restrictions when running multiple audio apps .. Was: Re: disksampler ...
From: David Olofson (david_AT_gardena.net)
Date: Thu Jul 20 2000 - 02:38:12 EEST


On Wed, 19 Jul 2000, Kai Vehmanen wrote:
[...]
> > I know it is much easier to implement a simple MP3 player using single
> > threading like this:
> [....]
> > while(1) {
> > read() MP3 frame from disk
> > decode_MP3_frame();
> > write() audio fragment to disk
> > }
> [...]
> > rather than doing with two separate threads, one for audio and one
> > for disk IO. (audio having higher priority than disk)

[...]
> want to do. Instead of changing the above code, I'd probably reimplement
> read() and write() to be multithreaded/non-blocking (this is what I've
> done in ecasound).

This can only work reliably if you extend the read()/write() API with
guaranteed bandwidth features and a prepare() operation, so that
something outside your application can do the necessary buffering.
OTOH, you'll need to centralize disk access anyway to deal with more
than one stream per HD efficiently, so the more complex API will
probably pay off in more complex applications. (I assume that's the
idea.)

//David

.- M u C o S --------------------------------. .- David Olofson ------.
| A Free/Open Multimedia | | Audio Hacker |
| Plugin and Integration Standard | | Linux Advocate |
`------------> http://www.linuxdj.com/mucos -' | Open Source Advocate |
.- A u d i a l i t y ------------------------. | Singer |
| Rock Solid Low Latency Signal Processing | | Songwriter |
`---> http://www.angelfire.com/or/audiality -' `-> david_AT_linuxdj.com -'


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Jul 20 2000 - 03:31:56 EEST