summaryrefslogtreecommitdiffstats
path: root/src/emu/sound/flt_vol.h
blob: 8440989764ac1672283218aa69e48035798b1d26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#pragma once

#ifndef __FLT_VOL_H__
#define __FLT_VOL_H__



//**************************************************************************
//  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:
	filter_volume_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
	~filter_volume_device() { }

	void flt_volume_set_volume(float volume);

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_stream;
	int            m_gain;
};

extern const device_type FILTER_VOLUME;


#endif /* __FLT_VOL_H__ */