Javadoc for slick-ibxm 0

ibxm
Class OpenALMODPlayer

java.lang.Object
  extended by ibxm.OpenALMODPlayer

public class OpenALMODPlayer
extends java.lang.Object

A streaming mod/xm play back system

Author:
Kevin Glass

Constructor Summary
OpenALMODPlayer()
           
 
Method Summary
 boolean done()
          Check if the playback is complete.
 void init()
          Initialise OpenAL LWJGL styley
static Module loadModule(java.io.InputStream in)
          Load a module using the IBXM
 void play(java.io.InputStream in, boolean loop, boolean start)
          Play a mod or xm track streamed from the specified location
 void play(int source, java.io.InputStream in, boolean loop, boolean start)
          Play a mod or xm track streamed from the specified location
 void play(Module module, int source, boolean loop, boolean start)
          Play a mod or xm track streamed from the specified location
 void setup(float pitch, float gain)
          Setup the playback properties
 boolean stream(int bufferId)
          Stream one section from the mod/xm into an OpenAL buffer
 void update()
          Poll the bufferNames - check if we need to fill the bufferNames with another section.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenALMODPlayer

public OpenALMODPlayer()
Method Detail

init

public void init()
Initialise OpenAL LWJGL styley


play

public void play(java.io.InputStream in,
                 boolean loop,
                 boolean start)
          throws java.io.IOException
Play a mod or xm track streamed from the specified location

Parameters:
in - The input stream to read the music from
loop - True if the track should be looped
start - True if the music should be started
Throws:
java.io.IOException - The input stream to read the music from

play

public void play(int source,
                 java.io.InputStream in,
                 boolean loop,
                 boolean start)
          throws java.io.IOException
Play a mod or xm track streamed from the specified location

Parameters:
source - The OpenAL source to play the music on
in - The input stream to read the music from
loop - True if the track should be looped
start - True if the music should be started
Throws:
java.io.IOException - The input stream to read the music from

play

public void play(Module module,
                 int source,
                 boolean loop,
                 boolean start)
Play a mod or xm track streamed from the specified location

Parameters:
module - The moudle to play back
source - The OpenAL source to play the music on
start - True if the music should be started
loop - True if the track should be looped

setup

public void setup(float pitch,
                  float gain)
Setup the playback properties

Parameters:
pitch - The pitch to play back at
gain - The volume to play back at

done

public boolean done()
Check if the playback is complete. Note this will never return true if we're looping

Returns:
True if we're looping

loadModule

public static Module loadModule(java.io.InputStream in)
                         throws java.io.IOException
Load a module using the IBXM

Parameters:
in - The input stream to read the module from
Returns:
The module loaded
Throws:
java.io.IOException - Indicates a failure to access the module

update

public void update()
Poll the bufferNames - check if we need to fill the bufferNames with another section. Most of the time this should be reasonably quick


stream

public boolean stream(int bufferId)
Stream one section from the mod/xm into an OpenAL buffer

Parameters:
bufferId - The ID of the buffer to fill
Returns:
True if another section was available

Javadoc for slick-ibxm 0