summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/cem3394.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/cem3394.cpp')
-rw-r--r--src/devices/sound/cem3394.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/devices/sound/cem3394.cpp b/src/devices/sound/cem3394.cpp
index 22894cfcbfd..60381d97723 100644
--- a/src/devices/sound/cem3394.cpp
+++ b/src/devices/sound/cem3394.cpp
@@ -16,6 +16,7 @@
#include "emu.h"
#include "cem3394.h"
+#include <algorithm>
/* waveform generation parameters */
@@ -118,6 +119,7 @@ DEFINE_DEVICE_TYPE(CEM3394, cem3394_device, "cem3394", "CEM3394 Synthesizer Voic
cem3394_device::cem3394_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, CEM3394, tag, owner, clock),
device_sound_interface(mconfig, *this),
+ m_ext_cb(*this),
m_stream(nullptr),
m_vco_zero_freq(0.0),
m_filter_zero_freq(0.0),
@@ -137,7 +139,7 @@ cem3394_device::cem3394_device(const machine_config &mconfig, const char *tag, d
m_mixer_buffer(nullptr),
m_external_buffer(nullptr)
{
- memset(m_values, 0, 8*sizeof(double));
+ std::fill(std::begin(m_values), std::end(m_values), 0.0);
}
@@ -333,7 +335,7 @@ void cem3394_device::device_start()
/* allocate stream channels, 1 per chip */
m_stream = stream_alloc(0, 1, m_sample_rate);
- m_ext_cb.bind_relative_to(*owner());
+ m_ext_cb.resolve();
/* allocate memory for a mixer buffer and external buffer (1 second should do it!) */
m_mixer_buffer = std::make_unique<int16_t[]>(m_sample_rate);