Version 4.3.1

This commit is contained in:
Gary Scavone
2009-03-24 23:02:17 -04:00
committed by Stephen Sinclair
parent 27d9b79dc7
commit d199342e86
105 changed files with 3455 additions and 12232 deletions

View File

@@ -32,7 +32,7 @@ void usage(void) {
std::cout << " where sr = sample rate,\n";
std::cout << " and rate = an optional playback rate.\n";
std::cout << " (default = 1.0, can be negative)\n\n";
exit(0);
exit( 0 );
}
// This tick() function handles sample computation only. It will be
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
if ( argc < 3 || argc > 4 ) usage();
// Set the global sample rate before creating class instances.
Stk::setSampleRate( (StkFloat) atof(argv[2]) );
Stk::setSampleRate( (StkFloat) atof( argv[2] ) );
// Initialize our WvIn and RtAudio pointers.
RtAudio dac;
@@ -72,14 +72,14 @@ int main(int argc, char *argv[])
try {
input.openFile( argv[1] );
}
catch (StkError &) {
exit(0);
catch ( StkError & ) {
exit( 1 );
}
// Set input read rate based on the default STK sample rate.
double rate = 1.0;
rate = input.getFileRate() / Stk::sampleRate();
if ( argc == 4 ) rate *= atof(argv[3]);
if ( argc == 4 ) rate *= atof( argv[3] );
input.setRate( rate );
input.ignoreSampleRateChange();