Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 753 - Sort Tracks by Name may misbehave with stereo tracks.
Sort Tracks by Name may misbehave with stereo tracks.
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Application Core
2.0.6
Per OS All
: P4 RepeatableAll
Assigned To: Default Assignee for New Bugs
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-23 14:08 UTC by Paul L
Modified: 2018-08-20 11:45 UTC (History)
6 users (show)

See Also:
Steps To Reproduce:
Make three audio tracks in a new project. Rename them, top to bottom, as A, C, and B. Choose "Make stereo track" from A's menu. Generate some noise or other sound in B. Choose Tracks, Sort Tracks, by Name. Track B becomes the right channel of the stereo track, and track C becomes a separate mono track!
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00
petersampsonaudacity: Test‑OK‑Mac+


Attachments
First of two possible fixes. (974 bytes, application/octet-stream)
2014-08-23 14:08 UTC, Paul L
Details
Second possible fix. It may make sense to take both patches. (1.29 KB, application/octet-stream)
2014-08-23 14:10 UTC, Paul L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul L 2014-08-23 14:08:48 UTC
Created attachment 505 [details]
First of two possible fixes.

I have written two different fixes for this.  It might be desirable to take
both.

The first fix renames the right channel track at the time tracks are linked to
form a stereo track, instead of postponing that renaming until such time as the
tracks are split again.

An incorrect comment in the code said the old name is preserved.  Was that the
intention or not?  Should there be no renaming at all?  If none, then the other
patch should be taken for this bug.
Comment 1 Paul L 2014-08-23 14:10:47 UTC
Created attachment 506 [details]
Second possible fix.  It may make sense to take both patches.

This other way of fixing the bug corrects the sorting routine so that it does not make the hidden assumption that linked tracks always have the same name.  Instead, the second track of a linked pair is ignored when determining where the insertion sort inserts.
Comment 2 Gale Andrews 2014-08-24 16:55:47 UTC
(In reply to comment #1)
> Second possible fix. [...] the second track of a linked pair is ignored when
> determining where the insertion sort inserts.
Personally I prefer the second fix (but I have not tried either).

In any case I strongly oppose the renaming of the right channel as done in the current code :=) See http://audacity.238276.n2.nabble.com/Channel-Naming-WAS-Re-Record-a-subset-of-Channels-preset-Channel-Names-td7556956.html .
Comment 4 Peter Sampson 2017-08-15 06:28:12 UTC
(In reply to James Crook from comment #3)
Testing on macOS Sierra 10.12.6 db97fea 15Aug

Testing using the steps:  the A-C created stero track remains as is - and the B track remains as a mono track.

Looks to be fixed ok on Mac
Comment 5 James Crook 2017-08-15 08:07:25 UTC
RESOLVED FIXED 
per comment 4.