mirror of
https://github.com/DarthAffe/KeyboardAudioVisualizer.git
synced 2025-12-12 15:18:30 +00:00
Added volume prescaling-option to resolve #3
This commit is contained in:
parent
1cef641c62
commit
4543dcb787
@ -189,8 +189,8 @@ namespace KeyboardAudioVisualizer
|
|||||||
|
|
||||||
private void Exit()
|
private void Exit()
|
||||||
{
|
{
|
||||||
RGBSurface.Instance?.Dispose();
|
try { AudioVisualizationFactory.Instance?.Dispose(); } catch { }
|
||||||
AudioVisualizationFactory.Instance?.Dispose();
|
try { RGBSurface.Instance?.Dispose(); } catch { }
|
||||||
Application.Current.Shutdown();
|
Application.Current.Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
using System;
|
namespace KeyboardAudioVisualizer.AudioCapture
|
||||||
|
|
||||||
namespace KeyboardAudioVisualizer.AudioCapture
|
|
||||||
{
|
{
|
||||||
public class AudioBuffer
|
public class AudioBuffer
|
||||||
{
|
{
|
||||||
@ -13,6 +11,8 @@ namespace KeyboardAudioVisualizer.AudioCapture
|
|||||||
|
|
||||||
public int Size => _capacity;
|
public int Size => _capacity;
|
||||||
|
|
||||||
|
public float? Prescale { get; set; } = null;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
@ -32,24 +32,33 @@ namespace KeyboardAudioVisualizer.AudioCapture
|
|||||||
public void Put(float[] src, int offset, int count)
|
public void Put(float[] src, int offset, int count)
|
||||||
{
|
{
|
||||||
lock (_bufferLeft)
|
lock (_bufferLeft)
|
||||||
{
|
lock (_bufferRight)
|
||||||
if ((count & 1) != 0) return; // we expect stereo-data to be an even amount of values
|
|
||||||
|
|
||||||
if (count > _capacity)
|
|
||||||
{
|
{
|
||||||
offset += count - _capacity;
|
if ((count & 1) != 0) return; // we expect stereo-data to be an even amount of values
|
||||||
count = _capacity;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < count; i += 2)
|
if (count > _capacity)
|
||||||
{
|
{
|
||||||
_currentIndex++;
|
offset += count - _capacity;
|
||||||
if (_currentIndex >= _capacity) _currentIndex = 0;
|
count = _capacity;
|
||||||
|
}
|
||||||
|
|
||||||
_bufferLeft[_currentIndex] = src[offset + i];
|
for (int i = 0; i < count; i += 2)
|
||||||
_bufferRight[_currentIndex] = src[offset + i + 1];
|
{
|
||||||
|
_currentIndex++;
|
||||||
|
if (_currentIndex >= _capacity) _currentIndex = 0;
|
||||||
|
|
||||||
|
if (Prescale.HasValue)
|
||||||
|
{
|
||||||
|
_bufferLeft[_currentIndex] = src[offset + i] / Prescale.Value;
|
||||||
|
_bufferRight[_currentIndex] = src[offset + i + 1] / Prescale.Value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_bufferLeft[_currentIndex] = src[offset + i];
|
||||||
|
_bufferRight[_currentIndex] = src[offset + i + 1];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CopyLeftInto(ref float[] data, int offset) => CopyLeftInto(ref data, offset, _capacity);
|
public void CopyLeftInto(ref float[] data, int offset) => CopyLeftInto(ref data, offset, _capacity);
|
||||||
@ -72,11 +81,12 @@ namespace KeyboardAudioVisualizer.AudioCapture
|
|||||||
public void CopyMixInto(ref float[] data, int offset, int count)
|
public void CopyMixInto(ref float[] data, int offset, int count)
|
||||||
{
|
{
|
||||||
lock (_bufferLeft)
|
lock (_bufferLeft)
|
||||||
for (int i = _capacity - count; i < count; i++)
|
lock (_bufferRight)
|
||||||
{
|
for (int i = _capacity - count; i < count; i++)
|
||||||
int index = (_currentIndex + i) % _capacity;
|
{
|
||||||
data[offset + i] = (_bufferLeft[index] + _bufferRight[index]) / 2f;
|
int index = (_currentIndex + i) % _capacity;
|
||||||
}
|
data[offset + i] = (_bufferLeft[index] + _bufferRight[index]) / 2f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@ -13,10 +13,12 @@ namespace KeyboardAudioVisualizer.AudioCapture
|
|||||||
private WasapiCapture _capture;
|
private WasapiCapture _capture;
|
||||||
private SoundInSource _soundInSource;
|
private SoundInSource _soundInSource;
|
||||||
private SingleBlockNotificationStream _stream;
|
private SingleBlockNotificationStream _stream;
|
||||||
|
private AudioEndpointVolume _audioEndpointVolume;
|
||||||
|
|
||||||
private readonly float[] _readBuffer = new float[2048];
|
private readonly float[] _readBuffer = new float[2048];
|
||||||
|
|
||||||
public int SampleRate => _soundInSource?.WaveFormat?.SampleRate ?? -1;
|
public int SampleRate => _soundInSource?.WaveFormat?.SampleRate ?? -1;
|
||||||
|
public float MasterVolume => _audioEndpointVolume.MasterVolumeLevelScalar;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -32,6 +34,7 @@ namespace KeyboardAudioVisualizer.AudioCapture
|
|||||||
{
|
{
|
||||||
MMDevice captureDevice = MMDeviceEnumerator.DefaultAudioEndpoint(DataFlow.Render, Role.Console);
|
MMDevice captureDevice = MMDeviceEnumerator.DefaultAudioEndpoint(DataFlow.Render, Role.Console);
|
||||||
WaveFormat deviceFormat = captureDevice.DeviceFormat;
|
WaveFormat deviceFormat = captureDevice.DeviceFormat;
|
||||||
|
_audioEndpointVolume = AudioEndpointVolume.FromDevice(captureDevice);
|
||||||
|
|
||||||
//DarthAffe 07.02.2018: This is a really stupid workaround to (hopefully) finally fix the surround driver issues
|
//DarthAffe 07.02.2018: This is a really stupid workaround to (hopefully) finally fix the surround driver issues
|
||||||
for (int i = 1; i < 13; i++)
|
for (int i = 1; i < 13; i++)
|
||||||
|
|||||||
@ -7,6 +7,7 @@ namespace KeyboardAudioVisualizer.AudioCapture
|
|||||||
public interface IAudioInput : IDisposable
|
public interface IAudioInput : IDisposable
|
||||||
{
|
{
|
||||||
int SampleRate { get; }
|
int SampleRate { get; }
|
||||||
|
float MasterVolume { get; }
|
||||||
|
|
||||||
event AudioData DataAvailable;
|
event AudioData DataAvailable;
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,11 @@ namespace KeyboardAudioVisualizer.AudioProcessing
|
|||||||
|
|
||||||
public void Update()
|
public void Update()
|
||||||
{
|
{
|
||||||
|
if (ApplicationManager.Instance.Settings.EnableAudioPrescale)
|
||||||
|
_audioBuffer.Prescale = _audioInput.MasterVolume;
|
||||||
|
else
|
||||||
|
_audioBuffer.Prescale = null;
|
||||||
|
|
||||||
foreach (IAudioProcessor processor in _processors.Where(x => x.IsActive))
|
foreach (IAudioProcessor processor in _processors.Where(x => x.IsActive))
|
||||||
processor.Update();
|
processor.Update();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,8 @@ namespace KeyboardAudioVisualizer.Configuration
|
|||||||
|
|
||||||
public double UpdateRate { get; set; } = 40.0;
|
public double UpdateRate { get; set; } = 40.0;
|
||||||
|
|
||||||
|
public bool EnableAudioPrescale { get; set; } = false;
|
||||||
|
|
||||||
public Dictionary<VisualizationIndex, VisualizationSettings> Visualizations { get; set; } = new Dictionary<VisualizationIndex, VisualizationSettings>();
|
public Dictionary<VisualizationIndex, VisualizationSettings> Visualizations { get; set; } = new Dictionary<VisualizationIndex, VisualizationSettings>();
|
||||||
|
|
||||||
public VisualizationSettings this[VisualizationIndex visualizationIndex]
|
public VisualizationSettings this[VisualizationIndex visualizationIndex]
|
||||||
|
|||||||
@ -57,37 +57,37 @@
|
|||||||
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Brushes, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Brushes, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Brushes.0.0.1.31\lib\net45\RGB.NET.Brushes.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Brushes.0.0.1.35\lib\net45\RGB.NET.Brushes.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Core, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Core, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Core.0.0.1.31\lib\net45\RGB.NET.Core.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Core.0.0.1.35\lib\net45\RGB.NET.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Decorators, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Decorators, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Decorators.0.0.1.31\lib\net45\RGB.NET.Decorators.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Decorators.0.0.1.35\lib\net45\RGB.NET.Decorators.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Asus, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Asus, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Asus.0.0.1.31\lib\net45\RGB.NET.Devices.Asus.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Asus.0.0.1.35\lib\net45\RGB.NET.Devices.Asus.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.CoolerMaster, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.CoolerMaster, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.31\lib\net45\RGB.NET.Devices.CoolerMaster.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.35\lib\net45\RGB.NET.Devices.CoolerMaster.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Corsair, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Corsair, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Corsair.0.0.1.31\lib\net45\RGB.NET.Devices.Corsair.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Corsair.0.0.1.35\lib\net45\RGB.NET.Devices.Corsair.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Logitech, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Logitech, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Logitech.0.0.1.31\lib\net45\RGB.NET.Devices.Logitech.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Logitech.0.0.1.35\lib\net45\RGB.NET.Devices.Logitech.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Msi, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Msi, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Msi.0.0.1.31\lib\net45\RGB.NET.Devices.Msi.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Msi.0.0.1.35\lib\net45\RGB.NET.Devices.Msi.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Novation, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Novation, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Novation.0.0.1.31\lib\net45\RGB.NET.Devices.Novation.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Novation.0.0.1.35\lib\net45\RGB.NET.Devices.Novation.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Devices.Razer, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Devices.Razer, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Devices.Razer.0.0.1.31\lib\net45\RGB.NET.Devices.Razer.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Devices.Razer.0.0.1.35\lib\net45\RGB.NET.Devices.Razer.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RGB.NET.Groups, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RGB.NET.Groups, Version=0.0.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\RGB.NET.Groups.0.0.1.31\lib\net45\RGB.NET.Groups.dll</HintPath>
|
<HintPath>..\packages\RGB.NET.Groups.0.0.1.35\lib\net45\RGB.NET.Groups.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Sanford.Multimedia.Midi, Version=6.5.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Sanford.Multimedia.Midi, Version=6.5.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Sanford.Multimedia.Midi.6.5.0\lib\net20\Sanford.Multimedia.Midi.dll</HintPath>
|
<HintPath>..\packages\Sanford.Multimedia.Midi.6.5.0\lib\net20\Sanford.Multimedia.Midi.dll</HintPath>
|
||||||
@ -328,21 +328,21 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="..\packages\RGB.NET.Devices.Asus.0.0.1.31\build\net45\RGB.NET.Devices.Asus.targets" Condition="Exists('..\packages\RGB.NET.Devices.Asus.0.0.1.31\build\net45\RGB.NET.Devices.Asus.targets')" />
|
<Import Project="..\packages\RGB.NET.Devices.Asus.0.0.1.35\build\net45\RGB.NET.Devices.Asus.targets" Condition="Exists('..\packages\RGB.NET.Devices.Asus.0.0.1.35\build\net45\RGB.NET.Devices.Asus.targets')" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Asus.0.0.1.31\build\net45\RGB.NET.Devices.Asus.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Asus.0.0.1.31\build\net45\RGB.NET.Devices.Asus.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Asus.0.0.1.35\build\net45\RGB.NET.Devices.Asus.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Asus.0.0.1.35\build\net45\RGB.NET.Devices.Asus.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.31\build\net45\RGB.NET.Devices.CoolerMaster.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.31\build\net45\RGB.NET.Devices.CoolerMaster.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.35\build\net45\RGB.NET.Devices.CoolerMaster.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.35\build\net45\RGB.NET.Devices.CoolerMaster.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Corsair.0.0.1.31\build\net45\RGB.NET.Devices.Corsair.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Corsair.0.0.1.31\build\net45\RGB.NET.Devices.Corsair.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Corsair.0.0.1.35\build\net45\RGB.NET.Devices.Corsair.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Corsair.0.0.1.35\build\net45\RGB.NET.Devices.Corsair.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Logitech.0.0.1.31\build\net45\RGB.NET.Devices.Logitech.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Logitech.0.0.1.31\build\net45\RGB.NET.Devices.Logitech.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Logitech.0.0.1.35\build\net45\RGB.NET.Devices.Logitech.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Logitech.0.0.1.35\build\net45\RGB.NET.Devices.Logitech.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Msi.0.0.1.31\build\net45\RGB.NET.Devices.Msi.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Msi.0.0.1.31\build\net45\RGB.NET.Devices.Msi.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Msi.0.0.1.35\build\net45\RGB.NET.Devices.Msi.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Msi.0.0.1.35\build\net45\RGB.NET.Devices.Msi.targets'))" />
|
||||||
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Razer.0.0.1.31\build\net45\RGB.NET.Devices.Razer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Razer.0.0.1.31\build\net45\RGB.NET.Devices.Razer.targets'))" />
|
<Error Condition="!Exists('..\packages\RGB.NET.Devices.Razer.0.0.1.35\build\net45\RGB.NET.Devices.Razer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\RGB.NET.Devices.Razer.0.0.1.35\build\net45\RGB.NET.Devices.Razer.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.31\build\net45\RGB.NET.Devices.CoolerMaster.targets" Condition="Exists('..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.31\build\net45\RGB.NET.Devices.CoolerMaster.targets')" />
|
<Import Project="..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.35\build\net45\RGB.NET.Devices.CoolerMaster.targets" Condition="Exists('..\packages\RGB.NET.Devices.CoolerMaster.0.0.1.35\build\net45\RGB.NET.Devices.CoolerMaster.targets')" />
|
||||||
<Import Project="..\packages\RGB.NET.Devices.Corsair.0.0.1.31\build\net45\RGB.NET.Devices.Corsair.targets" Condition="Exists('..\packages\RGB.NET.Devices.Corsair.0.0.1.31\build\net45\RGB.NET.Devices.Corsair.targets')" />
|
<Import Project="..\packages\RGB.NET.Devices.Corsair.0.0.1.35\build\net45\RGB.NET.Devices.Corsair.targets" Condition="Exists('..\packages\RGB.NET.Devices.Corsair.0.0.1.35\build\net45\RGB.NET.Devices.Corsair.targets')" />
|
||||||
<Import Project="..\packages\RGB.NET.Devices.Logitech.0.0.1.31\build\net45\RGB.NET.Devices.Logitech.targets" Condition="Exists('..\packages\RGB.NET.Devices.Logitech.0.0.1.31\build\net45\RGB.NET.Devices.Logitech.targets')" />
|
<Import Project="..\packages\RGB.NET.Devices.Logitech.0.0.1.35\build\net45\RGB.NET.Devices.Logitech.targets" Condition="Exists('..\packages\RGB.NET.Devices.Logitech.0.0.1.35\build\net45\RGB.NET.Devices.Logitech.targets')" />
|
||||||
<Import Project="..\packages\RGB.NET.Devices.Msi.0.0.1.31\build\net45\RGB.NET.Devices.Msi.targets" Condition="Exists('..\packages\RGB.NET.Devices.Msi.0.0.1.31\build\net45\RGB.NET.Devices.Msi.targets')" />
|
<Import Project="..\packages\RGB.NET.Devices.Msi.0.0.1.35\build\net45\RGB.NET.Devices.Msi.targets" Condition="Exists('..\packages\RGB.NET.Devices.Msi.0.0.1.35\build\net45\RGB.NET.Devices.Msi.targets')" />
|
||||||
<Import Project="..\packages\RGB.NET.Devices.Razer.0.0.1.31\build\net45\RGB.NET.Devices.Razer.targets" Condition="Exists('..\packages\RGB.NET.Devices.Razer.0.0.1.31\build\net45\RGB.NET.Devices.Razer.targets')" />
|
<Import Project="..\packages\RGB.NET.Devices.Razer.0.0.1.35\build\net45\RGB.NET.Devices.Razer.targets" Condition="Exists('..\packages\RGB.NET.Devices.Razer.0.0.1.35\build\net45\RGB.NET.Devices.Razer.targets')" />
|
||||||
</Project>
|
</Project>
|
||||||
@ -25,6 +25,16 @@ namespace KeyboardAudioVisualizer.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool EnableAudioPrescale
|
||||||
|
{
|
||||||
|
get => ApplicationManager.Instance.Settings.EnableAudioPrescale;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ApplicationManager.Instance.Settings.EnableAudioPrescale = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public VisualizationType SelectedPrimaryVisualization
|
public VisualizationType SelectedPrimaryVisualization
|
||||||
{
|
{
|
||||||
get => ApplicationManager.Instance.Settings[VisualizationIndex.Primary].SelectedVisualization;
|
get => ApplicationManager.Instance.Settings[VisualizationIndex.Primary].SelectedVisualization;
|
||||||
|
|||||||
@ -57,7 +57,8 @@
|
|||||||
<AdornerDecorator>
|
<AdornerDecorator>
|
||||||
<DockPanel LastChildFill="{Binding Source={x:Static keyboardAudioVisualizer:ApplicationManager.Instance}, Path=Visualizations[(helper:VisualizationIndex)Primary], Converter={StaticResource VisualizationToLastChildFillConverter}}">
|
<DockPanel LastChildFill="{Binding Source={x:Static keyboardAudioVisualizer:ApplicationManager.Instance}, Path=Visualizations[(helper:VisualizationIndex)Primary], Converter={StaticResource VisualizationToLastChildFillConverter}}">
|
||||||
<GroupBox DockPanel.Dock="Top">
|
<GroupBox DockPanel.Dock="Top">
|
||||||
<controls:GradientEditor Gradient="{Binding Source={x:Static keyboardAudioVisualizer:ApplicationManager.Instance}, Path=Settings[(helper:VisualizationIndex)Primary].Gradient}" />
|
<controls:GradientEditor Gradient="{Binding Source={x:Static keyboardAudioVisualizer:ApplicationManager.Instance}, Path=Settings[(helper:VisualizationIndex)Primary].Gradient}"
|
||||||
|
ToolTip="Defines the gradient that's drawed on the device. Usage:
 Left click inside the preview to add a new stop.
 Left-click stop to change the color or move it.
 Right-click stop to remove it.
" />
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Margin="0,8,0,0" DockPanel.Dock="Top">
|
<GroupBox Margin="0,8,0,0" DockPanel.Dock="Top">
|
||||||
@ -189,6 +190,11 @@
|
|||||||
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." />
|
||||||
|
|
||||||
|
<Label controls:Form.IsLabel="True" Content="Fix Volume" />
|
||||||
|
<CheckBox VerticalAlignment="Center"
|
||||||
|
IsChecked="{Binding EnableAudioPrescale}"
|
||||||
|
ToolTip="Scales the audio signal inverse to the OS-master-volume.
This might (depending on the system) lead to decrased performance
 -> only activate it if you need it." />
|
||||||
|
|
||||||
<Label controls:Form.LineBreaks="1" controls:Form.IsLabel="True" Content="Devices:" />
|
<Label controls:Form.LineBreaks="1" controls:Form.IsLabel="True" Content="Devices:" />
|
||||||
</controls:Form>
|
</controls:Form>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@ -5,20 +5,20 @@
|
|||||||
<package id="HidSharp" version="1.5" targetFramework="net461" />
|
<package id="HidSharp" version="1.5" targetFramework="net461" />
|
||||||
<package id="MathNet.Numerics" version="3.20.2" targetFramework="net461" />
|
<package id="MathNet.Numerics" version="3.20.2" targetFramework="net461" />
|
||||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net461" />
|
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net461" />
|
||||||
<package id="RGB.NET" version="0.0.1.31" targetFramework="net461" />
|
<package id="RGB.NET" version="0.0.1.35" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Brushes" version="0.0.1.31" targetFramework="net461" />
|
<package id="RGB.NET.Brushes" version="0.0.1.35" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Core" version="0.0.1.31" targetFramework="net461" />
|
<package id="RGB.NET.Core" version="0.0.1.35" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Decorators" version="0.0.1.31" targetFramework="net461" />
|
<package id="RGB.NET.Decorators" version="0.0.1.35" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices" version="0.0.1.31" targetFramework="net461" />
|
<package id="RGB.NET.Devices" version="0.0.1.35" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices.Asus" version="0.0.1.31" targetFramework="net461" />
|
<package id="RGB.NET.Devices.Asus" version="0.0.1.35" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices.CoolerMaster" version="0.0.1.31" targetFramework="net461" />
|
<package id="RGB.NET.Devices.CoolerMaster" version="0.0.1.35" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices.Corsair" version="0.0.1.31" targetFramework="net461" />
|
<package id="RGB.NET.Devices.Corsair" version="0.0.1.35" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices.Logitech" version="0.0.1.31" targetFramework="net461" />
|
<package id="RGB.NET.Devices.Logitech" version="0.0.1.35" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices.Msi" version="0.0.1.31" targetFramework="net461" />
|
<package id="RGB.NET.Devices.Msi" version="0.0.1.35" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices.Novation" version="0.0.1.31" targetFramework="net461" />
|
<package id="RGB.NET.Devices.Novation" version="0.0.1.35" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Devices.Razer" version="0.0.1.31" targetFramework="net461" />
|
<package id="RGB.NET.Devices.Razer" version="0.0.1.35" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Groups" version="0.0.1.31" targetFramework="net461" />
|
<package id="RGB.NET.Groups" version="0.0.1.35" targetFramework="net461" />
|
||||||
<package id="RGB.NET.Presets" version="0.0.1.31" targetFramework="net461" />
|
<package id="RGB.NET.Presets" version="0.0.1.35" targetFramework="net461" />
|
||||||
<package id="Sanford.Multimedia.Midi" version="6.5.0" targetFramework="net461" />
|
<package id="Sanford.Multimedia.Midi" version="6.5.0" targetFramework="net461" />
|
||||||
<package id="System.ValueTuple" version="4.4.0" targetFramework="net461" />
|
<package id="System.ValueTuple" version="4.4.0" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
Loading…
x
Reference in New Issue
Block a user