Class WaveLoader
java.lang.Object
de.pottgames.tuningfork.WaveLoader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SoundBufferload(com.badlogic.gdx.files.FileHandle file) Loads a wav file into aSoundBuffer.static SoundBufferload(com.badlogic.gdx.files.FileHandle file, boolean useJavaDecoder) Loads a wav file into aSoundBuffer.static SoundBufferload(WavInputStream input) Loads aSoundBufferfrom aWavInputStream.static SoundBufferLoads a wav file into aSoundBuffer.static SoundBufferLoads a wav file into aSoundBuffer.static SoundBufferload(InputStream stream) Loads aSoundBufferfrom anInputStreamand closes it afterward.static SoundBufferloadFastImaAdpcm(String path) Disclaimer: This is a special use case load method.static SoundBufferDisclaimer: This is a special use case load method.static ReadableSoundBufferloadReadable(com.badlogic.gdx.files.FileHandle file) Loads a wav file into aReadableSoundBuffer.static ReadableSoundBufferloadReadable(com.badlogic.gdx.files.FileHandle file, boolean useJavaDecoder) Loads a wav file into aReadableSoundBuffer.static ReadableSoundBufferloadReadable(WavInputStream input) Loads aReadableSoundBufferfrom aWavInputStream.static ReadableSoundBufferloadReadable(File file) Loads a wav file into aReadableSoundBuffer.static ReadableSoundBufferloadReadable(File file, boolean useJavaDecoder) Loads a wav file into aReadableSoundBuffer.static ReadableSoundBufferloadReadable(InputStream stream) Loads aReadableSoundBufferfrom anInputStreamand closes it afterward.static ReadableSoundBufferloadReadableReverse(com.badlogic.gdx.files.FileHandle file) Loads a wav file in reverse into aReadableSoundBuffer.static SoundBufferloadReverse(com.badlogic.gdx.files.FileHandle file) Loads a wav file in reverse into aSoundBuffer.
-
Constructor Details
-
WaveLoader
public WaveLoader()
-
-
Method Details
-
load
Loads a wav file into aSoundBuffer.- Parameters:
file- the file- Returns:
- the SoundBuffer
-
loadReadable
Loads a wav file into aReadableSoundBuffer.- Parameters:
file- the file- Returns:
- the SoundBuffer
-
load
Loads a wav file into aSoundBuffer.- Parameters:
file- the fileuseJavaDecoder- enforces the java decoder instead of the native one- Returns:
- the SoundBuffer
-
loadReadable
Loads a wav file into aReadableSoundBuffer.- Parameters:
file- the fileuseJavaDecoder- enforces the java decoder instead of the native one- Returns:
- the SoundBuffer
-
load
Loads a wav file into aSoundBuffer.- Parameters:
file- the file handle- Returns:
- the SoundBuffer
-
loadReadable
Loads a wav file into aReadableSoundBuffer.- Parameters:
file- the file handle- Returns:
- the SoundBuffer
-
load
Loads a wav file into aSoundBuffer.- Parameters:
file- the file handleuseJavaDecoder- enforces the java decoder instead of the native one- Returns:
- the SoundBuffer
-
loadReadable
public static ReadableSoundBuffer loadReadable(com.badlogic.gdx.files.FileHandle file, boolean useJavaDecoder) Loads a wav file into aReadableSoundBuffer.- Parameters:
file- the file handleuseJavaDecoder- enforces the java decoder instead of the native one- Returns:
- the SoundBuffer
-
load
Loads aSoundBufferfrom anInputStreamand closes it afterward.- Parameters:
stream- the input stream- Returns:
- the SoundBuffer
-
loadReadable
Loads aReadableSoundBufferfrom anInputStreamand closes it afterward.- Parameters:
stream- the input stream- Returns:
- the SoundBuffer
-
load
Loads aSoundBufferfrom aWavInputStream.- Parameters:
input- the WavInputStream- Returns:
- the SoundBuffer
-
loadReadable
Loads aReadableSoundBufferfrom aWavInputStream.- Parameters:
input- the WavInputStream- Returns:
- the SoundBuffer
-
loadFastImaAdpcm
Disclaimer: This is a special use case load method. If you just want to load a wav, no matter what encoding, use one of the other load methods.
Loads an IMA ADPCM encoded wav file into aSoundBuffer. The file must be present on the file system (not packed into a jar), be careful with this as packing everything is libGDXs default behavior. Loading is completely done in native code and therefore a bit faster. Leads to a crash when fed with a wav file that is not IMA ADPCM encoded.- Parameters:
path- must be a file that exists on the file system- Returns:
- the SoundBuffer
-
loadFastImaAdpcmReadable
Disclaimer: This is a special use case load method. If you just want to load a wav, no matter what encoding, use one of the other load methods.
Loads an IMA ADPCM encoded wav file into aReadableSoundBuffer. The file must be present on the file system (not packed into a jar), be careful with this as packing everything is libGDXs default behavior. Loading is completely done in native code and therefore a bit faster. Leads to a crash when fed with a wav file that is not IMA ADPCM encoded.- Parameters:
path- must be a file that exists on the file system- Returns:
- the SoundBuffer
-
loadReverse
Loads a wav file in reverse into aSoundBuffer.- Parameters:
file- the file handle- Returns:
- the SoundBuffer
-
loadReadableReverse
Loads a wav file in reverse into aReadableSoundBuffer.- Parameters:
file- the file handle- Returns:
- the SoundBuffer
-