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 p_340842_)
    • 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 p_340874_) throws IOException
      Throws:
      IOException
    • readPacket

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

      private long getSamplesToWrite(int p_341351_)
    • readChunk

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

      private static void copyAnyChannels(float[][] p_340927_, int p_341332_, int[] p_341269_, long p_341072_, it.unimi.dsi.fastutil.floats.FloatConsumer p_341382_)
    • copyMono

      private static void copyMono(float[] p_340838_, int p_341058_, long p_341397_, it.unimi.dsi.fastutil.floats.FloatConsumer p_340852_)
    • copyStereo

      private static void copyStereo(float[] p_341142_, int p_341000_, float[] p_340922_, int p_341132_, long p_341389_, it.unimi.dsi.fastutil.floats.FloatConsumer p_341076_)
    • close

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