Interface Audio

All Known Implementing Classes:
Tailwind, TailwindPlaylist

public interface Audio
An interface that provides implementation for Audio creation to the BigContainer Player classes.

This interface template does not provide every single method that a player might need; thus, the programmer must implement their own styles and methods to be used along.

An example of this implementation is TailwindPlayer

Since:
3.1
Author:
Jack Meng
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the stream buffer
    void
    open(File url)
    Opens a File for reading
    void
    open(URL url)
    Opens a URL resource linker for reading
    void
    Pause the current stream at the current spot.
    void
    Start reading the loaded stream into buffers
    void
    Resume from where the stream left off after a pause.
    void
    seekTo(long millis)
    Similar to setPosition(long) but will provide additional safety checks to make sure the time being seeked to is not out of reach.
    void
    setBalance(float balance)
    Sets the balance of the stream
    void
    setGain(float percent)
    Sets the gain of the stream
    void
    setMute(boolean mute)
     
    void
    setPosition(long millis)
     
    void
    Stops the stream
  • Method Details

    • open

      void open(File url)
      Opens a File for reading
      Parameters:
      url - The File locale as a File
    • open

      void open(URL url)
      Opens a URL resource linker for reading
      Parameters:
      url - A URL object to a resource for the audio stream.
    • close

      void close()
      Close the stream buffer
    • play

      void play()
      Start reading the loaded stream into buffers
    • setGain

      void setGain(float percent)
      Sets the gain of the stream
      Parameters:
      percent - A percent value
    • setBalance

      void setBalance(float balance)
      Sets the balance of the stream
      Parameters:
      balance - The balance value as a float
    • setMute

      void setMute(boolean mute)
      Parameters:
      mute - (true || false) if the stream should be on mute
    • resume

      void resume()
      Resume from where the stream left off after a pause.
    • seekTo

      void seekTo(long millis)
      Similar to setPosition(long) but will provide additional safety checks to make sure the time being seeked to is not out of reach. (EOF)
      Parameters:
      millis -
    • setPosition

      void setPosition(long millis)
      Parameters:
      millis - Moves the buffer reader to the millis frame
    • pause

      void pause()
      Pause the current stream at the current spot.
    • stop

      void stop()
      Stops the stream