Mercurial > hg > may
changeset 407:381d73f34964 resample
Comment
author | Chris Cannam |
---|---|
date | Fri, 27 Sep 2013 14:36:34 +0100 |
parents | b84718e7d3b1 |
children | 1184df2a65a5 |
files | src/may/stream/resample.yeti |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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