Skip to content

Commit 0d6c6f2

Browse files
authored
Merge pull request #109 from ddf/upsampler-fix
fix for UpSampler::process
2 parents e6b800a + ef207e6 commit 0d6c6f2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

LibSource/Resample.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,10 @@ class UpSampler : public SignalProcessor {
102102
ASSERT(input.getSize()*factor==output.getSize(), "wrong size");
103103
float* p = output;
104104
output.clear();
105-
for(size_t i=0; i<input.getSize(); i+= factor)
106-
*p++ = input[i];
105+
for (size_t i = 0; i < input.getSize(); ++i) {
106+
*p = input[i];
107+
p += factor;
108+
}
107109
filter->process(output, output);
108110
}
109111
};

0 commit comments

Comments
 (0)