lanczos-resampler 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -109,8 +109,8 @@ const resampler = new ChunkedResampler(44100, 48000);
|
|
|
109
109
|
const input = new Float32Array(1024);
|
|
110
110
|
input.fill(0.1);
|
|
111
111
|
const output = new Float32Array(resampler.maxNumOutputFrames(input.length));
|
|
112
|
-
const
|
|
113
|
-
assert.equal(input.length,
|
|
112
|
+
const { numRead, numWritten } = resampler.resample(input, output);
|
|
113
|
+
assert.equal(input.length, numRead);
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
#### Resampling the whole audio track
|
|
@@ -123,8 +123,8 @@ input.fill(0.1);
|
|
|
123
123
|
const outputLen = numOutputFrames(1024, 44100, 48000);
|
|
124
124
|
const output = new Float32Array(outputLen);
|
|
125
125
|
const resampler = new WholeResampler();
|
|
126
|
-
const
|
|
127
|
-
assert.equal(input.length,
|
|
126
|
+
const { numRead, numWritten } = resampler.resampleInto(input, output);
|
|
127
|
+
assert.equal(input.length, numRead);
|
|
128
128
|
console.log(output)
|
|
129
129
|
```
|
|
130
130
|
|