diff --git a/starcitizen/App.config b/starcitizen/App.config
index f42eca7..0c4febb 100644
--- a/starcitizen/App.config
+++ b/starcitizen/App.config
@@ -8,7 +8,7 @@
-
+
@@ -22,6 +22,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/starcitizen/Audio/AudioPlaybackEngine .cs b/starcitizen/Audio/AudioPlaybackEngine .cs
index 818617c..b6edecb 100644
--- a/starcitizen/Audio/AudioPlaybackEngine .cs
+++ b/starcitizen/Audio/AudioPlaybackEngine .cs
@@ -13,6 +13,10 @@ class AudioPlaybackEngine : IDisposable
private readonly IWavePlayer outputDevice;
private readonly MixingSampleProvider mixer;
+ private static AudioPlaybackEngine _instance = null;
+
+ public static AudioPlaybackEngine Instance => _instance ?? (_instance = new AudioPlaybackEngine(44100, 2));
+
public AudioPlaybackEngine(int sampleRate = 44100, int channelCount = 2)
{
outputDevice = new WaveOutEvent();
@@ -56,6 +60,5 @@ public void Dispose()
outputDevice.Dispose();
}
- public static readonly AudioPlaybackEngine Instance = new AudioPlaybackEngine(44100, 2);
- }
+ }
}
diff --git a/starcitizen/Audio/AutoDisposeFileReader.cs b/starcitizen/Audio/AutoDisposeFileReader.cs
index 4046888..3c123c0 100644
--- a/starcitizen/Audio/AutoDisposeFileReader.cs
+++ b/starcitizen/Audio/AutoDisposeFileReader.cs
@@ -7,14 +7,14 @@
namespace starcitizen
{
- class AutoDisposeFileReader : ISampleProvider
+ public class AutoDisposeFileReader : ISampleProvider
{
- private readonly AudioFileReader reader;
+ private readonly ISampleProvider reader;
private bool isDisposed;
- public AutoDisposeFileReader(AudioFileReader reader)
+ public AutoDisposeFileReader(ISampleProvider reader)
{
this.reader = reader;
- this.WaveFormat = reader.WaveFormat;
+ WaveFormat = reader.WaveFormat;
}
public int Read(float[] buffer, int offset, int count)
@@ -24,12 +24,15 @@ public int Read(float[] buffer, int offset, int count)
int read = reader.Read(buffer, offset, count);
if (read == 0)
{
- reader.Dispose();
+ if (reader is IDisposable d)
+ {
+ d.Dispose();
+ }
isDisposed = true;
}
return read;
}
- public WaveFormat WaveFormat { get; private set; }
+ public WaveFormat WaveFormat { get; }
}
}
diff --git a/starcitizen/Audio/CachedSoundSampleProvider.cs b/starcitizen/Audio/CachedSoundSampleProvider.cs
index 092150f..ab41171 100644
--- a/starcitizen/Audio/CachedSoundSampleProvider.cs
+++ b/starcitizen/Audio/CachedSoundSampleProvider.cs
@@ -26,6 +26,7 @@ public int Read(float[] buffer, int offset, int count)
return (int)samplesToCopy;
}
- public WaveFormat WaveFormat { get { return cachedSound.WaveFormat; } }
+ public WaveFormat WaveFormat => cachedSound.WaveFormat;
+
}
}
diff --git a/starcitizen/Properties/AssemblyInfo.cs b/starcitizen/Properties/AssemblyInfo.cs
index db1dde1..fc2370b 100644
--- a/starcitizen/Properties/AssemblyInfo.cs
+++ b/starcitizen/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.8.0")]
-[assembly: AssemblyFileVersion("1.0.8.0")]
+[assembly: AssemblyVersion("1.0.9.0")]
+[assembly: AssemblyFileVersion("1.0.9.0")]
diff --git a/starcitizen/manifest.json b/starcitizen/manifest.json
index 3ff60c6..ee31160 100644
--- a/starcitizen/manifest.json
+++ b/starcitizen/manifest.json
@@ -36,7 +36,7 @@
"Name": "Star Citizen",
"Icon": "Images/pluginIcon",
"URL": "https://github.com/mhwlng/streamdeck-starcitizen",
- "Version": "1.0.8",
+ "Version": "1.0.9",
"CodePath": "com.mhwlng.starcitizen",
"Category": "Star Citizen",
"CategoryIcon": "Images/categoryIcon",
diff --git a/starcitizen/packages.config b/starcitizen/packages.config
index da5826b..39892d5 100644
--- a/starcitizen/packages.config
+++ b/starcitizen/packages.config
@@ -1,28 +1,28 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
\ No newline at end of file
diff --git a/starcitizen/starcitizen.csproj b/starcitizen/starcitizen.csproj
index 07c91de..663d7f7 100644
--- a/starcitizen/starcitizen.csproj
+++ b/starcitizen/starcitizen.csproj
@@ -59,38 +59,38 @@
OnOutputUpdated
-
- ..\packages\CommandLineParser.2.8.0\lib\net461\CommandLine.dll
+
+ ..\packages\CommandLineParser.2.9.1\lib\net461\CommandLine.dll
..\packages\Microsoft.Win32.Registry.5.0.0\lib\net461\Microsoft.Win32.Registry.dll
-
- ..\packages\NAudio.2.0.1\lib\netstandard2.0\NAudio.dll
+
+ ..\packages\NAudio.2.1.0\lib\net472\NAudio.dll
-
- ..\packages\NAudio.Asio.2.0.0\lib\netstandard2.0\NAudio.Asio.dll
+
+ ..\packages\NAudio.Asio.2.1.0\lib\netstandard2.0\NAudio.Asio.dll
-
- ..\packages\NAudio.Core.2.0.0\lib\netstandard2.0\NAudio.Core.dll
+
+ ..\packages\NAudio.Core.2.1.0\lib\netstandard2.0\NAudio.Core.dll
-
- ..\packages\NAudio.Midi.2.0.1\lib\netstandard2.0\NAudio.Midi.dll
+
+ ..\packages\NAudio.Midi.2.1.0\lib\netstandard2.0\NAudio.Midi.dll
-
- ..\packages\NAudio.Wasapi.2.0.0\lib\netstandard2.0\NAudio.Wasapi.dll
+
+ ..\packages\NAudio.Wasapi.2.1.0\lib\netstandard2.0\NAudio.Wasapi.dll
-
- ..\packages\NAudio.WinForms.2.0.1\lib\net472\NAudio.WinForms.dll
+
+ ..\packages\NAudio.WinForms.2.1.0\lib\net472\NAudio.WinForms.dll
-
- ..\packages\NAudio.WinMM.2.0.1\lib\netstandard2.0\NAudio.WinMM.dll
+
+ ..\packages\NAudio.WinMM.2.1.0\lib\netstandard2.0\NAudio.WinMM.dll
- ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll
+ ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll
-
- ..\packages\NLog.4.7.15\lib\net45\NLog.dll
+
+ ..\packages\NLog.5.1.0\lib\net46\NLog.dll
..\packages\streamdeck-client-csharp.4.3.0\lib\netstandard2.0\streamdeck-client-csharp.dll
@@ -110,16 +110,16 @@
-
- ..\packages\System.Drawing.Common.6.0.0\lib\net461\System.Drawing.Common.dll
+
+ ..\packages\System.Drawing.Common.7.0.0\lib\net462\System.Drawing.Common.dll
-
- ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll
+
+ ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll
-
- ..\packages\Microsoft.AspNet.WebApi.Client.5.2.8\lib\net45\System.Net.Http.Formatting.dll
+
+ ..\packages\Microsoft.AspNet.WebApi.Client.5.2.9\lib\net45\System.Net.Http.Formatting.dll
@@ -133,8 +133,8 @@
..\packages\System.Security.AccessControl.6.0.0\lib\net461\System.Security.AccessControl.dll
-
- ..\packages\System.Security.Permissions.6.0.0\lib\net461\System.Security.Permissions.dll
+
+ ..\packages\System.Security.Permissions.7.0.0\lib\net462\System.Security.Permissions.dll
..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll