diff options
author | 2020-09-24 21:00:49 -0700 | |
---|---|---|
committer | 2020-09-24 21:00:49 -0700 | |
commit | 98b7d3bcbc8c757ff8223c4969aa91a38dcb83f3 (patch) | |
tree | 13650638d1ceedc80b662f3064b9e0072992adec | |
parent | a0aa2bcde7f20bbef0e7c5dd203a425af5de6f2a (diff) |
sound: Fix assertion when loading save state from command line.
-rw-r--r-- | src/emu/sound.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp index babd1b57b0d..1bb5ce0c40b 100644 --- a/src/emu/sound.cpp +++ b/src/emu/sound.cpp @@ -88,9 +88,9 @@ void stream_buffer::set_sample_rate(u32 rate, bool resample) if (rate == m_sample_rate) return; - // force resampling off if coming to or from an invalid rate + // force resampling off if coming to or from an invalid rate, or if we're at time 0 (startup) sound_assert(rate >= SAMPLE_RATE_MINIMUM - 1); - if (rate < SAMPLE_RATE_MINIMUM || m_sample_rate < SAMPLE_RATE_MINIMUM) + if (rate < SAMPLE_RATE_MINIMUM || m_sample_rate < SAMPLE_RATE_MINIMUM || (m_end_second == 0 && m_end_sample == 0)) resample = false; // note the time and period of the current buffer (end_time is AFTER the final sample) |