diff --git a/packages/core/src/SoundTouch.spec.ts b/packages/core/src/SoundTouch.spec.ts index f86068e..cf58a4e 100644 --- a/packages/core/src/SoundTouch.spec.ts +++ b/packages/core/src/SoundTouch.spec.ts @@ -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' }); diff --git a/packages/core/src/SoundTouch.ts b/packages/core/src/SoundTouch.ts index 92a1c57..e85d560 100644 --- a/packages/core/src/SoundTouch.ts +++ b/packages/core/src/SoundTouch.ts @@ -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;