diff --git a/src/engine/platform/sound/supervision.c b/src/engine/platform/sound/supervision.c index cba6df3ca..c042ba313 100644 --- a/src/engine/platform/sound/supervision.c +++ b/src/engine/platform/sound/supervision.c @@ -3,8 +3,6 @@ #include "supervision.h" -enum {FALSE, TRUE}; - #include #define SV_SAMPLE_RATE ((svision->UNSCALED_CLOCK)/64) @@ -71,7 +69,7 @@ void supervision_sound_stream_update(struct svision_t *svision, uint8 *stream, u chout[j] = 0; if (svision->ch[j].size != 0) { if (svision->ch[j].on || channel->count != 0) { - BOOL on = FALSE; + BOOL on = 0; switch (svision->ch[j].waveform) { case 0: // 12.5% on = svision->ch[j].pos < (28 * svision->ch[j].size) >> 5; @@ -106,7 +104,7 @@ void supervision_sound_stream_update(struct svision_t *svision, uint8 *stream, u // Transition from off to on if (channel->on) { memcpy(&svision->ch[j], channel, sizeof(svision->ch[j])); - channel->on = FALSE; + channel->on = 0; } } } @@ -160,7 +158,7 @@ void supervision_sound_stream_update(struct svision_t *svision, uint8 *stream, u } svision->m_dma.pos += svision->m_dma.step; if (svision->m_dma.pos >= svision->m_dma.size) { - svision->m_dma.on = FALSE; + svision->m_dma.on = 0; } } diff --git a/src/engine/platform/supervision.cpp b/src/engine/platform/supervision.cpp index 7fbbe34ac..d1a851d9a 100644 --- a/src/engine/platform/supervision.cpp +++ b/src/engine/platform/supervision.cpp @@ -57,12 +57,12 @@ const char** DivPlatformSupervision::getRegisterSheet() { } void DivPlatformSupervision::acquire(short** buf, size_t len) { - for (size_t h=0; h>i; - supervision_set_mute_mask(&svision,mask_bits); + int mask_bits=0; + for (int i=0; i<4; i++) + mask_bits |= isMuted[i]?0:8>>i; + supervision_set_mute_mask(&svision,mask_bits); + for (size_t h=0; h