diff options
Diffstat (limited to 'src/devices/sound/rf5c68.h')
-rw-r--r-- | src/devices/sound/rf5c68.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/devices/sound/rf5c68.h b/src/devices/sound/rf5c68.h index 5594e32f3e8..056d2c9c99c 100644 --- a/src/devices/sound/rf5c68.h +++ b/src/devices/sound/rf5c68.h @@ -11,13 +11,6 @@ //************************************************************************** -// INTERFACE CONFIGURATION MACROS -//************************************************************************** - -#define MCFG_RF5C68_SAMPLE_END_CB(_class, _method) \ - downcast<rf5c68_device &>(*device).set_end_callback(rf5c68_device::sample_end_cb_delegate(&_class::_method, #_class "::" #_method, this)); - -//************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -35,7 +28,15 @@ public: rf5c68_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - template <typename Object> void set_end_callback(Object &&cb) { m_sample_end_cb = std::forward<Object>(cb); } + void set_end_callback(sample_end_cb_delegate callback) { m_sample_end_cb = callback; } + template <class FunctionClass> void set_end_callback(const char *devname, void (FunctionClass::*callback)(int), const char *name) + { + set_end_callback(sample_end_cb_delegate(callback, name, devname, static_cast<FunctionClass *>(nullptr))); + } + template <class FunctionClass> void set_end_callback(void (FunctionClass::*callback)(int), const char *name) + { + set_end_callback(sample_end_cb_delegate(callback, name, nullptr, static_cast<FunctionClass *>(nullptr))); + } DECLARE_READ8_MEMBER( rf5c68_r ); DECLARE_WRITE8_MEMBER( rf5c68_w ); |