diff --git a/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudio.cs b/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudio.cs index e4cea03a..fceb8227 100644 --- a/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudio.cs +++ b/Vocaluxe/Lib/Sound/Playback/GstreamerSharp/CGstreamerSharpAudio.cs @@ -18,6 +18,7 @@ using Gst; using System; using Vocaluxe.Base; +using System.IO; namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp { @@ -35,12 +36,26 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp const string varName = "GSTREAMER_1_0_ROOT_X86_64"; #endif string gstreamerEnvVar = Environment.GetEnvironmentVariable(varName, EnvironmentVariableTarget.User); + string dllDirectory; if (gstreamerEnvVar == null) { - CLog.LogError("Gstreamer not found! Make sure you installed it correctly and if it set the environment variable '" + varName + "'!", true); - return false; +#if ARCH_X86 + dllDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "gstreamer86\\bin\\"); +#endif +#if ARCH_X64 + dllDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "gstreamer64\\bin\\"); +#endif + if (!Directory.Exists(dllDirectory)) + { + CLog.LogError("Gstreamer not found! Make sure you installed it correctly and if it set the environment variable '" + varName + "'!", true); + return false; + } } - string dllDirectory = gstreamerEnvVar + "bin\\"; + else + { + dllDirectory = gstreamerEnvVar + "bin\\"; + } + COSFunctions.AddEnvironmentPath(dllDirectory); #endif Application.Init(); diff --git a/Vocaluxe/Vocaluxe.csproj b/Vocaluxe/Vocaluxe.csproj index ec854b84..159780b1 100644 --- a/Vocaluxe/Vocaluxe.csproj +++ b/Vocaluxe/Vocaluxe.csproj @@ -31,7 +31,7 @@ 1.0.0.%2a false true - 82574e3f + 561bc599 x86 @@ -578,6 +578,7 @@ powershell -command "(Get-Content -Encoding UTF8 '$(ProjectDir)Properties\Assemb + @@ -590,4 +591,5 @@ powershell -command "(Get-Content -Encoding UTF8 '$(ProjectDir)Properties\Assemb + \ No newline at end of file diff --git a/Vocaluxe/packages.config b/Vocaluxe/packages.config index e0fc1921..40545caa 100644 --- a/Vocaluxe/packages.config +++ b/Vocaluxe/packages.config @@ -7,6 +7,7 @@ +