diff --git a/Vocaluxe/Lib/Sound/CPortAudioPlay.cs b/Vocaluxe/Lib/Sound/CPortAudioPlay.cs index 43623c5c..dc23bc91 100644 --- a/Vocaluxe/Lib/Sound/CPortAudioPlay.cs +++ b/Vocaluxe/Lib/Sound/CPortAudioPlay.cs @@ -677,6 +677,21 @@ namespace Vocaluxe.Lib.Sound { if (EventDecode.WaitOne(10)) { + lock (MutexSyncSignals) + { + if (_SetSkip) + { + _skip = true; + EventDecode.Set(); + _waiting = true; + } + + _SetSkip = false; + + _Start = _SetStart; + _Loop = _SetLoop; + } + if (_skip) { DoSkip(); @@ -689,25 +704,6 @@ namespace Vocaluxe.Lib.Sound Update(); } } - - if (!_terminated) - { - lock (MutexSyncSignals) - { - if (_SetSkip) - { - _skip = true; - EventDecode.Set(); - _waiting = true; - } - - _SetSkip = false; - - _Start = _SetStart; - _Loop = _SetLoop; - } - } - } DoFree();