bug 172: hack to fix sbsms inverted pitch ratio and sampling rate issues
This commit is contained in:
parent
b0683e96f5
commit
2a81f349b9
|
@ -223,7 +223,8 @@ bool EffectSBSMS::Process()
|
|||
|
||||
// SBSMS has a fixed sample rate - we just convert to its sample rate and then convert back
|
||||
float srIn = leftTrack->GetRate();
|
||||
float srSBSMS = 44100.0;
|
||||
// mchinen: srSBMS doesn't do the right thing when it was set to fixed 44100. This seems to fix it.
|
||||
float srSBSMS = leftTrack->GetRate();
|
||||
|
||||
// the resampler needs a callback to supply its samples
|
||||
resampleBuf rb;
|
||||
|
|
|
@ -105,12 +105,14 @@ bool EffectTimeScale::TransferParameters( Shuttle & shuttle )
|
|||
|
||||
inline double PercentChangeToRatio(double percentChange)
|
||||
{
|
||||
return 1.0 + percentChange / 100.0;
|
||||
//mchinen hack: invert the ratio so it works with the sbsms bug.
|
||||
return 1.0/(1.0 + percentChange / 100.0);
|
||||
}
|
||||
|
||||
inline double HalfStepsToPercentChange(double halfSteps)
|
||||
{
|
||||
return 100.0 * (pow(2.0,halfSteps/12.0) - 1.0);
|
||||
//mchinen hack: invert the ratio so it works with the sbsms bug.
|
||||
return 1.0/(100.0 * (pow(2.0,halfSteps/12.0) - 1.0));
|
||||
}
|
||||
|
||||
inline double PercentChangeToHalfSteps(double percentChange)
|
||||
|
|
Loading…
Reference in New Issue