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_335098_)
    • 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_329701_) throws IOException
      Throws:
      IOException
    • readPacket

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

      private long getSamplesToWrite(int p_328687_)
    • readChunk

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

      private static void copyAnyChannels(float[][] p_327919_, int p_335236_, int[] p_332016_, long p_329945_, it.unimi.dsi.fastutil.floats.FloatConsumer p_335757_)
    • copyMono

      private static void copyMono(float[] p_332068_, int p_333939_, long p_329906_, it.unimi.dsi.fastutil.floats.FloatConsumer p_336173_)
    • copyStereo

      private static void copyStereo(float[] p_329921_, int p_328265_, float[] p_331752_, int p_331871_, long p_328398_, it.unimi.dsi.fastutil.floats.FloatConsumer p_335978_)
    • close

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