Class JOrbisAudioStream

java.lang.Object
net.minecraft.client.sounds.JOrbisAudioStream
All Implemented Interfaces:
Closeable, AutoCloseable, AudioStream, FiniteAudioStream, FloatSampleSource

public class JOrbisAudioStream extends Object implements FloatSampleSource
  • Field Details

    • BUFSIZE

      private static final int BUFSIZE
      See Also:
    • PAGEOUT_RECAPTURE

      private static final int PAGEOUT_RECAPTURE
      See Also:
    • PAGEOUT_NEED_MORE_DATA

      private static final int PAGEOUT_NEED_MORE_DATA
      See Also:
    • PAGEOUT_OK

      private static final int PAGEOUT_OK
      See Also:
    • PACKETOUT_ERROR

      private static final int PACKETOUT_ERROR
      See Also:
    • PACKETOUT_NEED_MORE_DATA

      private static final int PACKETOUT_NEED_MORE_DATA
      See Also:
    • PACKETOUT_OK

      private static final int PACKETOUT_OK
      See Also:
    • syncState

      private final com.jcraft.jogg.SyncState syncState
    • page

      private final com.jcraft.jogg.Page page
    • streamState

      private final com.jcraft.jogg.StreamState streamState
    • packet

      private final com.jcraft.jogg.Packet packet
    • info

      private final com.jcraft.jorbis.Info info
    • dspState

      private final com.jcraft.jorbis.DspState dspState
    • block

      private final com.jcraft.jorbis.Block block
    • audioFormat

      private final AudioFormat audioFormat
    • input

      private final InputStream input
    • samplesWritten

      private long samplesWritten
    • totalSamplesInStream

      private long totalSamplesInStream
  • Constructor Details

  • Method Details

    • isError

      private static boolean isError(int pValue)
    • getFormat

      public AudioFormat getFormat()
      Specified by:
      getFormat in interface AudioStream
    • readToBuffer

      private boolean readToBuffer() throws IOException
      Throws:
      IOException
    • readPage

      @Nullable private com.jcraft.jogg.Page readPage() throws IOException
      Throws:
      IOException
    • readIdentificationPacket

      private com.jcraft.jogg.Packet readIdentificationPacket(com.jcraft.jogg.Page pPage) throws IOException
      Throws:
      IOException
    • readPacket

      @Nullable private com.jcraft.jogg.Packet readPacket() throws IOException
      Throws:
      IOException
    • getSamplesToWrite

      private long getSamplesToWrite(int pSamples)
    • readChunk

      public boolean readChunk(it.unimi.dsi.fastutil.floats.FloatConsumer pOutput) throws IOException
      Specified by:
      readChunk in interface FloatSampleSource
      Throws:
      IOException
    • copyAnyChannels

      private static void copyAnyChannels(float[][] pSource, int pChannels, int[] pStartIndexes, long pSamplesToWrite, it.unimi.dsi.fastutil.floats.FloatConsumer pOutput)
    • copyMono

      private static void copyMono(float[] pSource, int pStartIndex, long pSamplesToWrite, it.unimi.dsi.fastutil.floats.FloatConsumer pOutput)
    • copyStereo

      private static void copyStereo(float[] pLeftSource, int pLeftStartIndex, float[] pRightSource, int pRightStartIndex, long pSamplesToWrite, it.unimi.dsi.fastutil.floats.FloatConsumer pOutput)
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException