Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/core/src/SoundTouch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ describe('SoundTouch', () => {
});

describe('runtime interpolation strategy controls', () => {
it('defaults to the only strategy registered out of the box', () => {
expect(new SoundTouch().interpolationStrategy).toBe('lanczos');
});

it('switches interpolation strategy through SoundTouch API', () => {
const st = new SoundTouch({ interpolationStrategy: 'lanczos' });

Expand Down
7 changes: 6 additions & 1 deletion packages/core/src/SoundTouch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ export interface SoundTouchOptions {
/**
* Interpolation strategy used by the rate transposer stage.
*
* @defaultValue 'linear'
* @remarks
* Only `lanczos` is registered out of the box. Every other id — including
* `linear` — comes from an `@soundtouchjs/interpolation-strategy-*` package
* and must be registered before it can be named here, or construction throws.
*
* @defaultValue 'lanczos'
*/
interpolationStrategy?: RateTransposerInterpolationStrategy;

Expand Down