summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/audio/dai_snd.h
diff options
context:
space:
mode:
author Fabio Priuli <etabeta78@users.noreply.github.com>2014-10-11 15:49:56 +0000
committer Fabio Priuli <etabeta78@users.noreply.github.com>2014-10-11 15:49:56 +0000
commitb9ba2fc331cf0c1909659afa2b5e93d9cc34ad91 (patch)
treedebdfe0bf60b076aa0c07caf5ba06887217087a2 /src/mess/audio/dai_snd.h
parentb67e8155b68e3f6346d4419960dca7a274ac298d (diff)
given to another couple of sound devices their own include. nw.
Diffstat (limited to 'src/mess/audio/dai_snd.h')
-rw-r--r--src/mess/audio/dai_snd.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/mess/audio/dai_snd.h b/src/mess/audio/dai_snd.h
new file mode 100644
index 00000000000..65d32185297
--- /dev/null
+++ b/src/mess/audio/dai_snd.h
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ *
+ * dai_snd.h
+ *
+ ****************************************************************************/
+
+#ifndef DAI_SND_H_
+#define DAI_SND_H_
+
+#include "emu.h"
+
+// ======================> dai_sound_device
+
+class dai_sound_device : public device_t,
+ public device_sound_interface
+{
+public:
+ // construction/destruction
+ dai_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+ DECLARE_WRITE_LINE_MEMBER(set_input_ch0);
+ DECLARE_WRITE_LINE_MEMBER(set_input_ch1);
+ DECLARE_WRITE_LINE_MEMBER(set_input_ch2);
+ DECLARE_WRITE8_MEMBER(set_volume);
+
+protected:
+ // device-level overrides
+ virtual void device_start();
+ virtual void device_reset();
+ virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
+
+private:
+ sound_stream * m_mixer_channel;
+ int m_dai_input[3];
+ UINT8 m_osc_volume[3];
+ UINT8 m_noise_volume;
+
+ static const UINT16 s_osc_volume_table[];
+ static const UINT16 s_noise_volume_table[];
+};
+
+extern const device_type DAI_SOUND;
+
+#endif /* DAI_H_ */