summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/speaker.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/speaker.h')
-rw-r--r--src/emu/speaker.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/emu/speaker.h b/src/emu/speaker.h
index 2280b883250..8d41342e01f 100644
--- a/src/emu/speaker.h
+++ b/src/emu/speaker.h
@@ -28,8 +28,8 @@ DECLARE_DEVICE_TYPE(SPEAKER, speaker_device)
// add/remove speakers
#define MCFG_SPEAKER_ADD(_tag, _x, _y, _z) \
- MCFG_DEVICE_ADD(_tag, SPEAKER, 0) \
- downcast<speaker_device &>(*device).set_position(_x, _y, _z);
+ MCFG_DEVICE_ADD(_tag, SPEAKER, _x, _y, _z)
+
#define MCFG_SPEAKER_STANDARD_MONO(_tag) \
MCFG_SPEAKER_ADD(_tag, 0.0, 0.0, 1.0)
@@ -49,7 +49,12 @@ class speaker_device : public device_t, public device_mixer_interface
{
public:
// construction/destruction
- speaker_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ speaker_device(const machine_config &mconfig, const char *tag, device_t *owner, double x, double y, double z)
+ : speaker_device(mconfig, tag, owner, 0)
+ {
+ set_position(x, y, z);
+ }
+ speaker_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
virtual ~speaker_device();
// inline configuration helpers