[TASK] Restrict most common Sound-Exception to DEBUG only.

This commit is contained in:
Jan Philipp Timme 2015-01-30 11:56:15 +01:00
parent bd9afc1f10
commit 37ef6c1389
1 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@ import javax.sound.sampled.Mixer;
import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.SourceDataLine;
import javax.sound.sampled.UnsupportedAudioFileException; import javax.sound.sampled.UnsupportedAudioFileException;
import de.teamteamteam.spacescooter.brain.GameConfig;
import de.teamteamteam.spacescooter.utility.Loader; import de.teamteamteam.spacescooter.utility.Loader;
/** /**
@ -125,7 +126,7 @@ public class SoundSystem {
} }
sourceDataLine.drain(); sourceDataLine.drain();
} catch (javax.sound.sampled.LineUnavailableException lue) { } 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) { } catch (InterruptedException ie) {
//Nothing to do here, just falling into finally block, so we can //Nothing to do here, just falling into finally block, so we can
//close the sourceDataLine without draining it. //close the sourceDataLine without draining it.