@@ -2325,15 +2325,14 @@ def live_loop(name=nil, *args, &block)
2325
2325
2326
2326
# immediately reset for the next move
2327
2327
__system_thread_locals . set_local :sonic_pi_local_live_loop_move_to_bus_and_parent_t , nil
2328
- end
2328
+
2329
2329
if new_bus
2330
2330
moved_prom = __system_thread_locals . get :sonic_pi_local_spider_thread_moved
2331
2331
ack_prom = __system_thread_locals . get :sonic_pi_local_spider_thread_moved_ack
2332
2332
# update the context
2333
2333
# reset tracker and send old tracker with ack
2334
2334
tracker = __current_tracker
2335
2335
__system_thread_locals . set_local ( :sonic_pi_local_tracker , nil )
2336
- old_bus = __system_thread_locals . get :sonic_pi_mod_sound_synth_out_bus
2337
2336
__system_thread_locals . set ( :sonic_pi_mod_sound_synth_out_bus , new_bus )
2338
2337
__system_thread_locals . set ( :sonic_pi_mod_sound_job_group , new_group )
2339
2338
moved_prom . deliver! tracker
@@ -2350,6 +2349,7 @@ def live_loop(name=nil, *args, &block)
2350
2349
__live_loop_cue name if __system_thread_locals . get :sonic_pi_local_live_loop_auto_cue
2351
2350
res = send ( ll_name , res )
2352
2351
end
2352
+ end
2353
2353
end
2354
2354
end
2355
2355
@@ -2379,7 +2379,7 @@ def live_loop(name=nil, *args, &block)
2379
2379
_b , _g , t , p = __system_thread_locals ( st ) . get ( :sonic_pi_local_live_loop_move_to_bus_and_parent_t )
2380
2380
if p
2381
2381
## another live loop already registered a move, but didn't manage to swap in time - so we're going to clobber it
2382
- p . deliver! :clobbered
2382
+ p . deliver! :clobbered , false
2383
2383
end
2384
2384
__system_thread_locals ( st ) . set_local :sonic_pi_local_live_loop_auto_cue , auto_cue if st
2385
2385
## register our move
@@ -2391,7 +2391,7 @@ def live_loop(name=nil, *args, &block)
2391
2391
ct2 = Thread . new do
2392
2392
__system_thread_locals . set_local :sonic_pi_local_thread_group , "ll ct2 join waiter for #{ name } #{ st . object_id } #{ __system_thread_locals ( st ) . get ( :sonic_pi_local_thread_group ) } "
2393
2393
st . join
2394
- completed_prom . deliver! :joined
2394
+ completed_prom . deliver! :joined , false
2395
2395
end
2396
2396
2397
2397
moved_or_clobbered = completed_prom . get
@@ -2419,7 +2419,8 @@ def live_loop(name=nil, *args, &block)
2419
2419
end
2420
2420
move_holding_thread_prom . deliver! true
2421
2421
end
2422
-
2422
+ tracker = new_thread_moved_prom . get
2423
+ tracker . get
2423
2424
move_holding_thread_prom . get
2424
2425
end
2425
2426
end
0 commit comments