[PD] readsf~: timing of bang at outlet

IOhannes m zmölnig zmoelnig at iem.at
Tue Aug 21 17:45:03 CEST 2018


On 08/01/2018 08:12 PM, Peter P. wrote:
> Hi list,
> 
> it should be possible to have readsf~ loop without a gap by using a
> soundfile that has no discontinuities in its audio signal at the
> end/start, and whose length is a multiple of Pd's block size (64 by
> default).
> Yet I do get clicks when I try this. In a conversation with the
> helpful and great IOhannes we looked at the logic and timing of readsf~
> banging its right outlet. Can it be that it bangs one block too late in
> order to loop seemlessly?
> 
> See attached patch.
> 


attached is a small patch that might fix the problem (by sending a bang
immediately if the end-of-file has been seen and the queue is is empty)

i'm currently dizzy¹ and cannot really assess whether the change is
actually correct, so it's left as an exercise to the user.

gfmadst
IOhannes

¹ so i haven't done a PR
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fixed-detection-of-EOF-if-the-queue-contains-exactly.patch
Type: text/x-patch
Size: 820 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180821/5faf2905/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180821/5faf2905/attachment.sig>


More information about the Pd-list mailing list