[hpsdr] buffer over/underflow (was Mercury sampling rate)

Chris Stratton cs11102 at yahoo.com
Mon Apr 14 12:01:29 PDT 2008


VE3NEA wrote:

>So, when you have to throw away one block, because
you 
>are in a condition of buffer overflow, 
>you throw away more than two elements of the incoming
CW 
>signal. Not nice.

Flawed assumption.  You do not have to throw away a
whole block.  Keep all of your receive processing
slaved to the clock of the data source.  Then, when
sending output to the soundcard, do one of two things:

1) If you are overflowing, tell the sound card you are
giving it a receiver that is a sample or two shorter
than the processing buffer actually was, discarding
just that sample or two.

2) If you are underflowing, tell the soundcard you are
giving it a slightly larger buffer and repeate a few
samples at the end.  

Presumably, for the transmit path you should do the
opposite - finagle the buffer sizes when you get data
from the soundcard, and keep the processing
synchronous to the sample clock at the RF output.


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



More information about the Hpsdr mailing list