fix: true pause/resume with position preservation

- SoundManager: pauseCurrentPcm()/resumeCurrentPcm() — stop/start without destroy
- VoicePlayState: added paused/pausedPosSec fields
- editorEvent: 3-state logic — playing→pause, paused→resume, stopped→new
- Different file click: stops old with full cleanup, plays new from start
- Timer: skips paused items, full cleanup on auto-complete
This commit is contained in:
Evgeny committed 2026-07-27 08:07:19 +03:00
1 parent 830f729f52
commit 8bd4a7218c
3 files changed
+69 -21

No files matched your search

+8
View File
@@ -172,6 +172,14 @@ void SoundManager::playRawPcm(const int16_t* pcm, int sampleCount, int sampleRat
ma_sound_start(m_currentPcmSound);
}
void SoundManager::pauseCurrentPcm() {
if (m_currentPcmSound) ma_sound_stop(m_currentPcmSound);
}
void SoundManager::resumeCurrentPcm() {
if (m_currentPcmSound) ma_sound_start(m_currentPcmSound);
}
void SoundManager::stopCurrentPcm() {
if (m_currentPcmSound) {
ma_sound_stop(m_currentPcmSound);