Currently, when floppy_sound_device::step selects a new seek sample, the value of m_seek_samplepos remains the same as it was the last time a seek sample was played. This might be an invalid position for the new sample, since the seek samples have different lengths. When this is the case, the next call to floppy_sound_device::sound_stream_update makes an out-of-bounds memory access as it reads the sample data.
Fix this by resetting m_seek_samplepos to 0 when a new seek sample is selected.
This also makes the seek sounds more consistent, since previously they would start from a semi-random position each time.
Currently, when
floppy_sound_device::step
selects a new seek sample, the value ofm_seek_samplepos
remains the same as it was the last time a seek sample was played. This might be an invalid position for the new sample, since the seek samples have different lengths. When this is the case, the next call tofloppy_sound_device::sound_stream_update
makes an out-of-bounds memory access as it reads the sample data.Fix this by resetting
m_seek_samplepos
to 0 when a new seek sample is selected.This also makes the seek sounds more consistent, since previously they would start from a semi-random position each time.