|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectquentinc.audio.Channel
public abstract class Channel
A channel is an handle to a currently playing sound. It allow you to change various parameters along the sound is playing : volume, panning, pitch...
| Method Summary | |
|---|---|
boolean |
addChannelListener(ChannelListener l)
Attach a channel listener to this channel |
Channel |
addDSP(DSP dsp)
Attach a DSP to this channel. |
void |
close()
Close the channel and associated resources |
Vector |
get3DPosition()
Get the position of the sound in 3D world space |
float |
getDuration()
Get the total duration of the sound expressed in seconds. -1 signifizes that it is not known. |
int |
getDurationInFrames()
Get the total duration of the sound expressed in frames. -1 signifize that it is not known. |
float |
getPan()
Get the panning of the sound, from -1 (left) to 1 (right). 0 is center. |
ChannelGroup |
getParentChannel()
Get the parent channel, the channel who own this one. |
float |
getPitch()
Get the pitch of the sound. 1 is normal pitch, 2 is twice faster and twice higher as normal. |
float |
getPosition()
Get the current playback position expressed in seconds. -1 signifizes that it is not known. |
int |
getPositionInFrames()
Get the current playback position expressed in frames. -1 signifizes that it is not known. |
float |
getReferenceDistance()
Get the reference distance |
float |
getRemainingDuration()
Get the remaining duration til the sound finish playing, expressed in seconds. |
int |
getRemainingDurationInFrames()
Get the remaining duration til the sound finish playing, expressed in frames. |
float |
getVolume()
Get the volume of the sound, between 0 (silence) to 1 (maximum) |
float |
getVolumeInDB()
Get the volume in decibels, 0dB is maximum. |
boolean |
isActive()
Tell either the channel is active, in other words if there is currently a sound playing on it. |
boolean |
isLoop()
Tell either the sound is looping or not. |
boolean |
isPaused()
Tell either the channel is paused or not. |
boolean |
isVirtual()
Tell either the channel is virtual or not. |
boolean |
removeChannelListener(ChannelListener l)
Detach a channel listener from this channel. |
Channel |
removeDSP(DSP dsp)
Detach a DSP from this channel. |
Channel |
set3DPosition(Vector v)
Set the 3D position of the sound in world space |
Channel |
setLoop(boolean b)
Set the looping state of the sound. |
Channel |
setPan(float f)
Set the panning of the sound, from -1 (left) to 1 (right). 0 is center. |
Channel |
setPaused(boolean b)
Set the paused state of the channel. |
Channel |
setPitch(float f)
Set the pitch of the sound. 1 is normal pitch, 2 is twice faster and twice higher as normal. |
Channel |
setPosition(float f)
Set the playback position expressed in seconds. |
Channel |
setPositionInFrames(int n)
Set the playback position expressed in frames. |
Channel |
setReferenceDistance(float f)
Set the reference distance. |
Channel |
setRelative3DPosition(Vector v)
Set the 3D position of the sound, relatively to the listener. |
Channel |
setVolume(float f)
Set the volume of the sound, from 0 (silence) to 1 (maximum) |
Channel |
setVolumeInDB(float db)
Set the volume in decibels. 0dB is maximum. |
void |
stop()
Stop the sound being played by the channel. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public float getVolume()
public float getVolumeInDB()
public float getPan()
public float getPitch()
public Channel setVolume(float f)
public Channel setVolumeInDB(float db)
public Channel setPan(float f)
public Channel setPitch(float f)
public boolean isLoop()
public Channel setLoop(boolean b)
public boolean isPaused()
public Channel setPaused(boolean b)
public boolean isVirtual()
public ChannelGroup getParentChannel()
public int getPositionInFrames()
public float getPosition()
public Channel setPositionInFrames(int n)
public Channel setPosition(float f)
public float getDuration()
public int getDurationInFrames()
public float getRemainingDuration()
public int getRemainingDurationInFrames()
public boolean isActive()
public Channel addDSP(DSP dsp)
public Channel removeDSP(DSP dsp)
public Vector get3DPosition()
public Channel set3DPosition(Vector v)
public Channel setRelative3DPosition(Vector v)
public float getReferenceDistance()
public Channel setReferenceDistance(float f)
public boolean addChannelListener(ChannelListener l)
public boolean removeChannelListener(ChannelListener l)
public void stop()
public void close()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||