diff options
Diffstat (limited to 'src/devices/sound/namco.h')
-rw-r--r-- | src/devices/sound/namco.h | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/devices/sound/namco.h b/src/devices/sound/namco.h index f032a71a536..ac37d4d4aa3 100644 --- a/src/devices/sound/namco.h +++ b/src/devices/sound/namco.h @@ -20,7 +20,7 @@ protected: static constexpr unsigned MAX_VOICES = 8; static constexpr unsigned MAX_VOLUME = 16; - /* this structure defines the parameters for a channel */ + // this structure defines the parameters for a channel struct sound_channel { uint32_t frequency; @@ -37,24 +37,23 @@ protected: namco_audio_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); // device-level overrides - virtual void device_start() override; + virtual void device_start() override ATTR_COLD; virtual void device_clock_changed() override; // internal state - void build_decoded_waveform( uint8_t *rgnbase ); void update_namco_waveform(int offset, uint8_t data); - uint32_t namco_update_one(write_stream_view &buffer, const int16_t *wave, uint32_t counter, uint32_t freq); + uint32_t namco_update_one(sound_stream &stream, int output, const int16_t *wave, uint32_t counter, uint32_t freq); - /* waveform region */ + // waveform region optional_region_ptr<uint8_t> m_wave_ptr; - /* data about the sound system */ + // data about the sound system sound_channel m_channel_list[MAX_VOICES]; sound_channel *m_last_channel; uint8_t *m_wavedata; - /* global sound parameters */ + // global sound parameters int m_wave_size; bool m_sound_enable; sound_stream *m_stream; @@ -62,15 +61,15 @@ protected: int m_sample_rate; int m_f_fracbits; - int m_voices; /* number of voices */ - bool m_stereo; /* set to indicate stereo (e.g., System 1) */ + int m_voices; // number of voices + bool m_stereo; // set to indicate stereo (e.g., System 1) std::unique_ptr<uint8_t[]> m_waveram_alloc; - /* decoded waveform table */ + // decoded waveform table std::unique_ptr<int16_t[]> m_waveform[MAX_VOLUME]; - virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override; + virtual void sound_stream_update(sound_stream &stream) override; }; class namco_device : public namco_audio_device @@ -85,9 +84,9 @@ public: protected: // device-level overrides - virtual void device_start() override; + virtual void device_start() override ATTR_COLD; - virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override; + virtual void sound_stream_update(sound_stream &stream) override; private: std::unique_ptr<uint8_t[]> m_soundregs; @@ -105,9 +104,9 @@ public: protected: // device-level overrides - virtual void device_start() override; + virtual void device_start() override ATTR_COLD; - virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override; + virtual void sound_stream_update(sound_stream &stream) override; private: std::unique_ptr<uint8_t[]> m_soundregs; @@ -119,14 +118,14 @@ class namco_cus30_device : public namco_audio_device public: namco_cus30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - void namcos1_cus30_w(offs_t offset, uint8_t data); /* wavedata + sound registers + RAM */ + void namcos1_cus30_w(offs_t offset, uint8_t data); // wavedata + sound registers + RAM uint8_t namcos1_cus30_r(offs_t offset); void namcos1_sound_w(offs_t offset, uint8_t data); void pacman_sound_w(offs_t offset, uint8_t data); protected: - virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override; + virtual void sound_stream_update(sound_stream &stream) override; }; |