- new sound loading jimmy where a package path and key specify a set of

sounds.
- added test sound directory setting.
- mp3 player needs more fixing, but allow some volume adjustment.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1990 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2002-11-26 02:39:40 +00:00
parent 371ca60bf5
commit 917ba53c59
6 changed files with 170 additions and 74 deletions
@@ -1,9 +1,9 @@
//
// $Id: MusicPlayer.java,v 1.2 2002/11/22 19:21:12 ray Exp $
// $Id: MusicPlayer.java,v 1.3 2002/11/26 02:39:40 ray Exp $
package com.threerings.media;
import com.threerings.resource.ResourceManager;
import java.io.InputStream;
/**
* Abstract music player.
@@ -25,11 +25,9 @@ public abstract class MusicPlayer
/**
* Initialize the music player.
*/
public final void init (
ResourceManager rmgr, MusicEventListener musicListener)
public final void init (MusicEventListener musicListener)
throws Exception
{
_rmgr = rmgr;
_musicListener = musicListener;
init();
@@ -51,9 +49,9 @@ public abstract class MusicPlayer
}
/**
* Start playing the specified song.
* Start playing song data from the specified stream.
*/
public abstract void start (String set, String path)
public abstract void start (InputStream stream)
throws Exception;
/**
@@ -68,9 +66,6 @@ public abstract class MusicPlayer
*/
public abstract void setVolume (float volume);
/** The place we load data from. */
protected ResourceManager _rmgr;
/** Tell this guy about it when a song stops. */
protected MusicEventListener _musicListener;
}