diff --git a/source/SoundStretch/RunParameters.cpp b/source/SoundStretch/RunParameters.cpp index 495478f..537e140 100644 --- a/source/SoundStretch/RunParameters.cpp +++ b/source/SoundStretch/RunParameters.cpp @@ -199,7 +199,7 @@ void RunParameters::throwLicense() const ST_THROW_RT_ERROR(licenseText); } -float RunParameters::parseSwitchValue(const STRING& str) const +double RunParameters::parseSwitchValue(const STRING& str) const { int pos; @@ -211,7 +211,7 @@ float RunParameters::parseSwitchValue(const STRING& str) const } // Read numerical parameter value after '=' - return (float)stof(str.substr(pos + 1).c_str()); + return stof(str.substr(pos + 1).c_str()); } diff --git a/source/SoundStretch/RunParameters.h b/source/SoundStretch/RunParameters.h index 2db36b4..f57364c 100644 --- a/source/SoundStretch/RunParameters.h +++ b/source/SoundStretch/RunParameters.h @@ -48,17 +48,17 @@ private: void throwLicense() const; void parseSwitchParam(const STRING& str); void checkLimits(); - float parseSwitchValue(const STRING& tr) const; + double parseSwitchValue(const STRING& tr) const; public: STRING inFileName; STRING outFileName; - float tempoDelta{ 0 }; - float pitchDelta{ 0 }; - float rateDelta{ 0 }; + double tempoDelta{ 0 }; + double pitchDelta{ 0 }; + double rateDelta{ 0 }; int quick{ 0 }; int noAntiAlias{ 0 }; - float goalBPM{ 0 }; + double goalBPM{ 0 }; bool detectBPM{ false }; bool speech{ false }; diff --git a/source/SoundStretch/main.cpp b/source/SoundStretch/main.cpp index 59d49e8..641fe10 100644 --- a/source/SoundStretch/main.cpp +++ b/source/SoundStretch/main.cpp @@ -145,9 +145,9 @@ static void setup(SoundTouch& soundTouch, const WavInFile& inFile, const RunPara #endif // print processing information only if outFileName given i.e. some processing will happen fprintf(stderr, "Processing the file with the following changes:\n"); - fprintf(stderr, " tempo change = %+g %%\n", params.tempoDelta); - fprintf(stderr, " pitch change = %+g semitones\n", params.pitchDelta); - fprintf(stderr, " rate change = %+g %%\n\n", params.rateDelta); + fprintf(stderr, " tempo change = %+lg %%\n", params.tempoDelta); + fprintf(stderr, " pitch change = %+lg semitones\n", params.pitchDelta); + fprintf(stderr, " rate change = %+lg %%\n\n", params.rateDelta); fprintf(stderr, "Working..."); } else @@ -240,7 +240,7 @@ static void detectBPM(WavInFile& inFile, RunParameters& params) if (bpmValue > 0) { - fprintf(stderr, "Detected BPM rate %.1f\n\n", bpmValue); + fprintf(stderr, "Detected BPM rate %.1lf\n\n", bpmValue); } else { @@ -252,7 +252,7 @@ static void detectBPM(WavInFile& inFile, RunParameters& params) { // adjust tempo to given bpm params.tempoDelta = (params.goalBPM / bpmValue - 1.0f) * 100.0f; - fprintf(stderr, "The file will be converted to %.1f BPM\n\n", params.goalBPM); + fprintf(stderr, "The file will be converted to %.1lf BPM\n\n", params.goalBPM); } }