|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.vwp.sound.mod.modplay.player.DefaultMixer
public class DefaultMixer
This is the default mixer used by JMOD. For simplicity, it is hardcoded to produce 16 bits, 44100Hz samplerate, stereo sound. If lower quality is desired, downsampling must be done by the used output plugin.
| Constructor Summary | |
|---|---|
DefaultMixer(Output output,
java.lang.Class lowLevelMixerClass,
int numberOfTracks)
|
|
| 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]. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultMixer(Output output,
java.lang.Class lowLevelMixerClass,
int numberOfTracks)
output - the output plugin used by this mixerlowLevelMixerClass - class who implements the LowLevelMixer interfacenumberOfTracks - the number of tracks this mixer should be able to mix| Method Detail |
|---|
public void setTrack(short[] sampleData,
double offset,
double rate,
double volume,
double panning,
int loopType,
int loopStart,
int looplength,
int track)
throws PlayerException
Mixer
setTrack in interface MixersampleData - 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
PlayerExceptionpublic int getNumberOfTracks()
getNumberOfTracks in interface Mixerpublic void setAmplification(double amp)
Mixer
setAmplification in interface Mixeramp - amplificationpublic double getAmplification()
Mixer
getAmplification in interface Mixerpublic void setVolume(double volume)
Mixer
setVolume in interface Mixerpublic double getVolume()
getVolume in interface Mixerpublic void setBalance(double balance)
Mixer
setBalance in interface Mixerpublic double getBalance()
Mixer
getBalance in interface Mixerpublic void setSeparation(double separation)
Mixer
setSeparation in interface Mixerseparation - the separation of left and right channelpublic double getSeparation()
Mixer
getSeparation in interface Mixer
public void setMute(int track,
boolean mute)
Mixer
setMute in interface Mixermute - mute if true, unmute if falsepublic boolean isMute(int track)
isMute in interface Mixer
public void play(double millisecs)
throws PlayerException
Mixer
play in interface Mixermillisecs - the number of milliseconds of sound to play
PlayerException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||