Class Mp3Loader
java.lang.Object
de.pottgames.tuningfork.Mp3Loader
This class provides static functions to load mp3 audio data.
The mp3 file format is not officially supported by TuningFork. Use at your own risk.
The mp3 file format is not officially supported by TuningFork. Use at your own risk.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SoundBufferload(com.badlogic.gdx.files.FileHandle file) Loads sound data from aFileHandleinto aSoundBufferusing the mp3 decoder and closes the stream afterward.static SoundBufferLoads a mp3 into aSoundBuffer.static SoundBufferload(InputStream stream) Loads a mp3 into aSoundBufferand closes the InputStream afterward.static ReadableSoundBufferloadReadable(com.badlogic.gdx.files.FileHandle file) Loads sound data from aFileHandleinto aReadableSoundBufferusing the mp3 decoder and closes the stream afterward.static ReadableSoundBufferloadReadable(File file) Loads a mp3 into aReadableSoundBuffer.static ReadableSoundBufferloadReadable(InputStream stream) Loads a mp3 into aReadableSoundBufferand closes the InputStream afterward.static ReadableSoundBufferloadReadableReverse(com.badlogic.gdx.files.FileHandle file) Loads an mp3 file in reverse into aReadableSoundBuffer.static SoundBufferloadReverse(com.badlogic.gdx.files.FileHandle file) Loads an mp3 file in reverse into aSoundBuffer.
-
Constructor Details
-
Mp3Loader
public Mp3Loader()
-
-
Method Details
-
load
Loads a mp3 into aSoundBuffer.- Parameters:
file- the file- Returns:
- the SoundBuffer
-
loadReadable
Loads a mp3 into aReadableSoundBuffer.- Parameters:
file- the file- Returns:
- the ReadableSoundBuffer
-
load
Loads sound data from aFileHandleinto aSoundBufferusing the mp3 decoder and closes the stream afterward.- Parameters:
file- the file handle- Returns:
- the SoundBuffer
-
loadReadable
Loads sound data from aFileHandleinto aReadableSoundBufferusing the mp3 decoder and closes the stream afterward.- Parameters:
file- the file handle- Returns:
- the ReadableSoundBuffer
-
load
Loads a mp3 into aSoundBufferand closes the InputStream afterward.- Parameters:
stream- the input stream- Returns:
- the SoundBuffer
-
loadReadable
Loads a mp3 into aReadableSoundBufferand closes the InputStream afterward.- Parameters:
stream- the input stream- Returns:
- the ReadableSoundBuffer
-
loadReverse
Loads an mp3 file in reverse into aSoundBuffer.- Parameters:
file- the file handle- Returns:
- the SoundBuffer
-
loadReadableReverse
Loads an mp3 file in reverse into aReadableSoundBuffer.- Parameters:
file- the file handle- Returns:
- the SoundBuffer
-