* Fix incorrect option parsing (-T not recognised, pitch shift mishandled)

* Fix incorrect #ifdef nesting in FFT.cpp
* Ensure pkg-config directory is created on make install if necessary
This commit is contained in:
Chris Cannam
2007-12-13 17:59:21 +00:00
parent fafcb36e97
commit 308e2ad632
3 changed files with 15 additions and 9 deletions

View File

@@ -39,7 +39,7 @@ int main(int argc, char **argv)
int c;
double ratio = 1.0;
double pitchshift = 1.0;
double pitchshift = 0.0;
double frequencyshift = 1.0;
int debug = 0;
bool realtime = false;
@@ -94,7 +94,7 @@ int main(int argc, char **argv)
{ 0, 0, 0 }
};
c = getopt_long(argc, argv, "t:p:d:RPc:f:qh", longOpts, &optionIndex);
c = getopt_long(argc, argv, "t:p:d:RPc:f:T:qh", longOpts, &optionIndex);
if (c == -1) break;
switch (c) {
@@ -266,10 +266,15 @@ int main(int argc, char **argv)
break;
}
if (pitchshift != 1.0) {
if (pitchshift != 0.0) {
frequencyshift *= pow(2.0, pitchshift / 12);
}
if (debug > 0) {
cerr << "Time ratio: " << ratio << endl;
cerr << "Frequency ratio: " << frequencyshift << endl;
}
#ifdef _WIN32
RubberBand::
#endif