1
/*****************************************************************************
3
MB87078 6-bit,4-channel electronic volume controller emulator
6
*****************************************************************************/
15
/***************************************************************************
17
***************************************************************************/
19
typedef void (*mb87078_gain_changed_cb)(running_machine &machine, int channel, int percent /*, float decibels*/);
21
typedef struct _mb87078_interface mb87078_interface;
22
struct _mb87078_interface
24
mb87078_gain_changed_cb gain_changed_cb;
27
DECLARE_LEGACY_DEVICE(MB87078, mb87078);
29
/***************************************************************************
30
DEVICE CONFIGURATION MACROS
31
***************************************************************************/
33
#define MCFG_MB87078_ADD(_tag, _interface) \
34
MCFG_DEVICE_ADD(_tag, MB87078, 0) \
35
MCFG_DEVICE_CONFIG(_interface)
38
/***************************************************************************
40
***************************************************************************/
42
void mb87078_data_w(device_t *device, int data, int dsel);
43
void mb87078_reset_comp_w(device_t *device, int level);
46
/* mb87078_gain_decibel_r will return 'channel' gain on the device.
47
Returned value represents channel gain expressed in decibels,
48
Range from 0 to -32.0 (or -256.0 for -infinity) */
49
float mb87078_gain_decibel_r(device_t *device, int channel);
52
/* mb87078_gain_percent_r will return 'channel' gain on the device.
53
Returned value represents channel gain expressed in percents of maximum volume.
54
Range from 100 to 0. (100 = 0dB; 50 = -6dB; 0 = -infinity)
55
This function is designed for use with MAME mixer_xxx() functions. */
56
int mb87078_gain_percent_r(device_t *device, int channel);
59
#endif /* __MB87078_H__ */