File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -376,6 +376,9 @@ impl Plugin for Gain {
376376 let mut current_beat: f64 = context. transport ( ) . pos_beats ( ) . unwrap ( ) ;
377377
378378 if * self . alt_sync . lock ( ) {
379+ // This is scaled a little more to catch things earlier due to thread timing in Ardour
380+ // This should still play well with other DAWs using this timing
381+ current_beat = ( ( current_beat + 0.036 ) * 100.0 as f64 ) . round ( ) / 100.0 as f64 ;
379382 let current_bar = current_beat as i64 ;
380383 // Tracks based off beat number for other daws - this is a mutex instead of atomic for locking
381384 if * self . alt_sync_beat . lock ( ) != current_bar {
@@ -385,7 +388,7 @@ impl Plugin for Gain {
385388 }
386389 } else {
387390 // Works in FL Studio but not other daws, hence the previous couple of lines
388- current_beat = ( current_beat * 1000 .0 as f64 ) . round ( ) / 1000 .0 as f64 ;
391+ current_beat = ( current_beat * 10000 .0 as f64 ) . round ( ) / 10000 .0 as f64 ;
389392 if current_beat % 1.0 == 0.0 {
390393 // Reset our index to the sample vecdeques
391394 self . in_place_index = Arc :: new ( AtomicI32 :: new ( 0 ) ) ;
You can’t perform that action at this time.
0 commit comments