Added a runtime adjust for verbose logging of sound playing

(useful when working with testsounds).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2318 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2003-03-23 04:10:50 +00:00
parent dec635a9a4
commit 153ed8d1b9
@@ -1,5 +1,5 @@
//
// $Id: SoundManager.java,v 1.51 2003/03/22 18:14:00 ray Exp $
// $Id: SoundManager.java,v 1.52 2003/03/23 04:10:50 ray Exp $
package com.threerings.media.sound;
@@ -325,7 +325,11 @@ public class SoundManager
synchronized (_queue) {
SoundKey skey = new SoundKey(pkgPath, key);
if (_queue.size() < MAX_QUEUE_SIZE) {
Log.debug("play requested [key=" + skey + "].");
/*
if (_verbose.getValue()) {
Log.info("Sound request [key=" + skey + "].");
}
*/
_queue.append(PLAY);
_queue.append(skey);
@@ -944,7 +948,9 @@ public class SoundManager
int count = 0;
byte[] data = new byte[BUFFER_SIZE];
Log.debug("play happening [key=" + _key.key + "].");
if (_verbose.getValue()) {
Log.info("Sound playing [key=" + _key.key + "].");
}
while (_valid && count != -1) {
try {
count = _stream.read(data, 0, data.length);
@@ -1135,6 +1141,11 @@ public class SoundManager
"Sound output buffer size", "narya.media.sound.outbufsize",
MediaPrefs.config, 8192);
protected static RuntimeAdjust.BooleanAdjust _verbose =
new RuntimeAdjust.BooleanAdjust(
"Verbose sound event logging", "narya.media.sound.verbose",
MediaPrefs.config, false);
/** Music action constants. */
protected static final int NONE = 0;
protected static final int START = 1;