lanczos-resampler 0.1.0 → 0.1.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 CHANGED
@@ -116,11 +116,11 @@ assert.equal(input.length, numProcessed);
116
116
  #### Resampling the whole audio track
117
117
 
118
118
  ```javascript
119
- import { WholeResampler, outputLength } as lanczos from 'lanczos-resampler';
119
+ import { WholeResampler, numOutputFrames } as lanczos from 'lanczos-resampler';
120
120
 
121
121
  const input = new Float32Array(1024);
122
122
  input.fill(0.1);
123
- const outputLen = outputLength(1024, 44100, 48000);
123
+ const outputLen = numOutputFrames(1024, 44100, 48000);
124
124
  const output = new Float32Array(outputLen);
125
125
  const resampler = new WholeResampler();
126
126
  const numProcessed = resampler.resampleInto(input, output);
@@ -131,9 +131,9 @@ console.log(output)
131
131
 
132
132
  ## Documentation
133
133
 
134
- Rust: <https://docs.rs/lanczos-resampler>
134
+ Rust: <https://docs.rs/lanczos-resampler/latest/lanczos_resampler/>
135
135
 
136
- JS: <https://igankevich.github.com/lanczos-resampler>
136
+ JS: <https://igankevich.github.io/lanczos-resampler>
137
137
 
138
138
 
139
139
  ## No-std support
@@ -7,7 +7,7 @@ export class ChunkedInterleavedResampler {
7
7
  /**
8
8
  * Get maximum output chunk length given the input chunk length.
9
9
  *
10
- * Returns the same value as {@link outputLength} plus one.
10
+ * Returns the same value as {@link numOutputFrames} plus one.
11
11
  * This additional sample is used to compensate for unevenly divisible sample rates.
12
12
  *
13
13
  * You should consider updating buffer size every time you change output sample rate via
@@ -76,7 +76,7 @@ export class ChunkedResampler {
76
76
  /**
77
77
  * Get maximum output chunk length given the input chunk length.
78
78
  *
79
- * Returns the same value as {@link outputLength} plus one.
79
+ * Returns the same value as {@link numOutputFrames} plus one.
80
80
  * This additional sample is used to compensate for unevenly divisible sample rates.
81
81
  *
82
82
  * You should consider updating buffer size every time you change output sample rate via
@@ -149,7 +149,7 @@ export class WholeResampler {
149
149
  * #### Panics
150
150
  *
151
151
  * Panics when the output isn't large enough to hold all the resampled points.
152
- * Use {@link outputLength} to ensure that the buffer size is sufficient.
152
+ * Use {@link numOutputFrames} to ensure that the buffer size is sufficient.
153
153
  */
154
154
  resampleInto(input: Float32Array, output: Float32Array): number;
155
155
  /**
@@ -162,7 +162,7 @@ export class WholeResampler {
162
162
  * #### Panics
163
163
  *
164
164
  * - Panics when the output isn't large enough to hold all the resampled points.
165
- * Use {@link outputLength} to ensure that the buffer size is sufficient.
165
+ * Use {@link numOutputFrames} to ensure that the buffer size is sufficient.
166
166
  * - Panics when either the input or the output length isn't evenly divisible by the number of
167
167
  * channels.
168
168
  * @param input - input frames
@@ -150,7 +150,7 @@ export class ChunkedInterleavedResampler {
150
150
  /**
151
151
  * Get maximum output chunk length given the input chunk length.
152
152
  *
153
- * Returns the same value as {@link outputLength} plus one.
153
+ * Returns the same value as {@link numOutputFrames} plus one.
154
154
  * This additional sample is used to compensate for unevenly divisible sample rates.
155
155
  *
156
156
  * You should consider updating buffer size every time you change output sample rate via
@@ -272,7 +272,7 @@ export class ChunkedResampler {
272
272
  /**
273
273
  * Get maximum output chunk length given the input chunk length.
274
274
  *
275
- * Returns the same value as {@link outputLength} plus one.
275
+ * Returns the same value as {@link numOutputFrames} plus one.
276
276
  * This additional sample is used to compensate for unevenly divisible sample rates.
277
277
  *
278
278
  * You should consider updating buffer size every time you change output sample rate via
@@ -382,7 +382,7 @@ export class WholeResampler {
382
382
  * #### Panics
383
383
  *
384
384
  * Panics when the output isn't large enough to hold all the resampled points.
385
- * Use {@link outputLength} to ensure that the buffer size is sufficient.
385
+ * Use {@link numOutputFrames} to ensure that the buffer size is sufficient.
386
386
  * @param {Float32Array} input
387
387
  * @param {Float32Array} output
388
388
  * @returns {number}
@@ -407,7 +407,7 @@ export class WholeResampler {
407
407
  * #### Panics
408
408
  *
409
409
  * - Panics when the output isn't large enough to hold all the resampled points.
410
- * Use {@link outputLength} to ensure that the buffer size is sufficient.
410
+ * Use {@link numOutputFrames} to ensure that the buffer size is sufficient.
411
411
  * - Panics when either the input or the output length isn't evenly divisible by the number of
412
412
  * channels.
413
413
  * @param {Float32Array} input - input frames
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "lanczos-resampler",
3
3
  "type": "module",
4
4
  "description": "Audio resampler for Rust/JS that uses Lanczos filter.",
5
- "version": "0.1.0",
5
+ "version": "0.1.1",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",