diff options
| author | 2025-07-31 14:10:25 +0200 | |
|---|---|---|
| committer | 2025-07-31 14:10:25 +0200 | |
| commit | 70ccc4f51c482d1bb6fc3d7e12fea95501c00afc (patch) | |
| tree | 7fde8c4a3b0273569b67e93542bbea0fc65ecbaf | |
| parent | b0f99e0f089cd1d0fbe3faaa887024f57095fdd6 (diff) | |
k054539: update stream before writes
| -rw-r--r-- | src/devices/sound/k054539.cpp | 8 | ||||
| -rw-r--r-- | src/devices/sound/k054539.h | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/devices/sound/k054539.cpp b/src/devices/sound/k054539.cpp index d4042e1131c..21d591c555f 100644 --- a/src/devices/sound/k054539.cpp +++ b/src/devices/sound/k054539.cpp @@ -81,6 +81,9 @@ void k054539_device::init_flags(int _flags) void k054539_device::set_gain(int channel, double _gain) { + if (started()) + stream->update(); + if(_gain >= 0) gain[channel] = _gain; } @@ -340,6 +343,8 @@ void k054539_device::init_chip() void k054539_device::write(offs_t offset, u8 data) { + stream->update(); + if(0) { int voice, reg; @@ -486,12 +491,15 @@ u8 k054539_device::read(offs_t offset) return res; } else return 0; + case 0x22c: break; + default: LOG("K054539 read %03x\n", offset); break; } + return regs[offset]; } diff --git a/src/devices/sound/k054539.h b/src/devices/sound/k054539.h index 9e3ba6aa5f1..18ff8c7a633 100644 --- a/src/devices/sound/k054539.h +++ b/src/devices/sound/k054539.h @@ -98,9 +98,9 @@ private: channel channels[8]; sound_stream *stream; - emu_timer *m_timer; - uint32_t m_timer_state; - devcb_write_line m_timer_handler; + emu_timer *m_timer; + uint32_t m_timer_state; + devcb_write_line m_timer_handler; apan_delegate m_apan_cb; bool regupdate(); |
