mirror of
https://github.com/holub/mame
synced 2025-05-25 23:35:26 +03:00
sound: If stream->update() is done going back in time (originating from
different devices at a different execution point), don't try to generate a negative number of samples [O. Galibert] Not sure why that never happened before. Oh well.
This commit is contained in:
parent
6762946a67
commit
a0137c10da
@ -268,6 +268,9 @@ 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())
|
||||
|
Loading…
Reference in New Issue
Block a user