From 37ef6c1389701a565ae16b3009334d91bee85524 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Fri, 30 Jan 2015 11:56:15 +0100 Subject: [PATCH] [TASK] Restrict most common Sound-Exception to DEBUG only. --- src/de/teamteamteam/spacescooter/sound/SoundSystem.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/teamteamteam/spacescooter/sound/SoundSystem.java b/src/de/teamteamteam/spacescooter/sound/SoundSystem.java index e09c08c..84af3b7 100644 --- a/src/de/teamteamteam/spacescooter/sound/SoundSystem.java +++ b/src/de/teamteamteam/spacescooter/sound/SoundSystem.java @@ -16,6 +16,7 @@ import javax.sound.sampled.Mixer; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.UnsupportedAudioFileException; +import de.teamteamteam.spacescooter.brain.GameConfig; import de.teamteamteam.spacescooter.utility.Loader; /** @@ -125,7 +126,7 @@ public class SoundSystem { } sourceDataLine.drain(); } catch (javax.sound.sampled.LineUnavailableException lue) { - System.err.println("Could not play sound: " + fSoundURL); + if(GameConfig.DEBUG) System.err.println("Could not play sound: " + fSoundURL); } catch (InterruptedException ie) { //Nothing to do here, just falling into finally block, so we can //close the sourceDataLine without draining it.