1 // license:GPL-2.0+
2 // copyright-holders:Peter Trauner
3 /*****************************************************************************
4  *
5  * includes/vc4000.h
6  *
7  ****************************************************************************/
8 
9 #ifndef MAME_AUDIO_VC4000_H
10 #define MAME_AUDIO_VC4000_H
11 
12 #pragma once
13 
14 //**************************************************************************
15 //  TYPE DEFINITIONS
16 //**************************************************************************
17 
18 // ======================> vc4000_sound_device
19 
20 class vc4000_sound_device : public device_t, public device_sound_interface
21 {
22 public:
23 	vc4000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~vc4000_sound_device()24 	~vc4000_sound_device() { }
25 
26 protected:
27 	// device-level overrides
28 	virtual void device_start() override;
29 
30 	// sound stream update overrides
31 	virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
32 
33 public:
34 	void soundport_w(int mode, int data);
35 
36 private:
37 	sound_stream *m_channel;
38 	uint8_t m_reg[1];
39 	int m_size;
40 	int m_pos;
41 	unsigned m_level;
42 };
43 
44 DECLARE_DEVICE_TYPE(VC4000_SND, vc4000_sound_device)
45 
46 #endif // MAME_AUDIO_VC4000_H
47