Package icyllis.modernui.audio
Class Track
java.lang.Object
icyllis.modernui.audio.Track
- All Implemented Interfaces:
AutoCloseable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
float
int
float
getTime()
boolean
void
pause()
void
play()
boolean
seek
(int sampleOffset) boolean
seekToSeconds
(float seconds) void
setAnalyzer
(FFT fft, Consumer<FFT> callback) void
setGain
(float gain) void
setPosition
(float x, float y, float z) void
tick()
-
Constructor Details
-
Track
-
-
Method Details
-
isPlaying
public boolean isPlaying() -
play
public void play() -
pause
public void pause() -
setPosition
public void setPosition(float x, float y, float z) -
setGain
public void setGain(float gain) -
getTime
public float getTime() -
getLength
public float getLength() -
getSampleRate
public int getSampleRate() -
seek
public boolean seek(int sampleOffset) -
seekToSeconds
public boolean seekToSeconds(float seconds) -
tick
public void tick() -
setAnalyzer
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-