public void StartSound() { if (_disposed) { return; } if (!Global.Config.SoundEnabled) { return; } if (IsStarted) { return; } _soundOutput.StartSound(); _outputProvider = new SoundOutputProvider(); _outputProvider.MaxSamplesDeficit = _soundOutput.MaxSamplesDeficit; _outputProvider.BaseSoundProvider = _syncSoundProvider; Global.SoundMaxBufferDeficitMs = (int)Math.Ceiling(SamplesToMilliseconds(_soundOutput.MaxSamplesDeficit)); IsStarted = true; //ApplyVolumeSettings(); //LogUnderruns = true; //_outputProvider.LogDebug = true; }
public void StartSound() { if (_disposed) { return; } if (!Global.Config.SoundEnabled) { return; } if (IsStarted) { return; } _outputDevice.StartSound(); _outputProvider.MaxSamplesDeficit = _outputDevice.MaxSamplesDeficit; Global.SoundMaxBufferDeficitMs = (int)Math.Ceiling(SamplesToMilliseconds(_outputDevice.MaxSamplesDeficit)); IsStarted = true; }