mirror of
https://github.com/holub/mame
synced 2025-05-28 08:33:05 +03:00
sound: Fix asserts due to sample-rate ping-pong in esq5505 driver
This commit is contained in:
parent
8fd87a7257
commit
f49dca5cff
@ -123,7 +123,14 @@ void stream_buffer::set_sample_rate(u32 rate, bool resample)
|
||||
for (int index = 0; index < buffered_samples; index++)
|
||||
{
|
||||
end = prev_index(end);
|
||||
buffer[index] = get(end);
|
||||
#if (SOUND_DEBUG)
|
||||
// multiple resamples can occur before clearing out old NaNs so
|
||||
// neuter them for this specific case
|
||||
if (std::isnan(m_buffer[end]))
|
||||
buffer[index] = 0;
|
||||
else
|
||||
#endif
|
||||
buffer[index] = get(end);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user