1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-08 14:13:57 +01:00

Assert that sampleCount doesn't narrow converting to 3d party types

This commit is contained in:
Paul Licameli
2016-08-29 08:50:11 -04:00
parent 26b5e77050
commit 99dca62cff
4 changed files with 15 additions and 1 deletions

View File

@@ -306,11 +306,15 @@ bool EffectSBSMS::Process()
outResampleCB = resampleCB;
rb.offset = start;
rb.end = end;
// Third party library has its own type alias, check it
static_assert(sizeof(sampleCount::type) <=
sizeof(_sbsms_::SampleCountType),
"Type _sbsms_::SampleCountType is too narrow to hold a sampleCount");
rb.iface = std::make_unique<SBSMSInterfaceSliding>(&rateSlide,&pitchSlide,
bPitchReferenceInput,
samplesToProcess,0,
nullptr);
} else {
rb.bPitch = false;