1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-07 23:15:36 +01:00

Bug2086: Mixer board behavior...

... and also fixed analogous mistakes in some effects (Vamp, SoundTouch, and
SBSMS effects), found by review of all uses of TrackList::Channels.

The first member of the pair of iterators returned by TrackList::Channels
does not necessarily deference to a null pointer when it is incremented to
the end of the range.
This commit is contained in:
Paul Licameli
2019-03-29 11:05:01 -04:00
parent fc14d031e4
commit 2de696b461
4 changed files with 17 additions and 8 deletions

View File

@@ -122,7 +122,10 @@ bool EffectSoundTouch::ProcessWithTimeWarper(const TimeWarper &warper)
// TODO: more-than-two-channels
auto channels = TrackList::Channels(leftTrack);
if (auto rightTrack = * ++ channels.begin()) {
auto rightTrack = (channels.size() > 1)
? * ++ channels.first
: nullptr;
if ( rightTrack ) {
double t;
//Adjust bounds by the right tracks markers