From 46b8aace97814613cc682485115db646b0beabe2 Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Tue, 8 Apr 2003 20:30:44 +0000 Subject: [PATCH] Don't log a bunch of crap for sounds that are missing during a LOCK unless verbose logging is turned on. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2392 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/media/sound/SoundManager.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/java/com/threerings/media/sound/SoundManager.java b/src/java/com/threerings/media/sound/SoundManager.java index 1c99ec8f1..b767ca4fb 100644 --- a/src/java/com/threerings/media/sound/SoundManager.java +++ b/src/java/com/threerings/media/sound/SoundManager.java @@ -1,5 +1,5 @@ // -// $Id: SoundManager.java,v 1.59 2003/04/08 01:46:16 ray Exp $ +// $Id: SoundManager.java,v 1.60 2003/04/08 20:30:44 ray Exp $ package com.threerings.media.sound; @@ -143,9 +143,17 @@ public class SoundManager } else if (LOCK == command) { if (!isTesting()) { - getClipData(key); // preload - // copy the cached sound into the lock map - _lockedClips.put(key, _clipCache.get(key)); + try { + getClipData(key); // preload + // copy the cached sound into the lock map + _lockedClips.put(key, _clipCache.get(key)); + } catch (Exception e) { + // don't whine about LOCK failures + // unless we have verbose logging on. + if (_verbose.getValue()) { + throw e; + } + } } } else if (UNLOCK == command) {