From f453201fa149d3e2a85f0b466b1c67c6c90d54e0 Mon Sep 17 00:00:00 2001 From: Dwedit Date: Fri, 30 Mar 2018 22:35:35 -0500 Subject: Add support for Audio/Video Disable flags Add support for Hard Disable Audio Fix frame discarding causing infinite loops Fix MSVC building --- source/apu_blargg.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/apu_blargg.c') diff --git a/source/apu_blargg.c b/source/apu_blargg.c index 49f5491..2976580 100644 --- a/source/apu_blargg.c +++ b/source/apu_blargg.c @@ -761,7 +761,8 @@ V(V9_V6_V3,2) -> V(V9,2) V(V6,3) V(V3,4) */ static void dsp_run( int32_t clocks_remain ) { int32_t phase; - + if (Settings.HardDisableAudio) + return; phase = dsp_m.phase; dsp_m.phase = (phase + clocks_remain) & 31; @@ -3259,6 +3260,11 @@ static int8_t const reg_times_ [256] = 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, }; +void S9xSetSoundMute(bool mute) +{ + Settings.Mute = mute; +} + bool S9xInitAPU() { int32_t i; -- cgit v1.2.3