diff --git a/FractalVisualizer/Game1.cs b/FractalVisualizer/Game1.cs index 8ed6185..311f569 100644 --- a/FractalVisualizer/Game1.cs +++ b/FractalVisualizer/Game1.cs @@ -449,13 +449,14 @@ public class Game1 : Game string json = File.ReadAllText(TuningProfilePath); TuningProfiles? profile = JsonSerializer.Deserialize(json); - if (profile is null) + if (!profile.HasValue) { return; } - _audioAnalyzer.SetTuning(AudioInputMode.Microphone, profile.Microphone); - _audioAnalyzer.SetTuning(AudioInputMode.SystemOutput, profile.SystemOutput); + TuningProfiles value = profile.Value; + _audioAnalyzer.SetTuning(AudioInputMode.Microphone, value.Microphone); + _audioAnalyzer.SetTuning(AudioInputMode.SystemOutput, value.SystemOutput); } private readonly record struct TuningProfiles(