private void _Stop() { if (!Running) { return; } Running = false; _CloseStream(); foreach (SDelayChannel delay in _DelaysChannel) { if (delay.Channel >= 0) { CRecord.SetVolumeThreshold(delay.Channel, delay.OrigThreshold); } } }
public void Start(int[] channels) { if (Running) { return; } Reset(); for (int i = 0; i < _DelaysChannel.Length; i++) { if (i < channels.Length && channels[i] >= 0) { _DelaysChannel[i].Finished = false; _DelaysChannel[i].Channel = channels[i]; _DelaysChannel[i].OrigThreshold = CRecord.GetVolumeThreshold(channels[i]); CRecord.SetVolumeThreshold(channels[i], _DelaysChannel[i].OrigThreshold / 3); } else { _DelaysChannel[i].Channel = -1; } } _Stream = CSound.PlaySound(ESounds.T440, false); Running = true; }