fix rounding error causing .9 to actually play at .8

This commit is contained in:
Glenn Maynard
2003-04-21 07:22:18 +00:00
parent 6103cdc396
commit 6199255010
+1 -1
View File
@@ -704,7 +704,7 @@ void RageSound::SetPlaybackRate( float NewSpeed )
speed_input_samples = 1; speed_output_samples = 1;
} else {
/* Approximate it to the nearest tenth. */
speed_input_samples = int(NewSpeed * 10);
speed_input_samples = int(roundf(NewSpeed * 10));
speed_output_samples = 10;
}
}