[chronojump] Fixing sound on OSX
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixing sound on OSX
- Date: Wed, 2 Mar 2016 12:26:42 +0000 (UTC)
commit f2c44064e036c6844db99a22b5a9eab023f41727
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Mar 2 13:23:49 2016 +0100
Fixing sound on OSX
src/chronojump.cs | 6 ++++++
src/util.cs | 9 ++++-----
2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/chronojump.cs b/src/chronojump.cs
index dff68f3..c7fc943 100644
--- a/src/chronojump.cs
+++ b/src/chronojump.cs
@@ -111,6 +111,12 @@ public class ChronoJump
LogB.Information("environments");
LogB.Information(Environment.GetEnvironmentVariable("R_HOME"));
LogB.Information(Environment.GetEnvironmentVariable("PATH"));
+
+ //Gstreamer stuff
+ string prefix="/Applications/Chronojump.app/Contents/Home/";
+ Environment.SetEnvironmentVariable ("GST_PLUGIN_PATH", prefix +
"lib/gstreamer-0.10");
+ Environment.SetEnvironmentVariable ("GST_PLUGIN_SYSTEM_PATH", prefix
+ "lib/gstreamer-0.10");
+ Environment.SetEnvironmentVariable ("GST_PLUGIN_SCANNER_PATH", prefix
+ "lib/gstreamer-0.10/gst-plugin-scanner");
break;
case UtilAll.OperatingSystems.LINUX:
rBinPath = @"/usr/lib/R/lib";
diff --git a/src/util.cs b/src/util.cs
index 0931de2..1df50a9 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -1185,11 +1185,10 @@ public class Util
* and some MacOSX users have 300% CPU
*/
- //if( UtilAll.GetOSEnum() == UtilAll.OperatingSystems.LINUX ||
- // UtilAll.GetOSEnum() == UtilAll.OperatingSystems.MACOSX )
- if( UtilAll.GetOSEnum() == UtilAll.OperatingSystems.LINUX )
+ if( UtilAll.GetOSEnum() == UtilAll.OperatingSystems.LINUX ||
+ UtilAll.GetOSEnum() == UtilAll.OperatingSystems.MACOSX )
playSoundGstreamer(mySound);
- else //Windows //or mac experimental
+ else //Windows
playSoundWindows(mySound);
}
@@ -1226,7 +1225,7 @@ public class Util
string pBin="gst-launch-0.10";
pinfo.FileName=pBin;
- pinfo.Arguments = "playbin " + @"uri=file://" + fileName;
+ pinfo.Arguments = "playbin2 " + @"uri=file://" + fileName;
LogB.Information("Arguments:", pinfo.Arguments);
pinfo.CreateNoWindow = true;
pinfo.UseShellExecute = false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]