mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-25 15:53:52 +02:00
Re-fix some warnings about mixing signed and unsigned better...
... Assuming that large unsigned magnitudes with high order bit set are not the problem, but signed negatives of small magnitude may be: 1) Always cast the unsigned to signed in comparisons, not the other way. Also: 2) Cast unsigned TERM to signed by itself, before subtracting. Don't cast the result. 3) Rewrite some comparisons by moving subtracted term to other side. See commitsd2fe7b1757f463eda36c
This commit is contained in:
@@ -1869,7 +1869,7 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
|
||||
|
||||
short *mixed = (short *)mixer->GetBuffer();
|
||||
|
||||
if (blockLen < (unsigned int)inSamples) {
|
||||
if ((int)blockLen < inSamples) {
|
||||
if (channels > 1) {
|
||||
bytes = exporter.EncodeRemainder(mixed, blockLen, buffer.get());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user