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

Audacity Bugzilla



Bug 1746 - Play does not stop at end of selection if Note track present.
Play does not stop at end of selection if Note track present.
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: MIDI
unspecified
Per OS All
: P3 Repeatable
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-08 05:42 UTC by Steve Daulton
Modified: 2018-08-27 06:18 UTC (History)
6 users (show)

See Also:
Steps To Reproduce:
1) Import a MIDI track into a project. 2) Select a region within the Note track (length unimportant) 3) Start playback and allow to play to the end of the selection. When the end of the selection is reached, the play position cursor stops moving, but Audacity is still in "play mode". The play button is still down, and most commands are disabled.
Release Note:
GROUP: MIDI * Play mode remains active when the end of a selection is reached if the project contains a Note track. This will cause many commands to be disabled until playback is manually stopped. '''Workaround''': If a project has one or more Note tracks, stop playback manually (spacebar or Stop button), to return to normal "stop" condition.
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00
stevethefiddle: Regression+
petersampsonaudacity: Test‑OK‑Win+
billwh: Test‑OK‑Mac+
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 2017-09-08 05:42:52 UTC
Playback does not return to "stopped mode" at end of selection if project has a Note track.

If the end of the selection is during a note that has an infinitely sustaining sound, then that note (or notes) continue playing until pressing space or clicking the stop button.

This happens even with an empty Note track.
Comment 1 Peter Sampson 2017-09-08 06:34:49 UTC
Fails on macOS Sierra and W10 too - so marked all

On my machines the playback stops at the end of the selection but Audacity is left in Play mode not Stop mode - so editing can be performed on the selection.

Same happens when using Timeline Quickplay too
Comment 2 Poke 2017-09-08 23:03:29 UTC
According to git bisect, this first started happening with 75bdde3003 ("To synch better, just don't use a separate thread for MIDI!").
Comment 3 Poke 2017-09-08 23:37:50 UTC
Looks like what's happening is that the callback returns 'paComplete' and stops being called, which means that FillMidiBuffers() stops being called and thus the check for mMidiOutputComplete never happens.
Comment 4 Paul L 2017-09-20 14:15:50 UTC
Thanks for the diagnosis, Poke.

Fixed at:

https://github.com/audacity/audacity/commit/02403c1237700282426ddd8b6aa384e09c52923b
Comment 5 Peter Sampson 2017-09-27 12:22:51 UTC
Testing on W10 audacity-win-4a0fbf8-2.2.0-beta-26Sep17
and on macOS Sierra 10.12.6 4a0fbf8 27Sep17

Tests ok on both pay platforms
a) Play stops properly
2) Play buttom pops up ok after selection is played
3) edits are available and can be performed (e.g. cut the selection)

Works ok with single Note track or a selection made in multiple Note tracks

Looks to be fixed ok
Comment 6 Bill Wharrie 2017-10-07 10:38:54 UTC
Since the code to fix this is apparently not OS-specific, I'm closing this.