View Issue Details

IDProjectCategoryView StatusLast Update
0009458ardourbugspublic2023-10-02 20:27
Reporterdom2 Assigned Topaul  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNUOSLinuxOS Version(any)
Product Version7.5 
Summary0009458: Monitoring a tracks input causes loop while playing to unset
DescriptionThis bug can be viewed by the following steps:

1. Create a new session
2. Add a new audio track
3. Turn on "Monitor input" for that audio track
4. Set a loop range
5. Start playing the session
6. Click on the loop button

I would expect that this would activate the loop range and start looping playback, but instead it flashes the loop range briefly and then continues without the loop.

This seems to be occurring when the butler thread handles a PostTransportStop multiple times on the loop triggering, resulting in the "loop_changing" flag being unset and then unsetting the loop. I have a patch that fixes it for me by moving the unsetting of the "loop_changing" flag latter into the processing, but I'm not familiar enough with the event/threading architecture to be sure this is a safe solution.
TagsNo tags attached.

Activities

dom2

2023-09-26 01:45

reporter  

loop_fix.patch (850 bytes)   
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 681dfb7a8c..8cc638d304 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -1524,9 +1524,6 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished, bool will_
 		}
 	}
 
-	/* reset loop_changing so it does not affect next transport action */
-	loop_changing = false;
-
 	if (!will_locate && !_transport_fsm->declicking_for_locate()) {
 
 		DEBUG_TRACE (DEBUG::Transport, X_("Butler PTW: locate\n"));
@@ -1548,6 +1545,9 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished, bool will_
 		}
 	}
 
+	/* reset loop_changing so it does not affect next transport action */
+	loop_changing = false;
+
 	have_looped = false;
 
 	/* don't bother with this stuff if we're disconnected from the engine,
loop_fix.patch (850 bytes)   

paul

2023-09-28 23:44

administrator   ~0028122

Excellent detective work! Thanks very much. Committed as 243f40e10daa

paul

2023-10-02 20:15

administrator   ~0028131

hey @dom2 ... let me know the name you'd like me to include in the contributors list.

dom2

2023-10-02 20:27

reporter   ~0028132

name is Dominik Martinez, also got the patch for 0009452 :)

Issue History

Date Modified Username Field Change
2023-09-26 01:45 dom2 New Issue
2023-09-26 01:45 dom2 File Added: loop_fix.patch
2023-09-28 23:44 paul Assigned To => paul
2023-09-28 23:44 paul Status new => resolved
2023-09-28 23:44 paul Resolution open => fixed
2023-09-28 23:44 paul Note Added: 0028122
2023-10-02 20:15 paul Note Added: 0028131
2023-10-02 20:27 dom2 Note Added: 0028132