diff options
Diffstat (limited to 'src/devices/sound')
-rw-r--r-- | src/devices/sound/astrocde.cpp | 10 | ||||
-rw-r--r-- | src/devices/sound/astrocde.h | 4 | ||||
-rw-r--r-- | src/devices/sound/huc6230.cpp | 5 | ||||
-rw-r--r-- | src/devices/sound/huc6230.h | 2 | ||||
-rw-r--r-- | src/devices/sound/pokey.cpp | 5 | ||||
-rw-r--r-- | src/devices/sound/pokey.h | 2 |
6 files changed, 12 insertions, 16 deletions
diff --git a/src/devices/sound/astrocde.cpp b/src/devices/sound/astrocde.cpp index 8a99a9f3988..797d5920176 100644 --- a/src/devices/sound/astrocde.cpp +++ b/src/devices/sound/astrocde.cpp @@ -84,8 +84,8 @@ astrocade_io_device::astrocade_io_device(const machine_config &mconfig, const ch , m_c_count(0) , m_c_state(0) , m_si_callback(*this) - , m_so_callback{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}} - , m_pots{{*this}, {*this}, {*this}, {*this}} + , m_so_callback(*this) + , m_pots(*this) { memset(m_reg, 0, sizeof(uint8_t)*8); memset(m_bitswap, 0, sizeof(uint8_t)*256); @@ -101,10 +101,8 @@ astrocade_io_device::astrocade_io_device(const machine_config &mconfig, const ch void astrocade_io_device::device_resolve_objects() { m_si_callback.resolve_safe(0); - for (auto &cb : m_so_callback) - cb.resolve_safe(); - for (auto &pot : m_pots) - pot.resolve_safe(0); + m_so_callback.resolve_all_safe(); + m_pots.resolve_all_safe(0); } diff --git a/src/devices/sound/astrocde.h b/src/devices/sound/astrocde.h index eddde3a12bb..398a3648d3d 100644 --- a/src/devices/sound/astrocde.h +++ b/src/devices/sound/astrocde.h @@ -89,8 +89,8 @@ private: uint8_t m_bitswap[256]; /* bitswap table */ devcb_read8 m_si_callback; - devcb_write8 m_so_callback[8]; - devcb_read8 m_pots[4]; + devcb_write8::array<8> m_so_callback; + devcb_read8::array<4> m_pots; }; DECLARE_DEVICE_TYPE(ASTROCADE_IO, astrocade_io_device) diff --git a/src/devices/sound/huc6230.cpp b/src/devices/sound/huc6230.cpp index 5537f3ffea6..57e3b77ab26 100644 --- a/src/devices/sound/huc6230.cpp +++ b/src/devices/sound/huc6230.cpp @@ -147,7 +147,7 @@ huc6230_device::huc6230_device(const machine_config &mconfig, const char *tag, d , m_adpcm_freq(0) , m_pcm_lvol(0) , m_pcm_rvol(0) - , m_adpcm_update_cb{{*this}, {*this}} + , m_adpcm_update_cb(*this) , m_vca_cb(*this) { } @@ -168,8 +168,7 @@ void huc6230_device::device_add_mconfig(machine_config &config) void huc6230_device::device_start() { - for (auto &cb : m_adpcm_update_cb) - cb.resolve_safe(0); + m_adpcm_update_cb.resolve_all_safe(0); m_vca_cb.resolve_safe(); diff --git a/src/devices/sound/huc6230.h b/src/devices/sound/huc6230.h index d94c59fcb26..a8ccfcf12ae 100644 --- a/src/devices/sound/huc6230.h +++ b/src/devices/sound/huc6230.h @@ -55,7 +55,7 @@ private: TIMER_CALLBACK_MEMBER(adpcm_timer); - devcb_read8 m_adpcm_update_cb[2]; + devcb_read8::array<2> m_adpcm_update_cb; devcb_write8 m_vca_cb; }; diff --git a/src/devices/sound/pokey.cpp b/src/devices/sound/pokey.cpp index d157745fca5..43e8d6f3398 100644 --- a/src/devices/sound/pokey.cpp +++ b/src/devices/sound/pokey.cpp @@ -174,7 +174,7 @@ pokey_device::pokey_device(const machine_config &mconfig, const char *tag, devic device_state_interface(mconfig, *this), m_icount(0), m_stream(nullptr), - m_pot_r_cb{ {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this} }, + m_pot_r_cb(*this), m_allpot_r_cb(*this), m_serin_r_cb(*this), m_serout_w_cb(*this), @@ -251,8 +251,7 @@ void pokey_device::device_start() std::fill(std::begin(m_clock_cnt), std::end(m_clock_cnt), 0); std::fill(std::begin(m_POTx), std::end(m_POTx), 0); - for (devcb_read8 &cb : m_pot_r_cb) - cb.resolve(); + m_pot_r_cb.resolve_all(); m_allpot_r_cb.resolve(); m_serin_r_cb.resolve(); m_serout_w_cb.resolve_safe(); diff --git a/src/devices/sound/pokey.h b/src/devices/sound/pokey.h index 4a373b2d1f7..75a62df413f 100644 --- a/src/devices/sound/pokey.h +++ b/src/devices/sound/pokey.h @@ -278,7 +278,7 @@ private: uint32_t m_p9; /* poly9 index */ uint32_t m_p17; /* poly17 index */ - devcb_read8 m_pot_r_cb[8]; + devcb_read8::array<8> m_pot_r_cb; devcb_read8 m_allpot_r_cb; devcb_read8 m_serin_r_cb; devcb_write8 m_serout_w_cb; |