ibxm
Class Player

java.lang.Object
  extended by ibxm.Player

public class Player
extends Object


Constructor Summary
Player()
          Instantiate a new Player.
 
Method Summary
static Module load_module(InputStream input)
          Decode the data in the specified InputStream into a Module instance.
static void main(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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Player

public Player()
       throws LineUnavailableException
Instantiate a new Player.

Throws:
LineUnavailableException
Method Detail

main

public static void main(String[] args)
                 throws Exception
Simple command-line test player.

Throws:
Exception

load_module

public static Module load_module(InputStream input)
                          throws IllegalArgumentException,
                                 IOException
Decode the data in the specified InputStream into a Module instance.

Parameters:
input - an InputStream containing the module file to be decoded.
Throws:
IllegalArgumentException - if the data is not recognised as a module file.
IOException

set_module

public void set_module(Module m)
Set the Module instance to be played.


set_loop

public void set_loop(boolean loop)
If loop is true, playback will continue indefinitely, otherwise the module will play through once and stop.


play

public void play()
Open the audio device and begin playback. If a module is already playing it will be restarted.


stop

public void stop()
Stop playback and close the audio device.