Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,18 @@
<swt.artifactId>org.eclipse.swt.gtk.linux.x86</swt.artifactId>
</properties>
</profile>
<profile>
<id>Linux.x86_64</id>
<activation>
<os>
<family>Linux</family>
<arch>amd64</arch>
</os>
</activation>
<properties>
<swt.artifactId>org.eclipse.swt.gtk.linux.x86_64</swt.artifactId>
</properties>
</profile>
<profile>
<id>mac.x86_64</id>
<activation>
Expand Down Expand Up @@ -188,8 +200,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/org/guideme/guideme/MainLogic.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package org.guideme.guideme;

import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.FloatControl;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.UnsupportedAudioFileException;
Expand Down Expand Up @@ -48,15 +50,18 @@ private MainLogic() {
public static synchronized MainLogic getMainLogic() {
if (mainLogic == null) {
mainLogic = new MainLogic();
songPath = MainLogic.class.getClassLoader().getResource("tick.wav");
songPath = MainLogic.class.getResource("/tick.wav");
logger.info("MainLogic getMainLogic songPath " + songPath);
AudioInputStream audioIn;
try {
audioIn = AudioSystem.getAudioInputStream(songPath);
AudioFormat format = audioIn.getFormat();
song = AudioSystem.getClip();
DataLine.Info info = new DataLine.Info(Clip.class, format);
song = (Clip) AudioSystem.getLine(info);
song.open(audioIn);
FloatControl gainControl = (FloatControl) song.getControl(FloatControl.Type.MASTER_GAIN);
gainControl.setValue(-35.0f);
//FloatControl gainControl = (FloatControl) song.getControl(FloatControl.Type.MASTER_GAIN); //This does'nt work under Linux
//gainControl.setValue(-35.0f);
} catch (UnsupportedAudioFileException e) {
logger.error("audio clip Exception ", e);
} catch (IOException e) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/guideme/guideme/ui/MainShell.java
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public Shell createShell(final Display display) {

//defaultStyle
try {
defaultStyle = comonFunctions.readFile("./defaultCSS.txt", StandardCharsets.UTF_8);
defaultStyle = comonFunctions.readFile("./defaultCSS.TXT", StandardCharsets.UTF_8); //Because Linux is case sensitive !
defaultStyle = defaultStyle.replace("MintHtmlFontSize", String.valueOf(MintHtmlFontSize));
}
catch (Exception ex2) {
Expand Down