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

Audacity Bugzilla



Bug 2022 - Mixer Board does not automatically update when tracks added or removed
Mixer Board does not automatically update when tracks added or removed
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: User Interface
2.3.1
Per OS Linux
: P4 Repeatable
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-29 16:32 UTC by Steve Daulton
Modified: 2018-11-21 13:32 UTC (History)
5 users (show)

See Also:
Steps To Reproduce:
1)Launch Audacity and resize so to leave space for the mixer board alongside. 2) Add an audio track 3) Open the mixer board and position to the side of the main window so that both are visible. 4) Add some more tracks. Note that the mixer board does not show the new tracks.
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed:
stevethefiddle: Regression+
james.k.crook: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Daulton 2018-10-29 16:32:30 UTC
When the mixer board is open, if tracks are added or removed from the tracks window, the mixer board does not update until the mixer board window is resized.

Tested on Linux, debug build.
Comment 1 James Crook 2018-10-30 14:55:21 UTC
Works on windows.
Comment 2 Paul L 2018-10-30 18:05:10 UTC
I don't see the symptom on macOS either.

In this function:

void TrackList::AdditionEvent(TrackNodePointer node)
{
   // wxWidgets will own the event object
   QueueEvent( safenew TrackListEvent{ EVT_TRACKLIST_ADDITION, *node.first } );
}


If you replace it with:

void TrackList::AdditionEvent(TrackNodePointer node)
{
   // wxWidgets will own the event object
   TrackListEvent e{ EVT_TRACKLIST_ADDITION, *node.first };
   ProcessEvent( e  );
}

Does it improve?  But I have reasons not to trust that version.  What about this alternative:

void TrackList::AdditionEvent(TrackNodePointer node)
{
   wxTheApp->CallAfter( [=]{
      // wxWidgets will own the event object
      TrackListEvent e{ EVT_TRACKLIST_ADDITION, *node.first };
      ProcessEvent( e  );
   } );
}
Comment 3 Steve Daulton 2018-10-30 21:04:39 UTC
(In reply to Paul L from comment #2)
> void TrackList::AdditionEvent(TrackNodePointer node)
> {
>    // wxWidgets will own the event object
>    TrackListEvent e{ EVT_TRACKLIST_ADDITION, *node.first };
>    ProcessEvent( e  );
> }
> 
> Does it improve?  But I have reasons not to trust that version.

No different,



> What about this alternative:
> 
> void TrackList::AdditionEvent(TrackNodePointer node)
> {
>    wxTheApp->CallAfter( [=]{
>       // wxWidgets will own the event object
>       TrackListEvent e{ EVT_TRACKLIST_ADDITION, *node.first };
>       ProcessEvent( e  );
>    } );
> }

That crashes on opening mixer board.
Comment 4 Paul L 2018-10-30 21:14:32 UTC
Which commit did you build?

I am very disappointed to hear about this Linux-only bug.

MixerBoard caused a lot of code pollution, requiring "push" notifications from too many other places in the code.  I did some cleanup by making MixerBoard listen for events instead.  It Binds to the TrackList which emits events when the set of tracks changes or when other track data change.  This is very desirable to make MixerBoard code more decoupled from the core, perhaps to spin it off as a plug-in in future.

The wxWidgets event propagation works as advertised on Windows and Mac -- why not Linux?

If you press mute or solo buttons or move pan or gain sliders in Track Panel -- does that fail to update MixerBoard too and is that a regression on 2.3.0?

When you add or remove a track, do you also fail to hit a breakpoint in TrackPanel::OnTrackListResizing?
Comment 5 Steve Daulton 2018-10-30 21:42:56 UTC
(In reply to Paul L from comment #4)
My current build is 4f964c359b6471019fd052abb83d1810d431a512
I first noticed the problem on 29th Oct.

Mute, Solo, Gain and Pan are all echoed from tracks to mixer board and vice verse, but only for the tracks that are visible in the mixer board. Even when using these controls, the number of tracks shown in the mixer board is not updated.

I have a release build from Oct 9th and the mixer board is working properly in that version.

Tool Tips for the Gain and Pan sliders are still unreadable (just a black line), but that's an older problem.

If I add a break point at TrackPanel::OnTrackListResizing it gets hit when adding tracks, but not on removing tracks.
Comment 6 Paul L 2018-10-30 21:55:39 UTC
(In reply to Steve Daulton from comment #5)

The rest seems as expected.

When tracks are deleted, TrackPanel::OnTrackListDeletion should be hit instead.

Now I wonder if the problem is that wxEvent::Skip() isn't doing what it's supposed to do?  Because the problem happens only when TrackList and MixerBoard listen for the same object, and the system is wrongly considering the event as finally handled by TrackPanel despite the Skips?

Here's another one:  if you have tracks of two different names, and drag to rearrange them, does that update MixerBoard correctly?  (Because this is a different event type for permutation of tracks, which TrackPanel wholly ignores.)
Comment 7 Steve Daulton 2018-10-30 22:14:04 UTC
(In reply to Paul L from comment #6)
> if you have tracks of two different names, and drag to rearrange them,
>  does that update MixerBoard correctly?

only for the tracks that are visible in the mixer board.
The ONLY way that I've found to update which tracks are shown in the mixer board is to resize the mixer board. Specifically, the mixer board must be resized HORIZONTALLY so the the available space in the mixer board gets close to a vertical edge of a "track strip".
Comment 8 Steve Daulton 2018-10-31 06:41:33 UTC
Fix made at https://github.com/audacity/audacity/commit/6e75ff2
Comment 9 Peter Sampson 2018-11-07 08:30:43 UTC
Testing on W10 with audacity-2.3.1-alpha-207-4c76e598d5859dc172e063d37287cc510fa7850f

The newly added tracks are now added correctly to the already open Mixer Toolbar.

Mixer Board also updates correctly when tracks are deleted from the project window.
Comment 10 Peter Sampson 2018-11-10 05:59:51 UTC
Testing on macOS19,14,1 with Steve's 2.3.1-alpha build of 09Nov18

The newly added tracks are now added correctly to the already open Mixer Toolbar.

Mixer Board also updates correctly when tracks are deleted from the project window.
Comment 11 Peter Sampson 2018-11-21 13:32:42 UTC
Tested on Cliff's 64-bit Mac build and ths works fine there too

The newly added tracks are now added correctly to the already open Mixer Toolbar.

Mixer Board also updates correctly when tracks are deleted from the project window.