Bill:
Let me translate. In the ring buffer resets/restarts, you could always
modify only one of them with an offset.
ringb_float_reset (top.jack.ring.i.l);
ringb_float_reset (top.jack.ring.i.r);
are the two lines in Audio Callback that are relevant.
The next line would be something like
if (offset < 0) for(i=0;i<offset;i++)
ringb_float_write(top.jack.ring.i.l, &zero,1);
else for(i=0;i<offset;i++) ringb_float_write(top.jack.ring.r.l, &zero,1);
I think this handles all cases, including offset = 0. just inside the
beginning of this scope float zero = 0.0;
Bob
Frank Brickle wrote:
Bill Tracey wrote:
OK -- I'll take a look at adding support for handling +/- 1 sample
offset in the DttSP audio callbacks...
FB. Not sure how you want to handle this, and I'm absolutely certain you
don't need to be reminded of it, but there should surely be some
mechanism for reinitialization of the delay memory on arbitrary resets.
Perhaps you could handle this ziplessly by pre-performing dummy write(s)
into the appropriate ringbuffers where required. That's a way of
handling arbitrarily-long delays without having to explicitly allocate
delay memories for them.
Also +1 isn't necessary, ever. The delay of 1 sample (delay of -1) is a
causal linear filter. +1 corresponds to having ESP about what data will
happen in the future and is accordingly nondeterministic and nonlinear.
No need to make more trouble yourself than you have to :-)
73
Frank
AB2KT
_______________________________________________
FlexRadio mailing list
[email protected]
http://mail.flex-radio.biz/mailman/listinfo/flexradio_flex-radio.biz
Archive Link: http://mail.flex-radio.biz/pipermail/flexradio_flex-radio.biz/
FlexRadio Homepage: http://www.flex-radio.com
--
AMSAT VP Engineering. Member: ARRL, AMSAT-DL, TAPR, Packrats,
NJQRP/AMQRP, QRP ARCI, QCWA, FRC. ARRL SDR Wrk Grp Chairman
Laziness is the number one inspiration for ingenuity. Guilty as charged!