Minor tidy
This commit is contained in:
@@ -34,6 +34,7 @@ using std::cout;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using std::min;
|
||||
using std::string;
|
||||
|
||||
#ifdef RB_PLUGIN_LADSPA
|
||||
|
||||
@@ -356,18 +357,18 @@ RubberBandPitchShifter::instantiate(const LV2_Descriptor *desc, double rate,
|
||||
const char *, const LV2_Feature *const *)
|
||||
{
|
||||
if (rate < 1.0) {
|
||||
std::cerr << "RubberBandPitchShifter::instantiate: invalid sample rate "
|
||||
<< rate << " provided" << std::endl;
|
||||
cerr << "RubberBandPitchShifter::instantiate: invalid sample rate "
|
||||
<< rate << " provided" << endl;
|
||||
return nullptr;
|
||||
}
|
||||
size_t srate = size_t(round(rate));
|
||||
if (std::string(desc->URI) == lv2DescriptorMono.URI) {
|
||||
if (string(desc->URI) == lv2DescriptorMono.URI) {
|
||||
return new RubberBandPitchShifter(srate, 1);
|
||||
} else if (std::string(desc->URI) == lv2DescriptorStereo.URI) {
|
||||
} else if (string(desc->URI) == lv2DescriptorStereo.URI) {
|
||||
return new RubberBandPitchShifter(srate, 2);
|
||||
} else {
|
||||
std::cerr << "RubberBandPitchShifter::instantiate: unrecognised URI "
|
||||
<< desc->URI << " requested" << std::endl;
|
||||
cerr << "RubberBandPitchShifter::instantiate: unrecognised URI "
|
||||
<< desc->URI << " requested" << endl;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user