diff options
Diffstat (limited to 'src/devices/sound/discrete.h')
-rw-r--r-- | src/devices/sound/discrete.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/devices/sound/discrete.h b/src/devices/sound/discrete.h index bcabbf8978f..eca3fcea4af 100644 --- a/src/devices/sound/discrete.h +++ b/src/devices/sound/discrete.h @@ -4255,16 +4255,8 @@ public: // INTERFACE CONFIGURATION MACROS //************************************************************************** -#define MCFG_DISCRETE_ADD(_tag, _clock, _intf) \ - MCFG_DEVICE_ADD(_tag, DISCRETE, _clock) \ - MCFG_DISCRETE_INTF(_intf) - -#define MCFG_DISCRETE_REPLACE(_tag, _clock, _intf) \ - MCFG_DEVICE_REPLACE(_tag, DISCRETE, _clock) \ - MCFG_DISCRETE_INTF(_intf) - #define MCFG_DISCRETE_INTF(_intf) \ - downcast<discrete_device &>(*device).set_intf((const discrete_block *)&(_intf##_discrete_interface)); + downcast<discrete_device &>(*device).set_intf(_intf); //************************************************************************** // TYPE DEFINITIONS @@ -4377,6 +4369,16 @@ class discrete_sound_device : public discrete_device, { public: // construction/destruction + discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, const discrete_block *intf) + : discrete_sound_device(mconfig, tag, owner, clock) + { + set_intf(intf); + } + discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, const discrete_block *intf) + : discrete_sound_device(mconfig, tag, owner, uint32_t(0)) + { + set_intf(intf); + } discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); virtual ~discrete_sound_device(void) { }; @@ -4531,8 +4533,8 @@ discrete_base_node *discrete_create_node(discrete_device * pdev, const discrete_ return discrete_node_factory< C >().Create(pdev, block); } -#define DISCRETE_SOUND_EXTERN(name) extern const discrete_block name##_discrete_interface[] -#define DISCRETE_SOUND_START(name) const discrete_block name##_discrete_interface[] = { +#define DISCRETE_SOUND_EXTERN(name) extern const discrete_block name[] +#define DISCRETE_SOUND_START(name) const discrete_block name[] = { //#define DSC_SND_ENTRY(_nod, _class, _dss, _num, _iact, _iinit, _custom, _name) { _nod, new discrete_node_factory< DISCRETE_CLASS_NAME(_class) >, _dss, _num, _iact, _iinit, _custom, _name, # _class } #define DSC_SND_ENTRY(_nod, _class, _dss, _num, _iact, _iinit, _custom, _name) { _nod, &discrete_create_node< DISCRETE_CLASS_NAME(_class) >, _dss, _num, _iact, _iinit, _custom, _name, # _class } @@ -4716,7 +4718,7 @@ discrete_base_node *discrete_create_node(discrete_device * pdev, const discrete_ #define DISCRETE_WAVLOG2(NODE1,GAIN1,NODE2,GAIN2) DSC_SND_ENTRY( NODE_SPECIAL, dso_wavlog , DSO_WAVLOG , 4, DSE( static_cast<int>(NODE1),NODE_NC,static_cast<int>(NODE2),NODE_NC ), DSE( NODE1,GAIN1,NODE2,GAIN2 ), nullptr, "DISCRETE_WAVLOG2" ), /* import */ -#define DISCRETE_IMPORT(INFO) DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_IMPORT , 0, DSE( 0 ), DSE( 0 ), &(INFO##_discrete_interface), "DISCRETE_IMPORT" ), +#define DISCRETE_IMPORT(INFO) DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_IMPORT , 0, DSE( 0 ), DSE( 0 ), &(INFO), "DISCRETE_IMPORT" ), #define DISCRETE_DELETE(NODE_FROM, NODE_TO) DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_DELETE , 2, DSE( static_cast<int>(NODE_FROM), static_cast<int>(NODE_TO) ), DSE( NODE_FROM, NODE_TO ), nullptr, "DISCRETE_DELETE" ), #define DISCRETE_REPLACE DSC_SND_ENTRY( NODE_SPECIAL, special , DSO_REPLACE , 0, DSE( 0 ), DSE( 0 ), nullptr, "DISCRETE_REPLACE" ), |