cut down on the amount of logging we do for missing sounds

(unless verbose logging is turned on.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2378 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2003-04-05 03:38:41 +00:00
parent 34528419a0
commit 02081105c8
@@ -1,5 +1,5 @@
// //
// $Id: SoundManager.java,v 1.54 2003/04/04 22:34:59 ray Exp $ // $Id: SoundManager.java,v 1.55 2003/04/05 03:38:41 ray Exp $
package com.threerings.media.sound; package com.threerings.media.sound;
@@ -404,8 +404,10 @@ public class SoundManager
LineSpooler.play(stream, _clipVol, key); LineSpooler.play(stream, _clipVol, key);
} catch (IOException ioe) { } catch (IOException ioe) {
Log.warning("Error loading sound file [key=" + key + if (_verbose.getValue()) {
", e=" + ioe + "]."); Log.warning("Error loading sound file [key=" + key +
", e=" + ioe + "].");
}
} catch (UnsupportedAudioFileException uafe) { } catch (UnsupportedAudioFileException uafe) {
Log.warning("Unsupported sound format [key=" + key + ", e=" + Log.warning("Unsupported sound format [key=" + key + ", e=" +
@@ -764,26 +766,28 @@ public class SoundManager
try { try {
clipin = _rmgr.getResource(path); clipin = _rmgr.getResource(path);
} catch (FileNotFoundException fnfe2) { } catch (FileNotFoundException fnfe2) {
Log.warning("Could not locate sound data [bundle=" + bundle +
", path=" + path + "].");
// only play the default sound if we have verbose sound // only play the default sound if we have verbose sound
// debuggin turned on. // debuggin turned on.
if (_verbose.getValue() && _defaultClipPath != null) { if (_verbose.getValue()) {
try { Log.warning("Could not locate sound data [bundle=" +
clipin = _rmgr.getResource( bundle + ", path=" + path + "].");
_defaultClipBundle, _defaultClipPath); if (_defaultClipPath != null) {
} catch (FileNotFoundException fnfe3) {
try { try {
clipin = _rmgr.getResource(_defaultClipPath); clipin = _rmgr.getResource(
} catch (FileNotFoundException fnfe4) { _defaultClipBundle, _defaultClipPath);
Log.warning("Additionally, the default fallback " + } catch (FileNotFoundException fnfe3) {
"sound could not be located [bundle=" + try {
_defaultClipBundle + ", path=" + clipin = _rmgr.getResource(_defaultClipPath);
_defaultClipPath + "]."); } catch (FileNotFoundException fnfe4) {
Log.warning("Additionally, the default " +
"fallback sound could not be located " +
"[bundle=" + _defaultClipBundle +
", path=" + _defaultClipPath + "].");
}
} }
} else {
Log.warning("No fallback default sound specified!");
} }
} else {
Log.warning("No fallback default sound specified!");
} }
// if we couldn't load the default, rethrow // if we couldn't load the default, rethrow
if (clipin == null) { if (clipin == null) {