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:
1 parent
830f729f52
commit
8bd4a7218c
3 files changed
+69
-21
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user