@@ -382,7 +382,7 @@ impl AudioBackendManager for CpalBackend {
382
382
}
383
383
384
384
fn output_latency ( & self ) -> f64 {
385
- self . output_latency . load ( Ordering :: SeqCst )
385
+ self . output_latency . load ( Ordering :: Relaxed )
386
386
}
387
387
388
388
fn sink_id ( & self ) -> & str {
@@ -471,7 +471,7 @@ fn spawn_output_stream(
471
471
config,
472
472
move |d : & mut [ f32 ] , i : & OutputCallbackInfo | {
473
473
render. render ( d) ;
474
- output_latency. store ( latency_in_seconds ( i) , Ordering :: SeqCst ) ;
474
+ output_latency. store ( latency_in_seconds ( i) , Ordering :: Relaxed ) ;
475
475
} ,
476
476
err_fn,
477
477
None ,
@@ -480,7 +480,7 @@ fn spawn_output_stream(
480
480
config,
481
481
move |d : & mut [ f64 ] , i : & OutputCallbackInfo | {
482
482
render. render ( d) ;
483
- output_latency. store ( latency_in_seconds ( i) , Ordering :: SeqCst ) ;
483
+ output_latency. store ( latency_in_seconds ( i) , Ordering :: Relaxed ) ;
484
484
} ,
485
485
err_fn,
486
486
None ,
@@ -489,7 +489,7 @@ fn spawn_output_stream(
489
489
config,
490
490
move |d : & mut [ u8 ] , i : & OutputCallbackInfo | {
491
491
render. render ( d) ;
492
- output_latency. store ( latency_in_seconds ( i) , Ordering :: SeqCst ) ;
492
+ output_latency. store ( latency_in_seconds ( i) , Ordering :: Relaxed ) ;
493
493
} ,
494
494
err_fn,
495
495
None ,
@@ -498,7 +498,7 @@ fn spawn_output_stream(
498
498
config,
499
499
move |d : & mut [ u16 ] , i : & OutputCallbackInfo | {
500
500
render. render ( d) ;
501
- output_latency. store ( latency_in_seconds ( i) , Ordering :: SeqCst ) ;
501
+ output_latency. store ( latency_in_seconds ( i) , Ordering :: Relaxed ) ;
502
502
} ,
503
503
err_fn,
504
504
None ,
@@ -507,7 +507,7 @@ fn spawn_output_stream(
507
507
config,
508
508
move |d : & mut [ u32 ] , i : & OutputCallbackInfo | {
509
509
render. render ( d) ;
510
- output_latency. store ( latency_in_seconds ( i) , Ordering :: SeqCst ) ;
510
+ output_latency. store ( latency_in_seconds ( i) , Ordering :: Relaxed ) ;
511
511
} ,
512
512
err_fn,
513
513
None ,
@@ -516,7 +516,7 @@ fn spawn_output_stream(
516
516
config,
517
517
move |d : & mut [ u64 ] , i : & OutputCallbackInfo | {
518
518
render. render ( d) ;
519
- output_latency. store ( latency_in_seconds ( i) , Ordering :: SeqCst ) ;
519
+ output_latency. store ( latency_in_seconds ( i) , Ordering :: Relaxed ) ;
520
520
} ,
521
521
err_fn,
522
522
None ,
@@ -525,7 +525,7 @@ fn spawn_output_stream(
525
525
config,
526
526
move |d : & mut [ i8 ] , i : & OutputCallbackInfo | {
527
527
render. render ( d) ;
528
- output_latency. store ( latency_in_seconds ( i) , Ordering :: SeqCst ) ;
528
+ output_latency. store ( latency_in_seconds ( i) , Ordering :: Relaxed ) ;
529
529
} ,
530
530
err_fn,
531
531
None ,
@@ -534,7 +534,7 @@ fn spawn_output_stream(
534
534
config,
535
535
move |d : & mut [ i16 ] , i : & OutputCallbackInfo | {
536
536
render. render ( d) ;
537
- output_latency. store ( latency_in_seconds ( i) , Ordering :: SeqCst ) ;
537
+ output_latency. store ( latency_in_seconds ( i) , Ordering :: Relaxed ) ;
538
538
} ,
539
539
err_fn,
540
540
None ,
@@ -543,7 +543,7 @@ fn spawn_output_stream(
543
543
config,
544
544
move |d : & mut [ i32 ] , i : & OutputCallbackInfo | {
545
545
render. render ( d) ;
546
- output_latency. store ( latency_in_seconds ( i) , Ordering :: SeqCst ) ;
546
+ output_latency. store ( latency_in_seconds ( i) , Ordering :: Relaxed ) ;
547
547
} ,
548
548
err_fn,
549
549
None ,
@@ -552,7 +552,7 @@ fn spawn_output_stream(
552
552
config,
553
553
move |d : & mut [ i64 ] , i : & OutputCallbackInfo | {
554
554
render. render ( d) ;
555
- output_latency. store ( latency_in_seconds ( i) , Ordering :: SeqCst ) ;
555
+ output_latency. store ( latency_in_seconds ( i) , Ordering :: Relaxed ) ;
556
556
} ,
557
557
err_fn,
558
558
None ,
0 commit comments