Package icyllis.modernui.audio

# Class Track

java.lang.Object
icyllis.modernui.audio.Track

All Implemented Interfaces:
  `AutoCloseable`

public class Track extends Object implements AutoCloseable

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Track(SoundSample sample)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `float`
  `getLength()`
  `int`
  `getSampleRate()`
  `float`
  `getTime()`
  `boolean`
  `isPlaying()`
  `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()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Track

    public Track(@Nonnull SoundSample sample)

- ## 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

    public void setAnalyzer(@Nullable FFT fft, @Nullable Consumer<FFT> callback)

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`