aboutsummaryrefslogtreecommitdiffhomepage
path: root/applause.lua
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2016-07-18 15:15:47 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2016-07-18 15:15:47 +0200
commit7e3608fe8b0a8e42fa303375cab0d60ede95c81e (patch)
tree7b1bddfbe0bf49946505553475a96485ccc543fb /applause.lua
parent7a9077315a799ca0d750c67685337964318ffd48 (diff)
downloadapplause2-7e3608fe8b0a8e42fa303375cab0d60ede95c81e.tar.gz
fixed Stream:resample()
Diffstat (limited to 'applause.lua')
-rw-r--r--applause.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/applause.lua b/applause.lua
index f43c0d3..e257fb2 100644
--- a/applause.lua
+++ b/applause.lua
@@ -340,7 +340,7 @@ end
-- This is a linear resampler thanks to the
-- semantics of IndexStream
function Stream:resample(factor)
- return self[iota(math.floor(self:len() * factor)):div(factor)]
+ return self[line(1, math.floor(self:len() / factor), self:len())]
end
--