mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-26 07:13:49 +01:00
Assert that sampleCount doesn't narrow converting to 3d party types
This commit is contained in:
@@ -528,6 +528,9 @@ int ODPCMAliasBlockFile::ReadData(samplePtr data, sampleFormat format,
|
||||
|
||||
mSilentAliasLog=FALSE;
|
||||
|
||||
// Third party library has its own type alias, check it
|
||||
static_assert(sizeof(sampleCount::type) <= sizeof(sf_count_t),
|
||||
"Type sf_count_t is too narrow to hold a sampleCount");
|
||||
SFCall<sf_count_t>(sf_seek, sf.get(), mAliasStart + start, SEEK_SET);
|
||||
|
||||
wxASSERT(info.channels >= 0);
|
||||
|
||||
@@ -116,6 +116,9 @@ int PCMAliasBlockFile::ReadData(samplePtr data, sampleFormat format,
|
||||
}
|
||||
mSilentAliasLog=FALSE;
|
||||
|
||||
// Third party library has its own type alias, check it
|
||||
static_assert(sizeof(sampleCount::type) <= sizeof(sf_count_t),
|
||||
"Type sf_count_t is too narrow to hold a sampleCount");
|
||||
SFCall<sf_count_t>(sf_seek, sf.get(), mAliasStart + start, SEEK_SET);
|
||||
wxASSERT(info.channels >= 0);
|
||||
SampleBuffer buffer(len * info.channels, floatSample);
|
||||
|
||||
Reference in New Issue
Block a user