Task 1 - minor

This commit is contained in:
Daniel Langbein 2025-01-23 14:28:27 +01:00
parent 2cd827bdab
commit ce055e4377
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
2 changed files with 4 additions and 1 deletions

View File

@ -31,6 +31,7 @@ public class SoundJLayerBridge extends PlaybackListener implements Runnable, Sou
/**
* Play the target sound
*/
@Override
public void play() {
try {
String urlAsString = "file:///"
@ -55,6 +56,7 @@ public class SoundJLayerBridge extends PlaybackListener implements Runnable, Sou
/**
* Stops the target sound
*/
@Override
public void stop() {
try {
this.playerThread.stop();
@ -66,6 +68,7 @@ public class SoundJLayerBridge extends PlaybackListener implements Runnable, Sou
/**
* Runs the player thread
*/
@Override
public void run() {
try {
this.player.play();

View File

@ -18,7 +18,7 @@ import java.util.HashMap;
public class AudioLoadHelper {
private static String pathToAudioStore = "./res/audio";
private SoundBridgeFactory soundBridgeFactory;
private final SoundBridgeFactory soundBridgeFactory;
private SoundBridge musicToPlay;
private HashMap<String, SoundBridge> preloadedSounds;