Initial experimental import of bq resampler
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
||||
//* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
||||
|
||||
/*
|
||||
Rubber Band Library
|
||||
@@ -32,6 +32,9 @@ class Resampler
|
||||
{
|
||||
public:
|
||||
enum Quality { Best, FastestTolerable, Fastest };
|
||||
enum Dynamism { RatioOftenChanging, RatioMostlyFixed };
|
||||
enum RatioChange { SmoothRatioChange, SuddenRatioChange };
|
||||
|
||||
enum Exception { ImplementationError };
|
||||
|
||||
struct Parameters {
|
||||
@@ -41,6 +44,22 @@ public:
|
||||
*/
|
||||
Quality quality;
|
||||
|
||||
/**
|
||||
* Performance hint indicating whether the ratio is expected
|
||||
* to change regularly or not. If not, more work may happen on
|
||||
* ratio changes to reduce work when ratio is unchanged.
|
||||
*/
|
||||
Dynamism dynamism;
|
||||
|
||||
/**
|
||||
* Hint indicating whether to smooth transitions, via filter
|
||||
* interpolation or some such method, at ratio change
|
||||
* boundaries, or whether to make a precise switch to the new
|
||||
* ratio without regard to audible artifacts. The actual
|
||||
* effect of this depends on the implementation in use.
|
||||
*/
|
||||
RatioChange ratioChange;
|
||||
|
||||
/**
|
||||
* Rate of expected input prior to resampling: may be used to
|
||||
* determine the filter bandwidth for the quality setting. If
|
||||
@@ -67,6 +86,8 @@ public:
|
||||
|
||||
Parameters() :
|
||||
quality(FastestTolerable),
|
||||
dynamism(RatioMostlyFixed),
|
||||
ratioChange(SmoothRatioChange),
|
||||
initialSampleRate(44100),
|
||||
maxBufferSize(0),
|
||||
debugLevel(0) { }
|
||||
|
||||
Reference in New Issue
Block a user