|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectquentinc.audio.Channel
quentinc.audio.ChannelGroup
quentinc.audio.AudioManager
public class AudioManager
Main class of the system. Provide basic services related to the API.
| Constructor Summary | |
|---|---|
AudioManager()
Default constructor. |
|
AudioManager(int sampleRate,
float bufferMs)
Create a new AudioManager on system's default sound card with specified rendering sample rate and internal buffer size expressed in seconds. |
|
AudioManager(javax.sound.sampled.Mixer.Info mixerInfo,
int sampleRate,
float bufferMs)
Create a new AudioManager on the specified sound card, with sample rate and buffer size given. |
|
| Method Summary | |
|---|---|
void |
close()
Close the audio manager and release all associated resources |
DistanceModel |
getDistanceModel()
Get the distance model |
Vector |
getListenerOrientation()
Get the orientation of the listener. |
Vector |
getListenerPosition()
Get the position of the listener in the world space |
Vector |
getListenerUpwards()
Get the up vector. |
SpatializationModel |
getSpatializationModel()
Get the spatialisation model |
Sample |
loadSample(java.io.File f)
Load a sample from a file |
Sample |
loadSample(java.io.InputStream in)
Load a sample from an InputStream |
Sample |
loadSample(java.io.InputStream in,
javax.sound.sampled.AudioFormat fmt,
int length)
Load a sample from an InputStream, with format and length given |
Sample |
loadSample(short[] data,
int sampleRate,
boolean stereo)
Load a sample from raw data, with sample rate and mono/stereo mode given. |
Sample |
loadSample(java.net.URL u)
Load a sample from an URL |
Stream |
loadStream(java.io.File f)
Load a stream from a file |
Stream |
loadStream(java.io.InputStream in)
Load a stream from an InputStream |
Stream |
loadStream(java.io.InputStream in,
javax.sound.sampled.AudioFormat fmt)
Load a stream from an InputStream, with format given. |
Stream |
loadStream(java.io.InputStream in,
javax.sound.sampled.AudioFormat fmt,
int length)
Load a stream from an InputStream, with format and length given. |
Stream |
loadStream(java.net.URL f)
Load a stream from an URL |
void |
run()
Run method inherited from Runnable interface. |
AudioManager |
setDistanceModel(DistanceModel dm)
Set the distance model, the algorythm used to calculate the volume of a playing sound corresponding to a given distance to the listener. |
AudioManager |
setListenerAttributes(Vector pos,
Vector fw,
Vector up)
Set the listener position, orientation and up in a single call. |
AudioManager |
setListenerOrientation(Vector v)
Set the listener orientation |
AudioManager |
setListenerPosition(Vector v)
Set the listener position |
AudioManager |
setListenerUpwards(Vector v)
Set the up vector |
AudioManager |
setSpatializationModel(SpatializationModel m)
Set the spatialisation model, the algorythm used to calculate the panning of a playing sound corresponding to a given angle. |
void |
start()
Start or restart main audio thread and audio playback. |
void |
stop()
Pause main audio thread and audio playback. |
AudioManager |
update3D()
Actually update volume and panning of the currently playing sounds corresponding to the current 3D state. |
| Methods inherited from class quentinc.audio.ChannelGroup |
|---|
createGroup, loop, play, play, setPosition, setPositionInFrames, setVolume |
| Methods inherited from class quentinc.audio.Channel |
|---|
addChannelListener, addDSP, get3DPosition, getDuration, getDurationInFrames, getPan, getParentChannel, getPitch, getPosition, getPositionInFrames, getReferenceDistance, getRemainingDuration, getRemainingDurationInFrames, getVolume, getVolumeInDB, isActive, isLoop, isPaused, isVirtual, removeChannelListener, removeDSP, set3DPosition, setLoop, setPan, setPaused, setPitch, setReferenceDistance, setRelative3DPosition, setVolumeInDB |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AudioManager()
throws javax.sound.sampled.LineUnavailableException
javax.sound.sampled.LineUnavailableException
public AudioManager(int sampleRate,
float bufferMs)
throws javax.sound.sampled.LineUnavailableException
javax.sound.sampled.LineUnavailableException
public AudioManager(javax.sound.sampled.Mixer.Info mixerInfo,
int sampleRate,
float bufferMs)
throws javax.sound.sampled.LineUnavailableException
javax.sound.sampled.LineUnavailableException| Method Detail |
|---|
public Vector getListenerPosition()
public Vector getListenerOrientation()
public Vector getListenerUpwards()
public AudioManager setListenerPosition(Vector v)
public AudioManager setListenerOrientation(Vector v)
public AudioManager setListenerUpwards(Vector v)
public AudioManager setListenerAttributes(Vector pos,
Vector fw,
Vector up)
public AudioManager setDistanceModel(DistanceModel dm)
public DistanceModel getDistanceModel()
public AudioManager setSpatializationModel(SpatializationModel m)
public SpatializationModel getSpatializationModel()
public AudioManager update3D()
public void run()
run in interface java.lang.Runnablepublic void close()
close in class ChannelGrouppublic void start()
public void stop()
stop in class Channel
public Sample loadSample(java.io.File f)
throws java.io.IOException,
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException
public Sample loadSample(java.net.URL u)
throws java.io.IOException,
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException
public Sample loadSample(java.io.InputStream in)
throws java.io.IOException,
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException
public Sample loadSample(java.io.InputStream in,
javax.sound.sampled.AudioFormat fmt,
int length)
throws java.io.IOException,
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException
public Sample loadSample(short[] data,
int sampleRate,
boolean stereo)
public Stream loadStream(java.io.File f)
throws java.io.IOException,
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException
public Stream loadStream(java.net.URL f)
throws java.io.IOException,
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException
public Stream loadStream(java.io.InputStream in)
throws java.io.IOException,
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException
public Stream loadStream(java.io.InputStream in,
javax.sound.sampled.AudioFormat fmt)
throws java.io.IOException,
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException
public Stream loadStream(java.io.InputStream in,
javax.sound.sampled.AudioFormat fmt,
int length)
throws java.io.IOException,
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||