1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-18 17:10:55 +02:00

Fix crash when mix-and-rendering a single, panned, mono track because we have m,ono input and stereo output. Name should be an attribute of a track object whih is singular, regardless of number of channels!

This commit is contained in:
richardash1981 2011-08-29 10:16:11 +00:00
parent a33ef8ef9b
commit e7397b9f23

View File

@ -134,8 +134,12 @@ bool MixAndRender(TrackList *tracks, TrackFactory *trackFactory,
} }
else { else {
mixRight = trackFactory->NewWaveTrack(format, rate); mixRight = trackFactory->NewWaveTrack(format, rate);
if (oneinput) if (oneinput) {
mixLeft->SetName(usefulIter.First()->GetLink()->GetName()); /* set name to match input track's right channel!*/ if (usefulIter.First()->GetLink() != NULL) // we have linked track
mixLeft->SetName(usefulIter.First()->GetLink()->GetName()); /* set name to match input track's right channel!*/
else
mixLeft->SetName(usefulIter.First()->GetName()); /* set name to that of sole input channel */
}
else else
mixRight->SetName(_("Mix")); mixRight->SetName(_("Mix"));
mixLeft->SetChannel(Track::LeftChannel); mixLeft->SetChannel(Track::LeftChannel);