Pular para o conteúdo principal

SoundEmitter

class SoundEmitter

Component responsible for reproducing and manipulating sounds.


public class SoundEmitter extends Component

— Constructors (3) —

ConstructorDescription
SoundEmitter(NativeFloatBuffer leftChannel, NativeFloatBuffer rightChannel, int sampleRate)Creates a new instance of SoundEmitter with left channel, right channel, and the sample rate defined to be the arguments.
SoundEmitter(SoundData data)Creates a new instance of SoundEmitter with the data defined to be the argument.
SoundEmitter(File file)Creates a new instance of SoundEmitter with the file defined in the argument.

— Methods (24) —

NameDescription
float getLeftVolume()Returns the current volume value of the SoundEmitter left channel.
void setLeftVolume(float leftVolume)Sets the current volume value of the SoundEmitter left channel.
float getRightVolume()Returns the current volume value of the SoundEmitter right channel.
void setRightVolume(float rightVolume)Sets the current volume value of the SoundEmitter right channel.
void setVolumes(float left, float right)Sets the volume of the left channel and right channel of the SoundEmitter.
void setVolumes(float left, float right, float volume)Sets the volume of the left channel, right channel, and overall volume of the SoundEmitter.
float getSpeed()Returns the current playback speed of SoundEmitter.
void setSpeed(float speed)Sets the current playback speed of SoundEmitter.
float getPitch()Returns the current value of the SoundEmitter pitch.
void setPitch(float pitch)Sets the current value of the SoundEmitter pitch.
float getVolume()Returns the current value of the SoundEmitter volume.
void setVolume(float volume)Sets the current value of the SoundEmitter volume.
int getStepsCount()Returns the current SoundEmitter step count.
float getCurrentSecond()Returns the current second of the SoundEmitter sound.
float getTotalSeconds()Returns the total seconds of the SoundEmitter sound.
void seekToSecond(float second)Sets the sound of the SoundEmitter to the seconds defined in the argument.
boolean isLoop()Returns true if "isLoop" is checked, returns false if not.
void setLoop(boolean loop)Sets whether the "isLoop" option will be checked or not.
void play()Plays SoundEmitter sound.
void pause()Pauses the playing of the SoundEmitter sound.
void stop()Stops playing the SoundEmitter sound.
boolean isPaused()Returns true if SoundEmitter sound playing is paused, returns false if not.
boolean isPlaying()Returns true if the SoundEmitter sound is playing, returns false if not.
boolean isStopped()Returns true if the SoundEmitter sound is not playing, returns false if not.