Patches item #3585461, was opened at 2012-11-08 13:09 Message generated for change (Comment added) made by millerpuckette You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3585461...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata Group: None
Status: Pending Resolution: Accepted
Priority: 5 Private: No Submitted By: IOhannes m zmölnig (zmoelnig) Assigned to: Miller Puckette (millerpuckette) Summary: [readsf~] loops some files
Initial Comment: some wav-files get looped when played back via [readsf~].
it seems that the problem is dues to the soundfile fitting exactly into the fifobuffer, thus the EOF (signalled by the read-thread) drain never really starts in the perform routine. (fifohead==fifosize, so the test for (!x_eof && x_fifohead >= x_fifotail && x_fifohead < x_fifotail + wantbytes-1) never triggers, resulting in a continuous drain of the entire buffer.
the attached soundfile triggers this behaviour.
----------------------------------------------------------------------
Comment By: Miller Puckette (millerpuckette)
Date: 2012-12-15 14:38
Message: applied for 0.44
----------------------------------------------------------------------
Comment By: IOhannes m zmölnig (zmoelnig) Date: 2012-11-08 13:11
Message: attached is a simplistic attempt to fix the problem: if the fifohead==fifosize, we wrap it to 0 even if we just read the last byte. (originally this was only done if !EOF)
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3585461...