diff --git a/Qwilight/Compute/DefaultCompute.cs b/Qwilight/Compute/DefaultCompute.cs index 817e3bc..7c25f5b 100644 --- a/Qwilight/Compute/DefaultCompute.cs +++ b/Qwilight/Compute/DefaultCompute.cs @@ -2438,7 +2438,7 @@ if (!IsInEvents) { Utility.LoopBefore(waitAudioNoteMap, LoopingCounter, Configure.Instance.AudioWait + Configure.Instance.BanalAudioWait, handleAudioNotesImpl); - if (!Configure.Instance.HandleInputAudio || Configure.Instance.StressInputAudio) + if (!Configure.Instance.HandleInputAudio || Configure.Instance.LevelingInputAudio) { Utility.LoopBefore(waitInputAudioMap, LoopingCounter, Configure.Instance.AudioWait + Configure.Instance.BanalAudioWait, handleAudioNotesImpl); } diff --git a/Qwilight/System/AudioSystem/AudioSystem.cs b/Qwilight/System/AudioSystem/AudioSystem.cs index 28671df..a6c58bc 100644 --- a/Qwilight/System/AudioSystem/AudioSystem.cs +++ b/Qwilight/System/AudioSystem/AudioSystem.cs @@ -279,7 +279,7 @@ for (var audioVariety = SEAudio; audioVariety >= MainAudio; --audioVariety) { - var targetAudioVolume = totalAudioVolume * _audioVolumes[audioVariety]; + var targetAudioVolume = (float)(1 - Math.Sqrt(1 - Math.Pow(totalAudioVolume * _audioVolumes[audioVariety], 2))); _audioCSX.EnterWriteLock(); try { diff --git a/Qwilight/System/Configure/Configure.cs b/Qwilight/System/Configure/Configure.cs index 929b5d3..ee18cd5 100644 --- a/Qwilight/System/Configure/Configure.cs +++ b/Qwilight/System/Configure/Configure.cs @@ -259,10 +259,9 @@ bool _audioVisualizer; bool _lostPointAudio; bool _isMediaFill; - bool _isQwilightFill; bool _saltAuto; bool _isFailMode; - bool _stressInputAudio; + bool _levelingInputAudio; WantBanned _wantBanned; bool _wantLevelSystem; bool _wantLevelTextValue; @@ -1670,23 +1669,23 @@ public string HandleInputAudioText => HandleInputAudio ? LanguageSystem.Instance.HandleInputAudioText : LanguageSystem.Instance.NotHandleInputAudioText; - public bool StressInputAudio + public bool LevelingInputAudio { - get => _stressInputAudio; + get => _levelingInputAudio; set { - if (SetProperty(ref _stressInputAudio, value)) + if (SetProperty(ref _levelingInputAudio, value)) { - OnPropertyChanged(nameof(StressInputAudioPaint)); - OnPropertyChanged(nameof(StressInputAudioText)); + OnPropertyChanged(nameof(LevelingInputAudioPaint)); + OnPropertyChanged(nameof(LevelingInputAudioText)); } } } - public Brush StressInputAudioPaint => Paints.PointPaints[StressInputAudio ? 1 : 0]; + public Brush LevelingInputAudioPaint => Paints.PointPaints[LevelingInputAudio ? 1 : 0]; - public string StressInputAudioText => StressInputAudio ? LanguageSystem.Instance.StressInputAudioText : LanguageSystem.Instance.NotStressInputAudioText; + public string LevelingInputAudioText => LevelingInputAudio ? LanguageSystem.Instance.LevelingInputAudioText : LanguageSystem.Instance.NotLevelingInputAudioText; [JsonIgnore] public double BanalAudioWait diff --git a/Qwilight/System/DrawingSystem/DrawingSystem.cs b/Qwilight/System/DrawingSystem/DrawingSystem.cs index 2850a26..83a428b 100644 --- a/Qwilight/System/DrawingSystem/DrawingSystem.cs +++ b/Qwilight/System/DrawingSystem/DrawingSystem.cs @@ -3098,13 +3098,14 @@ } var defaultDPI = 96F * Math.Max(windowAreaLength / enlargedLength, windowAreaHeight / enlargedHeight); + if (_rawTargetSystem == null) { lock (_d2D1CSX) { _targetSystem?.Dispose(); _targetSystem = new(CanvasDevice.GetSharedDevice(), enlargedLength, enlargedHeight, defaultDPI, DirectXPixelFormat.B8G8R8A8UIntNormalized, CanvasAlphaMode.Ignore); - _rawTargetSystemData = new byte[(int)(defaultLength * defaultHeight * 4)]; + _rawTargetSystemData = new byte[(int)(defaultLength * (defaultDPI / 96F) * defaultHeight * (defaultDPI / 96F) * 4)]; _targetSystemData = _rawTargetSystemData.AsBuffer(); _rawTargetSystem?.Dispose(); _rawTargetSystem = new(CanvasDevice.GetSharedDevice(), enlargedLength, enlargedHeight, defaultDPI, DirectXPixelFormat.B8G8R8A8UIntNormalized, dataCount, CanvasAlphaMode.Ignore); @@ -3121,7 +3122,7 @@ { _targetSystem?.Dispose(); _targetSystem = new(CanvasDevice.GetSharedDevice(), enlargedLength, enlargedHeight, defaultDPI, DirectXPixelFormat.B8G8R8A8UIntNormalized, CanvasAlphaMode.Ignore); - _rawTargetSystemData = new byte[(int)(defaultLength * defaultHeight * 4)]; + _rawTargetSystemData = new byte[(int)(defaultLength * (defaultDPI / 96F) * defaultHeight * (defaultDPI / 96F) * 4)]; _targetSystemData = _rawTargetSystemData.AsBuffer(); _rawTargetSystem.ResizeBuffers(enlargedLength, enlargedHeight, defaultDPI, DirectXPixelFormat.B8G8R8A8UIntNormalized, dataCount); } diff --git a/Qwilight/System/LanguageSystem/LanguageSystem.g.cs b/Qwilight/System/LanguageSystem/LanguageSystem.g.cs index 8f922b5..8a54af2 100644 --- a/Qwilight/System/LanguageSystem/LanguageSystem.g.cs +++ b/Qwilight/System/LanguageSystem/LanguageSystem.g.cs @@ -653,7 +653,7 @@ public string NotSFXText { get; set; } public string NotStillDrawing { get; set; } public string NotStopLastEqualAudioText { get; set; } - public string NotStressInputAudioText { get; set; } + public string NotLevelingInputAudioText { get; set; } public string NotSupportedFileContents { get; set; } public string NotTubeText { get; set; } public string NotUbuntuSituationContents { get; set; } @@ -813,8 +813,8 @@ public string StopSavingAsBundleContents { get; set; } public string StopSavingBundleContents { get; set; } public string StopSiteNetText { get; set; } - public string StressInputAudioContents { get; set; } - public string StressInputAudioText { get; set; } + public string LevelingInputAudioContents { get; set; } + public string LevelingInputAudioText { get; set; } public string SymmetricModeContents { get; set; } public string TestHitPointsModeContents { get; set; } public string TestHitPointsModeWarning { get; set; } diff --git a/Qwilight/ViewModel/ConfigureViewModel.cs b/Qwilight/ViewModel/ConfigureViewModel.cs index 4c9d009..942aa71 100644 --- a/Qwilight/ViewModel/ConfigureViewModel.cs +++ b/Qwilight/ViewModel/ConfigureViewModel.cs @@ -737,7 +737,7 @@ static void OnHandleInputAudio() => Configure.Instance.HandleInputAudio = !Configure.Instance.HandleInputAudio; [RelayCommand] - static void OnStressInputAudio() => Configure.Instance.StressInputAudio = !Configure.Instance.StressInputAudio; + static void OnLevelingInputAudio() => Configure.Instance.LevelingInputAudio = !Configure.Instance.LevelingInputAudio; [RelayCommand] static void OnBanalAudio() => Configure.Instance.BanalAudio = !Configure.Instance.BanalAudio;