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:
Olivier Galibert 2018-05-15 18:02:08 +02:00
parent 6762946a67
commit a0137c10da

View File

@ -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())