diff options
Diffstat (limited to 'src/mame/audio/pleiads.h')
-rw-r--r-- | src/mame/audio/pleiads.h | 61 |
1 files changed, 58 insertions, 3 deletions
diff --git a/src/mame/audio/pleiads.h b/src/mame/audio/pleiads.h index eea76d9d66a..460727b9ef4 100644 --- a/src/mame/audio/pleiads.h +++ b/src/mame/audio/pleiads.h @@ -2,6 +2,61 @@ WRITE8_DEVICE_HANDLER( pleiads_sound_control_a_w ); WRITE8_DEVICE_HANDLER( pleiads_sound_control_b_w ); WRITE8_DEVICE_HANDLER( pleiads_sound_control_c_w ); -DECLARE_LEGACY_SOUND_DEVICE(PLEIADS, pleiads_sound); -DECLARE_LEGACY_SOUND_DEVICE(NAUGHTYB, naughtyb_sound); -DECLARE_LEGACY_SOUND_DEVICE(POPFLAME, popflame_sound); +class pleiads_sound_device : public device_t, + public device_sound_interface +{ +public: + pleiads_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + pleiads_sound_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock); + ~pleiads_sound_device() { global_free(m_token); } + + // access to legacy token + void *token() const { assert(m_token != NULL); return m_token; } +protected: + // device-level overrides + virtual void device_config_complete(); + virtual void device_start(); + + // sound stream update overrides + virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); +private: + // internal state + void *m_token; +}; + +extern const device_type PLEIADS; + +class naughtyb_sound_device : public pleiads_sound_device +{ +public: + naughtyb_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); +protected: + // device-level overrides + virtual void device_config_complete(); + virtual void device_start(); + + // sound stream update overrides + virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); +private: + // internal state +}; + +extern const device_type NAUGHTYB; + +class popflame_sound_device : public pleiads_sound_device +{ +public: + popflame_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); +protected: + // device-level overrides + virtual void device_config_complete(); + virtual void device_start(); + + // sound stream update overrides + virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); +private: + // internal state +}; + +extern const device_type POPFLAME; + |