Class Mp3Loader

java.lang.Object
de.pottgames.tuningfork.Mp3Loader

public abstract class Mp3Loader extends Object
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.
  • Constructor Details

    • Mp3Loader

      public Mp3Loader()
  • Method Details

    • load

      public static SoundBuffer load(File file)
      Loads a mp3 into a SoundBuffer.
      Parameters:
      file - the file
      Returns:
      the SoundBuffer
    • loadReadable

      public static ReadableSoundBuffer loadReadable(File file)
      Loads a mp3 into a ReadableSoundBuffer.
      Parameters:
      file - the file
      Returns:
      the ReadableSoundBuffer
    • load

      public static SoundBuffer load(com.badlogic.gdx.files.FileHandle file)
      Loads sound data from a FileHandle into a SoundBuffer using the mp3 decoder and closes the stream afterward.
      Parameters:
      file - the file handle
      Returns:
      the SoundBuffer
    • loadReadable

      public static ReadableSoundBuffer loadReadable(com.badlogic.gdx.files.FileHandle file)
      Loads sound data from a FileHandle into a ReadableSoundBuffer using the mp3 decoder and closes the stream afterward.
      Parameters:
      file - the file handle
      Returns:
      the ReadableSoundBuffer
    • load

      public static SoundBuffer load(InputStream stream)
      Loads a mp3 into a SoundBuffer and closes the InputStream afterward.
      Parameters:
      stream - the input stream
      Returns:
      the SoundBuffer
    • loadReadable

      public static ReadableSoundBuffer loadReadable(InputStream stream)
      Loads a mp3 into a ReadableSoundBuffer and closes the InputStream afterward.
      Parameters:
      stream - the input stream
      Returns:
      the ReadableSoundBuffer
    • loadReverse

      public static SoundBuffer loadReverse(com.badlogic.gdx.files.FileHandle file)
      Loads an mp3 file in reverse into a SoundBuffer.
      Parameters:
      file - the file handle
      Returns:
      the SoundBuffer
    • loadReadableReverse

      public static ReadableSoundBuffer loadReadableReverse(com.badlogic.gdx.files.FileHandle file)
      Loads an mp3 file in reverse into a ReadableSoundBuffer.
      Parameters:
      file - the file handle
      Returns:
      the SoundBuffer