Skip to content

Commit

Permalink
Auf sqlite abgeändert
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDrache333 committed Aug 9, 2020
1 parent 3175097 commit 0537f50
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import javax.sound.sampled.*;
import java.io.BufferedInputStream;
import java.io.File;
import java.util.ArrayList;
import java.util.Objects;

/**
* Die Klasse SoundMediaPlayer.
Expand Down Expand Up @@ -75,9 +75,9 @@ public void play() {
if (soundEnabled)
Platform.runLater(() -> {
try {

//Sound laden
AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File(getClass().getResource(sound.getPath()).toExternalForm().replace("file:", ""))); //Sound als Stream oeffnen
AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(
new BufferedInputStream((Objects.requireNonNull(getClass().getClassLoader().getResourceAsStream(sound.path))))); //Sound als Stream oeffnen
BufferedInputStream bufferedInputStream = new BufferedInputStream(audioInputStream); //Stream Buffer erstellen
AudioFormat af = audioInputStream.getFormat(); //AudioFormat laden
int size = (int) (af.getFrameSize() * audioInputStream.getFrameLength()); //Sounddatenlaenge bestimmen
Expand Down Expand Up @@ -207,32 +207,32 @@ public enum Sound {
/**
* Intro sound.
*/
Intro("/music/intro.wav"),
Intro("music/intro.wav"),

/**
* Button hover sound.
*/
Button_Hover("/sounds/button_mouseover.wav"),
Button_Hover("sounds/button_mouseover.wav"),

/**
* Button pressed sound.
*/
Button_Pressed("/sounds/button_pressed.wav"),
Button_Pressed("sounds/button_pressed.wav"),

/**
* Window opened sound.
*/
Window_Opened("/sounds/window_opened.wav"),
Window_Opened("sounds/window_opened.wav"),

/**
* Message send sound.
*/
Message_Send("/sounds/message_send.wav"),
Message_Send("sounds/message_send.wav"),

/**
* Message receive sound.
*/
Message_Receive("/sounds/message_receive.wav");
Message_Receive("sounds/message_receive.wav");

private final String path;

Expand Down
6 changes: 3 additions & 3 deletions Server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client-jre7</artifactId>
<version>1.6.1</version>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.30.1</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
Expand Down
Binary file removed Server/src/main/resources/lib/sqlite-jdbc-3.30.1.jar
Binary file not shown.

0 comments on commit 0537f50

Please sign in to comment.