mirror of
https://github.com/DarthAffe/KeyboardAudioVisualizer.git
synced 2025-12-12 15:18:30 +00:00
Increased max update-rate
This commit is contained in:
parent
4543dcb787
commit
2ad4a6f333
@ -61,7 +61,7 @@ namespace KeyboardAudioVisualizer
|
|||||||
{
|
{
|
||||||
RGBSurface surface = RGBSurface.Instance;
|
RGBSurface surface = RGBSurface.Instance;
|
||||||
|
|
||||||
surface.UpdateFrequency = 1.0 / MathHelper.Clamp(Settings.UpdateRate, 1, 40);
|
surface.UpdateFrequency = 1.0 / MathHelper.Clamp(Settings.UpdateRate, 1, 60);
|
||||||
surface.UpdateMode = UpdateMode.Continuous;
|
surface.UpdateMode = UpdateMode.Continuous;
|
||||||
|
|
||||||
LoadDevices(surface, CorsairDeviceProvider.Instance);
|
LoadDevices(surface, CorsairDeviceProvider.Instance);
|
||||||
|
|||||||
@ -18,7 +18,7 @@ namespace KeyboardAudioVisualizer.UI
|
|||||||
get => 1.0 / RGBSurface.Instance.UpdateFrequency;
|
get => 1.0 / RGBSurface.Instance.UpdateFrequency;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
double val = MathHelper.Clamp(value, 1, 40);
|
double val = MathHelper.Clamp(value, 1, 60);
|
||||||
ApplicationManager.Instance.Settings.UpdateRate = val;
|
ApplicationManager.Instance.Settings.UpdateRate = val;
|
||||||
RGBSurface.Instance.UpdateFrequency = 1.0 / val;
|
RGBSurface.Instance.UpdateFrequency = 1.0 / val;
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
|
|||||||
@ -185,10 +185,10 @@
|
|||||||
<TextBlock Text="{Binding Version}" />
|
<TextBlock Text="{Binding Version}" />
|
||||||
|
|
||||||
<Label controls:Form.IsLabel="True" Content="Update-Rate" />
|
<Label controls:Form.IsLabel="True" Content="Update-Rate" />
|
||||||
<Slider Minimum="1" Maximum="40" controls:Form.Fill="True" IsSnapToTickEnabled="True" TickFrequency="1" TickPlacement="BottomRight"
|
<Slider Minimum="1" Maximum="60" controls:Form.Fill="True" IsSnapToTickEnabled="True" TickFrequency="1" TickPlacement="BottomRight"
|
||||||
Value="{Binding UpdateRate}"
|
Value="{Binding UpdateRate}"
|
||||||
attached:SliderValue.Unit="FPS"
|
attached:SliderValue.Unit="FPS"
|
||||||
ToolTip="Defines how fast the data is updated.
Low values can reduce CPU-usage but will cause stuttering." />
|
ToolTip="Defines how fast the data is updated.
Low values can reduce CPU-usage but will cause stuttering.
Values above 40 will only affect the internal calculations and wont make the keyboard update faster.
It's not recommended to select a value > 40." />
|
||||||
|
|
||||||
<Label controls:Form.IsLabel="True" Content="Fix Volume" />
|
<Label controls:Form.IsLabel="True" Content="Fix Volume" />
|
||||||
<CheckBox VerticalAlignment="Center"
|
<CheckBox VerticalAlignment="Center"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user