Initial primitive sound manager that provides facilities for >gasp<
playing sounds. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1611 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// $Id: SoundTestApp.java,v 1.1 2002/07/24 21:28:10 shaper Exp $
|
||||
|
||||
package com.threerings.media;
|
||||
|
||||
import com.samskivert.util.StringUtil;
|
||||
import com.threerings.resource.ResourceManager;
|
||||
import com.threerings.media.Log;
|
||||
|
||||
public class SoundTestApp
|
||||
{
|
||||
public SoundTestApp (String[] args)
|
||||
{
|
||||
if (args.length == 0) {
|
||||
Log.info("Usage: runjava com.threerings.media.SoundTestApp " +
|
||||
"<file1> [<file2> <file3> ...]");
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
ResourceManager rmgr = new ResourceManager("rsrc");
|
||||
_soundmgr = new SoundManager(rmgr);
|
||||
_files = args;
|
||||
}
|
||||
|
||||
public void run ()
|
||||
{
|
||||
for (int ii = 0; ii < _files.length; ii++) {
|
||||
_soundmgr.play(_files[ii]);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main (String[] args)
|
||||
{
|
||||
SoundTestApp app = new SoundTestApp(args);
|
||||
app.run();
|
||||
}
|
||||
|
||||
protected String[] _files;
|
||||
protected SoundManager _soundmgr;
|
||||
}
|
||||
Reference in New Issue
Block a user