Пример #1
0
 public Config(Config blueprint)
 {
     _maxSounds                = blueprint.MaxSounds < 10 ? 10 : blueprint.MaxSounds;
     _currentOutputDevice      = blueprint.CurrentOutputDevice;
     _currentInputDevice       = blueprint.CurrentInputDevice;
     _soundPlaybackDevice      = blueprint.SoundPlaybackDevice;
     _currentVolume            = blueprint.CurrentVolume;
     _inputPassthroughEnabled  = blueprint.InputPassthroughEnabled;
     _inputPlaybackEnabled     = blueprint.InputPlaybackEnabled;
     _soundPlaybackEnabled     = blueprint.SoundPlaybackEnabled;
     _interruptKeys            = blueprint.InterruptKeys;
     _inputChannels            = blueprint.InputChannels == 0 ? 1 : blueprint.InputChannels;
     _inputSampleRate          = blueprint.InputSampleRate == 0 ? 44100 : blueprint.InputSampleRate;
     _muteInputWithSoundSystem = blueprint.MuteInputWithSoundSystem;
     _toggleSystemBinding      = blueprint.ToggleSystemBinding;
     _toggleModeBinding        = blueprint.ToggleModeBinding;
     _toggleProfileBinding     = blueprint.ToggleProfileBinding;
     _toggleOverlayBinding     = blueprint.ToggleOverlayBinding;
     _recordBinding            = blueprint.RecordBinding == 0 ? (int)Keys.LControlKey : blueprint.RecordBinding;
     _inputMode                = blueprint.InputMode;
     _profiles = blueprint.Profiles == null ? new List <string>() : blueprint.Profiles;
     if (_profiles.Count == 0)
     {
         _profiles.Add("Profile 1");
     }
     _currentProfile = blueprint.CurrentProfile;
 }
Пример #2
0
 public Config(int maxButtons)
 {
     _maxSounds               = maxButtons;
     _profiles                = new List <string>();
     _currentOutputDevice     = 0;
     _currentInputDevice      = 0;
     _soundPlaybackDevice     = 0;
     _currentVolume           = 10;
     _inputPassthroughEnabled = true;
     _inputPlaybackEnabled    = true;
     _inputChannels           = 1;
     _inputSampleRate         = 44100;
     _soundPlaybackEnabled    = true;
     _interruptKeys           = false;
     _inputMode               = SoundSystem.SoundMode.Interrupt;
     _currentProfile          = 0;
     _recordBinding           = (int)Keys.LControlKey;
     _profiles.Add("Profile 1");
 }