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 TypeMethodDescriptionvoid
close()
Close the stream buffervoid
Opens a File for readingvoid
Opens a URL resource linker for readingvoid
pause()
Pause the current stream at the current spot.void
play()
Start reading the loaded stream into buffersvoid
resume()
Resume from where the stream left off after a pause.void
seekTo
(long millis) Similar tosetPosition(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 streamvoid
setGain
(float percent) Sets the gain of the streamvoid
setMute
(boolean mute) void
setPosition
(long millis) void
stop()
Stops the stream
-
Method Details
-
open
Opens a File for reading- Parameters:
url
- The File locale as a File
-
open
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 tosetPosition(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
-