examples.cli
Class SimplePlayer

java.lang.Object
  extended by examples.cli.SimplePlayer

public class SimplePlayer
extends java.lang.Object

This example demonstrates how a module player can be created in the least possible amount of code.


Field Summary
static int BITS
          use 16 bit playback
static int BUFFERSIZE
          use an output buffer with space for half a second of audio data.
static int CHANNELS
          play in stereo
static boolean INTERPOLATE
          use interpolated mixing
static int RATE
          use a playback rate of 44100 samples per second
 
Constructor Summary
SimplePlayer()
           
 
Method Summary
static void main(java.lang.String[] args)
          main method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BITS

public static final int BITS
use 16 bit playback

See Also:
Constant Field Values

RATE

public static final int RATE
use a playback rate of 44100 samples per second

See Also:
Constant Field Values

CHANNELS

public static final int CHANNELS
play in stereo

See Also:
Constant Field Values

INTERPOLATE

public static final boolean INTERPOLATE
use interpolated mixing

See Also:
Constant Field Values

BUFFERSIZE

public static final int BUFFERSIZE
use an output buffer with space for half a second of audio data. An output buffer is necessary to avoid stuttering if your maching gets busy doing something else for a while. The larger the output buffer the less is the chance of stuttering.

See Also:
Constant Field Values
Constructor Detail

SimplePlayer

public SimplePlayer()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
main method. The player is expecting to be invoked with one argument on the command line, the filename of the module to play

Parameters:
args -
Throws:
java.lang.Exception