summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/k054539.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/k054539.h')
-rw-r--r--src/devices/sound/k054539.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/devices/sound/k054539.h b/src/devices/sound/k054539.h
index 9e7bafdb0fc..65a551b1c4b 100644
--- a/src/devices/sound/k054539.h
+++ b/src/devices/sound/k054539.h
@@ -26,7 +26,7 @@ public:
UPDATE_AT_KEYON = 4
};
- typedef device_delegate<void (double left, double right)> cb_delegate;
+ using apan_delegate = device_delegate<void (double left, double right)>;
// construction/destruction
k054539_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
@@ -34,15 +34,7 @@ public:
// configuration helpers
auto timer_handler() { return m_timer_handler.bind(); }
- void set_analog_callback(cb_delegate callback) { m_apan_cb = callback; }
- template <class FunctionClass> void set_analog_callback(const char *devname, void (FunctionClass::*callback)(double, double), const char *name)
- {
- set_analog_callback(cb_delegate(callback, name, devname, static_cast<FunctionClass *>(nullptr)));
- }
- template <class FunctionClass> void set_analog_callback(void (FunctionClass::*callback)(double, double), const char *name)
- {
- set_analog_callback(cb_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr)));
- }
+ template <typename... T> void set_analog_callback(T &&... args) { m_apan_cb.set(std::forward<T>(args)...); }
void write(offs_t offset, u8 data);
u8 read(offs_t offset);
@@ -105,7 +97,7 @@ private:
emu_timer *m_timer;
uint32_t m_timer_state;
devcb_write_line m_timer_handler;
- cb_delegate m_apan_cb;
+ apan_delegate m_apan_cb;
bool regupdate();
void keyon(int channel);