public class Player
extends java.lang.Object
| Constructor and Description | 
|---|
Player()
Instantiate a new Player. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
static Module | 
load_module(java.io.InputStream input)
Decode the data in the specified InputStream into a Module instance. 
 | 
static void | 
main(java.lang.String[] args)
Simple command-line test player. 
 | 
void | 
play()
Open the audio device and begin playback. 
 | 
void | 
set_loop(boolean loop)
If loop is true, playback will continue indefinitely,
                otherwise the module will play through once and stop. 
 | 
void | 
set_module(Module m)
Set the Module instance to be played. 
 | 
void | 
stop()
Stop playback and close the audio device. 
 | 
public Player()
       throws javax.sound.sampled.LineUnavailableException
javax.sound.sampled.LineUnavailableExceptionpublic static void main(java.lang.String[] args)
                 throws java.lang.Exception
java.lang.Exceptionpublic static Module load_module(java.io.InputStream input) throws java.lang.IllegalArgumentException, java.io.IOException
input - an InputStream containing the module file to be decoded.java.lang.IllegalArgumentException - if the data is not recognised as a module file.java.io.IOExceptionpublic void set_module(Module m)
public void set_loop(boolean loop)
public void play()
public void stop()