|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.audio.io.Mpg123Decoder
public class Mpg123Decoder
A Decoder
implementation that decodes MP3 files via libmpg123 natively.
Field Summary | |
---|---|
long |
handle
|
Constructor Summary | |
---|---|
Mpg123Decoder(java.lang.String filename)
Opens the given file for mp3 decoding. |
Method Summary | |
---|---|
void |
dispose()
Disposes the decoder and frees all associated resources |
float |
getLength()
|
int |
getNumChannels()
|
int |
getRate()
|
int |
readSamples(java.nio.ShortBuffer samples)
Reads in samples.capacity() samples in 16-bit signed PCM format from the decoder. |
int |
skipSamples(int numSamples)
Skips numSamples samples. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final long handle
Constructor Detail |
---|
public Mpg123Decoder(java.lang.String filename)
filename
- the filenameMethod Detail |
---|
public int readSamples(java.nio.ShortBuffer samples)
readSamples
in interface Decoder
samples
- The number of read samples.public int skipSamples(int numSamples)
skipSamples
in interface Decoder
numSamples
- the number of samples to skip
public int getNumChannels()
getNumChannels
in interface Decoder
public int getRate()
getRate
in interface Decoder
public float getLength()
getLength
in interface Decoder
public void dispose()
dispose
in interface Decoder
dispose
in interface Disposable
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |