mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-29 15:19:44 +02:00
Reapply a3afdf80d00c68dddba6aa66829ac296891bf2d4
Author: Paul Licameli <paul.licameli@audacityteam.org> Date: Tue Nov 13 08:36:22 2018 -0500 lib-src/libnyquist: fix warning about always-false comparison... ... but this raises questions about the intention to catch negative values, which if they ever happened, were just mis-cast to unsigned at call sites
This commit is contained in:
parent
19494d6277
commit
1f27ad932c
@ -72,12 +72,15 @@ void Delay :: setMaximumDelay(unsigned long delay)
|
||||
{
|
||||
if ( delay < inputs_.size() ) return;
|
||||
|
||||
/*
|
||||
if ( delay < 0 ) {
|
||||
errorString_ << "Delay::setMaximumDelay: argument (" << delay << ") less than zero!\n";
|
||||
handleError( StkError::WARNING );
|
||||
return;
|
||||
}
|
||||
else if (delay < delay_ ) {
|
||||
else
|
||||
*/
|
||||
if (delay < delay_ ) {
|
||||
errorString_ << "Delay::setMaximumDelay: argument (" << delay << ") less than current delay setting (" << delay_ << ")!\n";
|
||||
handleError( StkError::WARNING );
|
||||
return;
|
||||
@ -97,6 +100,7 @@ void Delay :: setDelay(unsigned long delay)
|
||||
if ( outPoint_ == inputs_.size() ) outPoint_ = 0;
|
||||
delay_ = inputs_.size() - 1;
|
||||
}
|
||||
/*
|
||||
else if ( delay < 0 ) {
|
||||
errorString_ << "Delay::setDelay: argument (" << delay << ") less than zero ... setting to zero!\n";
|
||||
handleError( StkError::WARNING );
|
||||
@ -104,6 +108,7 @@ void Delay :: setDelay(unsigned long delay)
|
||||
outPoint_ = inPoint_;
|
||||
delay_ = 0;
|
||||
}
|
||||
*/
|
||||
else { // read chases write
|
||||
if ( inPoint_ >= delay ) outPoint_ = inPoint_ - delay;
|
||||
else outPoint_ = inputs_.size() + inPoint_ - delay;
|
||||
|
Loading…
x
Reference in New Issue
Block a user