summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/esqpump.cpp
diff options
context:
space:
mode:
author andreasnaive <andreasnaive@gmail.com>2019-03-25 23:13:40 +0100
committer andreasnaive <andreasnaive@gmail.com>2019-03-25 23:13:40 +0100
commitb380514764cf857469bae61c11143a19f79a74c5 (patch)
tree63c8012e262618f08a332da31dd714281aa2c5ed /src/devices/sound/esqpump.cpp
parentc24473ddff715ecec2e258a6eb38960cf8c8e98e (diff)
Revert "conflict resolution (nw)"
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
Diffstat (limited to 'src/devices/sound/esqpump.cpp')
-rw-r--r--src/devices/sound/esqpump.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/devices/sound/esqpump.cpp b/src/devices/sound/esqpump.cpp
index 5ed977b9f81..f817b0d7274 100644
--- a/src/devices/sound/esqpump.cpp
+++ b/src/devices/sound/esqpump.cpp
@@ -16,12 +16,8 @@ DEFINE_DEVICE_TYPE(ESQ_5505_5510_PUMP, esq_5505_5510_pump_device, "esq_5505_5510
esq_5505_5510_pump_device::esq_5505_5510_pump_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ESQ_5505_5510_PUMP, tag, owner, clock)
, device_sound_interface(mconfig, *this)
- , m_stream(nullptr)
- , m_timer(nullptr)
- , m_esp(*this, finder_base::DUMMY_TAG)
- , m_esp_halted(true)
- , ticks_spent_processing(0)
- , samples_processed(0)
+ , m_stream(nullptr), m_timer(nullptr), m_esp(nullptr)
+ , m_esp_halted(true), ticks_spent_processing(0), samples_processed(0)
{
#if !PUMP_FAKE_ESP_PROCESSING && PUMP_REPLACE_ESP_PROGRAM
e = nullptr;
@@ -63,14 +59,12 @@ void esq_5505_5510_pump_device::device_stop()
void esq_5505_5510_pump_device::device_reset()
{
- m_timer->adjust(attotime::zero, 0, attotime::from_hz(clock()));
- m_timer->enable(true);
-}
+ int64_t nsec_per_sample = 100 * 16 * 21;
+ attotime sample_time(0, 1000000000 * nsec_per_sample);
+ attotime initial_delay(0, 0);
-void esq_5505_5510_pump_device::device_clock_changed()
-{
- m_stream->set_sample_rate(clock());
- m_timer->adjust(attotime::zero, 0, attotime::from_hz(clock()));
+ m_timer->adjust(initial_delay, 0, sample_time);
+ m_timer->enable(true);
}
void esq_5505_5510_pump_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)