Skip to content

Commit

Permalink
Add a preference so people can turn off pitch rates if they want.
Browse files Browse the repository at this point in the history
  • Loading branch information
xwidghet committed Sep 9, 2016
1 parent 8d9d23a commit 7526783
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/RageSoundReader_PitchChange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
#include "RageSoundReader_SpeedChange.h"
#include "RageSoundReader_Resample_Good.h"
#include "RageLog.h"
#include "Preference.h"

Preference<bool> EnablePitchRates("EnablePitchRates", true);
RageSoundReader_PitchChange::RageSoundReader_PitchChange( RageSoundReader *pSource ):
RageSoundReader_Filter( NULL )
{
Expand Down Expand Up @@ -88,7 +90,8 @@ bool RageSoundReader_PitchChange::SetProperty( const RString &sProperty, float f
/* HACK: Put rate functions back together,
this needs to be refactored. */
SetSpeedRatio( fValue );
SetPitchRatio( fValue );
if(EnablePitchRates.Get())
SetPitchRatio( fValue );
return true;
}

Expand Down

0 comments on commit 7526783

Please sign in to comment.