From 7214ae7d7850719c638a018a2d38f1b78c84c44a Mon Sep 17 00:00:00 2001 From: Stuart Longland Date: Sun, 9 Apr 2017 10:17:09 +1000 Subject: [PATCH] synth: Make enable/mute bits volatile. Otherwise the optimiser doesn't bother to re-check them. --- synth.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synth.h b/synth.h index f01598b..c3c37d2 100644 --- a/synth.h +++ b/synth.h @@ -55,14 +55,14 @@ struct poly_synth_t { * Note no bounds checking is done, if you have only defined 4 * channels, then only set bits 0-3, don't set bits 4 onwards here. */ - uintptr_t enable; + volatile uintptr_t enable; /*! * Bit-field muting given voices. This allows for selective adding * of voices to the overall output. If a field is 1, then that voice * channel is not included. (Note, disabled channels are *also* * not included.) */ - uintptr_t mute; + volatile uintptr_t mute; }; /*!