public void Update() { if (!Running) { return; } float time = CSound.GetPosition(_Stream) * 1000f; if (time <= 0f) { return; } bool isActive = false; if (time <= _MaxDelayTime) { for (int i = 0; i < _DelaysChannel.Length; i++) { if (_DelaysChannel[i].Channel < 0 || _DelaysChannel[i].Finished) { continue; } if (CRecord.GetTone(_DelaysChannel[i].Channel) == 9) { Delays[i] = (int)time; _DelaysChannel[i].Finished = true; } else { isActive = true; } } } if (!isActive) { _Stop(); } }