diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2018-05-15 19:28:00 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2018-05-15 19:28:00 -0400 |
commit | 4f13ab7d12a8b336977e89cd8b7196ed33e11f2f (patch) | |
tree | 60f74499e1603d961c1f1413df842b8ef2ad1e78 /src/emu | |
parent | e9a2814b434334be267f2b95321491c005105f37 (diff) |
sound.cpp: Perform the sanity check from a0137c10da45fe10e52f9debcf00b266f2234329 in a better place (nw, seems to fix assert error)
Diffstat (limited to 'src/emu')
-rw-r--r-- | src/emu/sound.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp index 03bc588270c..da20d617f29 100644 --- a/src/emu/sound.cpp +++ b/src/emu/sound.cpp @@ -268,9 +268,6 @@ void sound_stream::update() attotime time = m_device.machine().time(); s32 update_sampindex = s32(time.attoseconds() / m_attoseconds_per_sample); - if (update_sampindex <= m_output_sampindex) - return; - // if we're ahead of the last update, then adjust upwards attotime last_update = m_device.machine().sound().last_update(); if (time.seconds() > last_update.seconds()) @@ -286,6 +283,9 @@ void sound_stream::update() update_sampindex -= m_sample_rate; } + if (update_sampindex <= m_output_sampindex) + return; + // generate samples to get us up to the appropriate time g_profiler.start(PROFILER_SOUND); assert(m_output_sampindex - m_output_base_sampindex >= 0); |