Shared state between audio thread and worker thread. Uses atomic operations for lock-free communication.
| 61 | /// Shared state between audio thread and worker thread. |
| 62 | /// Uses atomic operations for lock-free communication. |
| 63 | struct SharedState { |
| 64 | /// Processing enabled flag |
| 65 | enabled: AtomicBool, |
| 66 | /// Strength value as u32 bits (for atomic f32 storage) |
| 67 | strength_bits: AtomicU32, |
| 68 | /// Model type value as u32 bits |
| 69 | model_bits: AtomicU32, |
| 70 | /// Shutdown signal for clean termination |
| 71 | shutdown: AtomicBool, |
| 72 | /// Flag indicating port values have been read from first run() call |
| 73 | initialized: AtomicBool, |
| 74 | } |
| 75 | |
| 76 | impl SharedState { |
| 77 | fn new(model_type: ModelType) -> Self { |
nothing calls this directly
no outgoing calls
no test coverage detected