mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-15 00:51:21 +01:00
Make many counts of tracks and channels unsigned...
... And in some places where a library uses signed types, assert that the reported number is not negative. What led me to this, is that there are many places where a size_t value for an allocation is the product of a number of channels and some other number.
This commit is contained in:
@@ -530,6 +530,7 @@ int ODPCMAliasBlockFile::ReadData(samplePtr data, sampleFormat format,
|
||||
|
||||
SFCall<sf_count_t>(sf_seek, sf.get(), mAliasStart + start, SEEK_SET);
|
||||
|
||||
wxASSERT(info.channels >= 0);
|
||||
SampleBuffer buffer(len * info.channels, floatSample);
|
||||
|
||||
int framesRead = 0;
|
||||
|
||||
@@ -117,6 +117,7 @@ int PCMAliasBlockFile::ReadData(samplePtr data, sampleFormat format,
|
||||
mSilentAliasLog=FALSE;
|
||||
|
||||
SFCall<sf_count_t>(sf_seek, sf.get(), mAliasStart + start, SEEK_SET);
|
||||
wxASSERT(info.channels >= 0);
|
||||
SampleBuffer buffer(len * info.channels, floatSample);
|
||||
|
||||
int framesRead = 0;
|
||||
|
||||
Reference in New Issue
Block a user