public abstract class Mini2DxOpenALMusic
extends java.lang.Object
implements com.badlogic.gdx.audio.Music
OpenALMusic
to support sound completion eventsModifier and Type | Field and Description |
---|---|
protected int |
bufferOverhead |
protected com.badlogic.gdx.files.FileHandle |
file |
Constructor and Description |
---|
Mini2DxOpenALMusic(Mini2DxOpenALAudio audio,
com.badlogic.gdx.files.FileHandle file) |
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
int |
getChannels() |
float |
getPosition() |
int |
getRate() |
int |
getSourceId() |
float |
getVolume() |
boolean |
isLooping() |
boolean |
isPlaying() |
protected void |
loop()
By default, does just the same as reset().
|
void |
pause() |
void |
play() |
abstract int |
read(byte[] buffer)
Fills as much of the buffer as possible and returns the number of bytes filled.
|
abstract void |
reset()
Resets the stream to the beginning.
|
void |
setLooping(boolean isLooping) |
void |
setOnCompletionListener(com.badlogic.gdx.audio.Music.OnCompletionListener listener) |
void |
setPan(float pan,
float volume) |
void |
setPosition(float position) |
protected void |
setup(int channels,
int sampleRate) |
void |
setVolume(float volume) |
void |
stop() |
void |
update() |
protected final com.badlogic.gdx.files.FileHandle file
protected int bufferOverhead
public Mini2DxOpenALMusic(Mini2DxOpenALAudio audio, com.badlogic.gdx.files.FileHandle file)
protected void setup(int channels, int sampleRate)
public void play()
play
in interface com.badlogic.gdx.audio.Music
public void stop()
stop
in interface com.badlogic.gdx.audio.Music
public void pause()
pause
in interface com.badlogic.gdx.audio.Music
public boolean isPlaying()
isPlaying
in interface com.badlogic.gdx.audio.Music
public void setLooping(boolean isLooping)
setLooping
in interface com.badlogic.gdx.audio.Music
public boolean isLooping()
isLooping
in interface com.badlogic.gdx.audio.Music
public void setVolume(float volume)
setVolume
in interface com.badlogic.gdx.audio.Music
public float getVolume()
getVolume
in interface com.badlogic.gdx.audio.Music
public void setPan(float pan, float volume)
setPan
in interface com.badlogic.gdx.audio.Music
public void setPosition(float position)
setPosition
in interface com.badlogic.gdx.audio.Music
public float getPosition()
getPosition
in interface com.badlogic.gdx.audio.Music
public abstract int read(byte[] buffer)
public abstract void reset()
protected void loop()
public int getChannels()
public int getRate()
public void update()
public void dispose()
dispose
in interface com.badlogic.gdx.audio.Music
dispose
in interface com.badlogic.gdx.utils.Disposable
public void setOnCompletionListener(com.badlogic.gdx.audio.Music.OnCompletionListener listener)
setOnCompletionListener
in interface com.badlogic.gdx.audio.Music
public int getSourceId()