lkml.org 
[lkml]   [1999]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: real-time threaded IO with low latency (audio)
David Olofson wrote:

> Ove Ewerlid wrote:
> >
> > David Olofson wrote:
> > >
> > > ... about linux ability to perform flanging ...
> > >
> > > No, Linux doesn't stand a chance here. RTLinux OTOH, is designed for it.
> >
> > Linux as it is can perfectly handle flanging at a one sample delay!
> > If you have flanging with intersignal delays in the range from 1 sample
> > to 1024 samples the overall delay must be at least 1024 samples to be
> > able to
> > implement flanging (adding the signal to itself with a variable delay).
>
> Well, actually my answer wasn't really focused on flanging... Because of
> the delay issue, I agree that flanging is a bad example. (Not MY idea!
> ;-)
>
> What about simulating an RC filter? can be done one sample at a time,
> using a single variable (C) per channel... In that case, the
> input->output delay depends only on the hardware and the scheduling.
> THAT's low latency processing! :-) (If it's practically useful is
> another matter...)

Lets say I want to put a full duplex speakerphone facility on my desktop. I
need a small echo cancellor for the line, and a large acoustic one. I need to
keep the pipeline through the machine down to a a couple of 8kHz samples. If I
make the delay much greater I won't properly comply with Telco regulations, and
the line echo problem will just get worse. Cancelling the echoes and
continuously estimating the echoes takes a lot of CPU power, and even on a
500MHz machine the acoustic cancellor will only be a compromise one. This is
certainly a genuinely useful real world example of low delay audio processing.
The only way I have managed to reliably solve this kind of problem on a
dedicated DSP chip is by putting the echo cancellors inside the interrupt
service routines, and letting the chip spend almost all its time in interrupt
service. If you want really low delay audio I think you will always have to use
that type of strategy.

Real time OS's don't help much if you want _really_ low latency. I spent years
developing low delay DSP, and was never able to use an OS of any kind. The
delay through a good quality flanger (or for that matter, almost any audio
effect) for the unmanipulated component of the sound should be just a couple of
samples. Anything greater will alter the effect when the sound in the room is a
combination of the processed and unprocessed paths. You only get such low
delays by very tailored solutions.

Audio effects on general purpose computers will always be a compromise. How
large a compromise would you like, Sir?

Steve



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.121 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site