# HG changeset patch # User Chris Cannam # Date 1380288994 -3600 # Node ID 381d73f34964758459c947698470fc750727e1c2 # Parent b84718e7d3b1bad6561a55f9e17ce5835c7bfb2f Comment diff -r b84718e7d3b1 -r 381d73f34964 src/may/stream/resample.yeti --- a/src/may/stream/resample.yeti Fri Sep 27 14:36:13 2013 +0100 +++ b/src/may/stream/resample.yeti Fri Sep 27 14:36:34 2013 +0100 @@ -43,6 +43,10 @@ Known n: manip.withDuration (int (n * factor)); _: id; esac; + +//!!!doc: Resampled streams only have accurate duration when their inputs +// have known duration (otherwise they may be rounded up to the +// processing block size). interpolated factor s = //!!! factor must be an integer [how to enforce this??] if factor == 1 then s @@ -60,6 +64,10 @@ out with { get sampleRate () = s.sampleRate * factor }; fi; +//!!!doc: Resampled streams only have accurate duration when their inputs +// have known duration (otherwise they may be rounded up to the +// processing block size). + decimated factor s = //!!! factor must be an integer [how to enforce this??] if factor == 1 then s else