diff options
Diffstat (limited to 'src/devices/sound/mea8000.cpp')
-rw-r--r-- | src/devices/sound/mea8000.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/devices/sound/mea8000.cpp b/src/devices/sound/mea8000.cpp index d4d93ca4c8e..caa0aef5ea0 100644 --- a/src/devices/sound/mea8000.cpp +++ b/src/devices/sound/mea8000.cpp @@ -30,7 +30,7 @@ #include "emu.h" #include "mea8000.h" -#include <math.h> +#include <cmath> //#define VERBOSE 1 #include "logmacro.h" @@ -130,14 +130,12 @@ mea8000_device::mea8000_device(const machine_config &mconfig, const char *tag, d void mea8000_device::device_start() { - m_write_req.resolve_safe(); - init_tables(); m_stream = stream_alloc(0, 1, clock() / 60); save_item(NAME(m_output)); - m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mea8000_device::timer_expire),this)); + m_timer = timer_alloc(FUNC(mea8000_device::timer_expire), this); save_item(NAME(m_state)); save_item(NAME(m_buf)); @@ -422,12 +420,9 @@ void mea8000_device::stop_frame() -void mea8000_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) +void mea8000_device::sound_stream_update(sound_stream &stream) { - for (int samp = 0; samp < samples; samp++) - { - outputs[0][samp] = m_output; - } + stream.fill(0, sound_stream::sample_t(m_output) * (1.0 / 32768.0)); } /* next sample in frame, sampling at 64 kHz */ @@ -495,7 +490,7 @@ TIMER_CALLBACK_MEMBER( mea8000_device::timer_expire ) /************************** CPU interface ****************************/ -READ8_MEMBER( mea8000_device::read ) +uint8_t mea8000_device::read(offs_t offset) { switch (offset) { @@ -513,7 +508,7 @@ READ8_MEMBER( mea8000_device::read ) return 0; } -WRITE8_MEMBER( mea8000_device::write ) +void mea8000_device::write(offs_t offset, uint8_t data) { switch (offset) { |