diff options
author | 2020-12-28 18:48:14 +0100 | |
---|---|---|
committer | 2020-12-28 18:48:14 +0100 | |
commit | 33ae3be81cda81b581142299ffd123421a872cf7 (patch) | |
tree | bdc588797194e07fd111f3ef11bbfdd58ce47e5a | |
parent | 2cd35edee299c4743c3f944dac120a5fc86b7208 (diff) |
gaelco_gae1_device: fix channels init, fixes random crashes and possibly audio issues in surf planet
-rw-r--r-- | src/devices/sound/gaelco.cpp | 5 | ||||
-rw-r--r-- | src/devices/sound/gaelco.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/devices/sound/gaelco.cpp b/src/devices/sound/gaelco.cpp index 7da4ab16f76..31d294ee948 100644 --- a/src/devices/sound/gaelco.cpp +++ b/src/devices/sound/gaelco.cpp @@ -265,6 +265,11 @@ void gaelco_gae1_device::device_start() wavraw = util::wav_open("gae1_snd.wav", rate, 2); } +void gaelco_gae1_device::device_reset() +{ + for (int ch = 0; ch < NUM_CHANNELS; ch++) + m_channel[ch].active = 0; +} void gaelco_gae1_device::device_stop() { diff --git a/src/devices/sound/gaelco.h b/src/devices/sound/gaelco.h index a598c64345d..76a77c0bb40 100644 --- a/src/devices/sound/gaelco.h +++ b/src/devices/sound/gaelco.h @@ -38,6 +38,7 @@ protected: // device-level overrides virtual void device_start() override; + virtual void device_reset() override; virtual void device_stop() override; virtual void device_post_load() override; virtual void device_clock_changed() override; |