summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/sound/flt_vol.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/sound/flt_vol.h')
-rw-r--r--src/emu/sound/flt_vol.h31
1 files changed, 22 insertions, 9 deletions
diff --git a/src/emu/sound/flt_vol.h b/src/emu/sound/flt_vol.h
index 9c7047acf64..7836930247c 100644
--- a/src/emu/sound/flt_vol.h
+++ b/src/emu/sound/flt_vol.h
@@ -3,30 +3,43 @@
#ifndef __FLT_VOL_H__
#define __FLT_VOL_H__
-#include "devlegcy.h"
-void flt_volume_set_volume(device_t *device, float volume);
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_FILTER_VOLUME_ADD(_tag, _clock) \
+ MCFG_DEVICE_ADD(_tag, FILTER_VOLUME, _clock)
+#define MCFG_FILTER_VOLUME_REPLACE(_tag, _clock) \
+ MCFG_DEVICE_REPLACE(_tag, FILTER_VOLUME, _clock)
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> filter_volume_device
class filter_volume_device : public device_t,
- public device_sound_interface
+ public device_sound_interface
{
public:
filter_volume_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- ~filter_volume_device() { global_free(m_token); }
+ ~filter_volume_device() { }
+
+ void flt_volume_set_volume(float volume);
- // 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;
+ sound_stream* m_stream;
+ int m_gain;
};
extern const device_type FILTER_VOLUME;