diff options
Diffstat (limited to 'src/devices/sound/okim6295.h')
-rw-r--r-- | src/devices/sound/okim6295.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/devices/sound/okim6295.h b/src/devices/sound/okim6295.h index 0e836c29ad9..4d372a8a47c 100644 --- a/src/devices/sound/okim6295.h +++ b/src/devices/sound/okim6295.h @@ -14,6 +14,7 @@ #pragma once #include "sound/okiadpcm.h" +#include "dirom.h" //************************************************************************** // TYPE DEFINITIONS @@ -24,7 +25,7 @@ class okim6295_device : public device_t, public device_sound_interface, - public device_rom_interface + public device_rom_interface<18> { public: enum pin7_state @@ -59,24 +60,24 @@ protected: virtual void device_clock_changed() override; // device_sound_interface overrides - virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override; + virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override; // device_rom_interface overrides - virtual void rom_bank_updated() override; + virtual void rom_bank_pre_change() override; // a single voice class okim_voice { public: okim_voice(); - void generate_adpcm(device_rom_interface &rom, stream_sample_t *buffer, int samples); + void generate_adpcm(device_rom_interface &rom, write_stream_view &buffer); - oki_adpcm_state m_adpcm; // current ADPCM state + oki_adpcm_state m_adpcm; // current ADPCM state bool m_playing; - offs_t m_base_offset; // pointer to the base memory location - uint32_t m_sample; // current sample number - uint32_t m_count; // total samples to play - int8_t m_volume; // output volume + offs_t m_base_offset; // pointer to the base memory location + uint32_t m_sample; // current sample number + uint32_t m_count; // total samples to play + stream_buffer::sample_t m_volume; // output volume }; // configuration state @@ -85,12 +86,12 @@ protected: // internal state static constexpr int OKIM6295_VOICES = 4; - okim_voice m_voice[OKIM6295_VOICES]; + okim_voice m_voice[OKIM6295_VOICES]; int32_t m_command; - sound_stream * m_stream; + sound_stream * m_stream; uint8_t m_pin7_state; - static const uint8_t s_volume_table[16]; + static const stream_buffer::sample_t s_volume_table[16]; }; |