discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] More on latency


From: Nick Foster
Subject: Re: [Discuss-gnuradio] More on latency
Date: Thu, 21 Oct 2010 10:46:50 -0700

On Thu, 2010-10-21 at 13:11 -0400, Marcus D. Leech wrote:
> On 10/21/2010 11:41 AM, Eric Blossom wrote:
> >
> > Yes, that would cause it.  I've seen it with the FM receiver apps.
> >   
> Any hint about how to "cure" this problem?  I'm perfectly willing to
> have the audio sink drop samples
>   from time to time in order to prevent/dramatically-reduce buffer creep.
> 
> How do Linux audio apps deal with this in "digital recording studio"
> cases?  Where they may have audio inputs/outputs
>   from/to different cards, with unsynchronized clocks, etc?

The cure is to provide a resampling block inside the sink, and to
dynamically set its fractional rate based on the buffer consumption of
the sink. This is on my todo list for the JACK sink. I'm starting with
the JACK sink because the JACK API is the only one that provides
detailed info on buffer state. It's possible that ALSA also provides
useful information; it's hard to say because of the incomprehensibility
of the ALSA API. I haven't looked that hard.

I'm not sure that most digital recording studio applications have the
capability of reading from one audio card and writing directly to
another. If they do, they must have some way of resampling data to match
sample rates.

> I have *another* GNURadio app, which uses an audio input and an audio
> output, on different cards.  It has been running for
>   several days,  and the latency is roughly 1sec.  The machine it is
> running on is a Pentium D dual-core, at 2.4/3.2GHz.  Probably
>   30% more "ooomph" than the D-510 that is running the other app.
> 
> Btw, I started the app on the D-510 and let it run overnight.  The
> latency this morning is roughly the same as it was last night
>   when I started it--about 1 to 1.5second.  So, I wonder what the
> condition is that causes buffer creep to become really large?

Hard to say. It could be that on that machine the audio card's clock is
very close to what it's "supposed" to be; e.g., its 44100Hz is really
44100Hz.

> 
> 
> > BTW, it would have been useful to tell us that there was an audio sink
> > in the graph when you first posted the observation.
> >
> >   
> Actually, in the first instance, a few days ago, I did.  It was an
> oversight in this most recent post series. Sorry.
> 
> 
> > Thanks,
> > Eric
> >
> >
> >   
> 
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]