summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/audio
diff options
context:
space:
mode:
Diffstat (limited to 'src/mess/audio')
-rw-r--r--src/mess/audio/dai_snd.c (renamed from src/mess/audio/dai.c)4
-rw-r--r--src/mess/audio/dai_snd.h44
-rw-r--r--src/mess/audio/specimx_snd.c (renamed from src/mess/audio/special.c)6
-rw-r--r--src/mess/audio/specimx_snd.h37
4 files changed, 86 insertions, 5 deletions
diff --git a/src/mess/audio/dai.c b/src/mess/audio/dai_snd.c
index a4a7ae6454e..a1876b12256 100644
--- a/src/mess/audio/dai.c
+++ b/src/mess/audio/dai_snd.c
@@ -1,6 +1,6 @@
/***************************************************************************
- audio/dai.c
+ audio/dai_snd.c
Functions to emulate sound hardware of DAI Personal Computer
@@ -9,7 +9,7 @@
****************************************************************************/
#include "emu.h"
-#include "includes/dai.h"
+#include "dai_snd.h"
// device type definition
const device_type DAI_SOUND = &device_creator<dai_sound_device>;
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_ */
diff --git a/src/mess/audio/special.c b/src/mess/audio/specimx_snd.c
index e2fabca2451..4b9063064a8 100644
--- a/src/mess/audio/special.c
+++ b/src/mess/audio/specimx_snd.c
@@ -7,11 +7,11 @@
****************************************************************************/
-#include "includes/special.h"
+#include "specimx_snd.h"
// device type definition
-const device_type SPECIMX = &device_creator<specimx_sound_device>;
+const device_type SPECIMX_SND = &device_creator<specimx_sound_device>;
//**************************************************************************
@@ -23,7 +23,7 @@ const device_type SPECIMX = &device_creator<specimx_sound_device>;
//-------------------------------------------------
specimx_sound_device::specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : device_t(mconfig, SPECIMX, "Specialist MX Audio Custom", tag, owner, clock, "specimx_sound", __FILE__),
+ : device_t(mconfig, SPECIMX_SND, "Specialist MX Audio Custom", tag, owner, clock, "specimx_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_mixer_channel(NULL)
{
diff --git a/src/mess/audio/specimx_snd.h b/src/mess/audio/specimx_snd.h
new file mode 100644
index 00000000000..1a046ced050
--- /dev/null
+++ b/src/mess/audio/specimx_snd.h
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ *
+ * specimx_snd.h
+ *
+ ****************************************************************************/
+
+#ifndef SPECIAL_SND_H_
+#define SPECIAL_SND_H_
+
+#include "emu.h"
+
+class specimx_sound_device : public device_t,
+ public device_sound_interface
+{
+public:
+ specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ ~specimx_sound_device() { }
+
+ DECLARE_WRITE_LINE_MEMBER(set_input_ch0);
+ DECLARE_WRITE_LINE_MEMBER(set_input_ch1);
+ DECLARE_WRITE_LINE_MEMBER(set_input_ch2);
+
+protected:
+ // device-level overrides
+ 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:
+ sound_stream *m_mixer_channel;
+ int m_specimx_input[3];
+};
+
+extern const device_type SPECIMX_SND;
+
+#endif /* SPECIAL_SND_H_ */