Minor tidy

This commit is contained in:
Chris Cannam
2024-06-13 13:16:34 +01:00
parent da9c586745
commit b4b11d451f
3 changed files with 24 additions and 40 deletions

View File

@@ -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;
}
}