AudioStream: Tidy up more state reset

pull/3739/head
Stenzek 4 months ago
parent 7e98f1717e
commit dfc894c882
No known key found for this signature in database

@ -634,13 +634,7 @@ void CoreAudioStream::StretchAllocate()
soundtouch_setTempo(m_soundtouch, m_nominal_rate);
m_stretch_reset = STRETCH_RESET_THRESHOLD;
m_stretch_inactive = false;
m_stretch_ok_count = 0;
m_dynamic_target_usage = 0.0f;
m_average_position = 0;
m_average_available = 0;
m_staging_buffer_pos = 0;
m_stretch_reset_time = Timer::GetCurrentValue();
}
void CoreAudioStream::StretchUpdateParameters(const AudioStreamParameters& params)
@ -686,6 +680,14 @@ void CoreAudioStream::StretchDestroy()
soundtouch_destroyInstance(m_soundtouch);
m_soundtouch = nullptr;
}
m_stretch_reset = 0;
m_stretch_reset_time = 0;
m_stretch_inactive = false;
m_stretch_ok_count = 0;
m_dynamic_target_usage = 0.0f;
m_average_position = 0;
m_average_available = 0;
}
void CoreAudioStream::StretchWriteBlock(const float* block)

@ -163,7 +163,7 @@ private:
void* m_soundtouch = nullptr;
u32 m_target_buffer_size = 0;
u32 m_stretch_reset = STRETCH_RESET_THRESHOLD;
u32 m_stretch_reset = 0;
u64 m_stretch_reset_time = 0;
u32 m_stretch_ok_count = 0;

Loading…
Cancel
Save