Skip to content

Commit 9b1e30c

Browse files
committed
DynamicsCompressor: use Relaxed atomics for info sharing
1 parent 3fe764b commit 9b1e30c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node/dynamics_compressor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ impl DynamicsCompressorNode {
241241
}
242242

243243
pub fn reduction(&self) -> f32 {
244-
self.reduction.load(Ordering::SeqCst)
244+
self.reduction.load(Ordering::Relaxed)
245245
}
246246
}
247247

@@ -386,7 +386,7 @@ impl AudioProcessor for DynamicsCompressorRenderer {
386386
// update prev_detector_value for next block
387387
self.prev_detector_value = prev_detector_value;
388388
// update reduction shared w/ main thread
389-
self.reduction.store(reduction_gain, Ordering::SeqCst);
389+
self.reduction.store(reduction_gain, Ordering::Relaxed);
390390

391391
// store input in delay line
392392
self.ring_buffer[self.ring_index] = input;

0 commit comments

Comments
 (0)