mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-02 14:17:07 +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:
@@ -460,7 +460,7 @@ wxString BatchCommands::BuildCleanFileName(const wxString &fileName, const wxStr
|
||||
|
||||
bool BatchCommands::WriteMp3File( const wxString & Name, int bitrate )
|
||||
{ //check if current project is mono or stereo
|
||||
int numChannels = 2;
|
||||
unsigned numChannels = 2;
|
||||
if (IsMono()) {
|
||||
numChannels = 1;
|
||||
}
|
||||
@@ -509,7 +509,7 @@ bool BatchCommands::ApplySpecialCommand(int WXUNUSED(iCommand), const wxString &
|
||||
|
||||
AudacityProject *project = GetActiveProject();
|
||||
|
||||
int numChannels = 1; //used to switch between mono and stereo export
|
||||
unsigned numChannels = 1; //used to switch between mono and stereo export
|
||||
if (IsMono()) {
|
||||
numChannels = 1; //export in mono
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user