mirror of
https://github.com/holub/mame
synced 2025-10-07 01:16:22 +03:00
sound.cpp: Perform the sanity check from a0137c10da
in a better place (nw, seems to fix assert error)
This commit is contained in:
parent
e9a2814b43
commit
4f13ab7d12
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user