1 // license:GPL-2.0+
2 // copyright-holders:Juergen Buchmueller, Frank Palazzolo, Sean Riddle
3 /*****************************************************************************
4  *
5  * audio/channelf.h
6  *
7  ****************************************************************************/
8 
9 #ifndef MAME_AUDIO_CHANNELF_H
10 #define MAME_AUDIO_CHANNELF_H
11 
12 class channelf_sound_device : public device_t, public device_sound_interface
13 {
14 public:
15 	channelf_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
16 
17 	void sound_w(int mode);
18 protected:
19 	// device-level overrides
20 	virtual void device_start() override;
21 
22 	// sound stream update overrides
23 	virtual void sound_stream_update(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs) override;
24 private:
25 	// internal state
26 	sound_stream *m_channel;
27 	int m_sound_mode;
28 	int m_incr;
29 	float m_decay_mult;
30 	int m_envelope;
31 	uint32_t m_sample_counter;
32 	int m_forced_ontime;           //  added for improved sound
33 	int m_min_ontime;              //  added for improved sound
34 
35 };
36 
37 DECLARE_DEVICE_TYPE(CHANNELF_SOUND, channelf_sound_device)
38 
39 #endif // MAME_AUDIO_CHANNELF_H
40