|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Mixer
By implementing this interface it's possible to use a different mixer than the default. A mixer mixes sound from a set of tracks (channels). Use setTrack to initialize a track. The mixer is free to handle output anyway it likes, but it's a good idea to use one of the supplied output plugins form com.vwp.sound.mod.modplay.output.
Method Summary | |
---|---|
double |
getAmplification()
get the amplification |
double |
getBalance()
get the balance |
int |
getNumberOfTracks()
|
double |
getSeparation()
get the channel separation |
double |
getVolume()
|
boolean |
isMute(int track)
|
void |
play(double millisecs)
mix and play the indicated number of millisecounds of sound |
void |
setAmplification(double amp)
sets the amplification The legal values are [0-inf]. |
void |
setBalance(double balance)
sets the balance The legal values are [0-1]. |
void |
setMute(int track,
boolean mute)
mutes a track |
void |
setSeparation(double separation)
sets the channel separation The legal values are [0-1]. |
void |
setTrack(short[] sampleData,
double offset,
double rate,
double volume,
double panning,
int loopType,
int loopStart,
int loopLength,
int track)
set up a track. |
void |
setVolume(double volume)
sets the volume The legal values are [0-1]. |
Method Detail |
---|
void setTrack(short[] sampleData, double offset, double rate, double volume, double panning, int loopType, int loopStart, int loopLength, int track) throws PlayerException
sampleData
- the data of the sample that should be playedoffset
- the offset from where the sample should start playingrate
- the rate the sample should be played atvolume
- the volume of the samplepanning
- the panning of the sampleloopType
- what kind of looping (if any) should be done on this sampleloopStart
- the start of the looploopLength
- the lenght of the looptrack
- the track there this sample should be played
PlayerException
void play(double millisecs) throws PlayerException
millisecs
- the number of milliseconds of sound to play
PlayerException
int getNumberOfTracks()
void setAmplification(double amp)
amp
- amplificationdouble getAmplification()
void setVolume(double volume)
volume
- double getVolume()
void setBalance(double balance)
balance
- double getBalance()
void setSeparation(double separation)
separation
- the separation of left and right channeldouble getSeparation()
void setMute(int track, boolean mute)
mute
- mute if true, unmute if falseboolean isMute(int track)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |