|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vwp.sound.mod.modplay.Player
public class Player
This is an application's main interface with JMOD.
It contain methods for initalizing the player, loading, playing and closing a module. In addition
it has varius methods for getting and setting the most important parameters like volume,
balance and playing position. More fine grained control can be achieved by manipulating the
ModuleState
and Module
object
directly.
Constructor Summary | |
---|---|
Player()
|
Method Summary | |
---|---|
boolean |
close()
|
double |
getAmplification()
|
double |
getBalance()
|
double |
getDefaultAmplification()
get the default amplification. |
int |
getDivision()
|
Module |
getModule()
get the current module; |
ModuleState |
getModuleState()
get the state of the module. |
int |
getNote(int track)
|
int |
getPosition()
|
double |
getSeparation()
|
int |
getTick()
|
double |
getVolume()
|
boolean |
init(Output output,
boolean interpolate)
initialize the player |
boolean |
load(java.io.InputStream in,
java.lang.String name)
Load a module from a opened input stream |
boolean |
load(Module module)
Load a module |
boolean |
load(java.lang.String fileName)
Load a module from a file |
void |
mute(boolean[] mute)
|
void |
mute(int track,
boolean mute)
|
boolean |
play()
play a tick of the the module |
void |
setAmplification(double amp)
|
void |
setBalance(double balance)
|
void |
setPosition(int pos)
|
void |
setSeparation(double separation)
|
void |
setVolume(double volume)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Player()
Method Detail |
---|
public boolean init(Output output, boolean interpolate)
output
-
public boolean load(java.lang.String fileName) throws InvalidFormatException, java.io.IOException
fileName
- the file name of the module
InvalidFormatException
java.io.IOException
public boolean load(java.io.InputStream in, java.lang.String name) throws InvalidFormatException, java.io.IOException
in
- the opened InputStream of the modulename
- the name or URL of the module or the suffix of its name to
identify the format
InvalidFormatException
java.io.IOException
public boolean load(Module module)
module
- the module to load
public boolean play() throws PlayerException
PlayerException
public boolean close()
public ModuleState getModuleState()
public Module getModule()
public double getDefaultAmplification()
#tracks / 4
. This should maintain a reasonable volume when playing
modules with many channels while avoiding clipping in most cases. Note that for 4channel mods
this will result in an amplification of 1.
public void setAmplification(double amp)
public double getAmplification()
public void mute(int track, boolean mute)
public void mute(boolean[] mute)
public void setVolume(double volume)
public double getVolume()
public void setBalance(double balance)
public double getBalance()
public void setSeparation(double separation)
public double getSeparation()
public void setPosition(int pos)
public int getPosition()
public int getDivision()
public int getTick()
public int getNote(int track)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |