Class OggAudioStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, IAudioStream

    public class OggAudioStream
    extends java.lang.Object
    implements IAudioStream
    • Field Detail

      • handle

        private long handle
      • audioFormat

        private final javax.sound.sampled.AudioFormat audioFormat
      • input

        private final java.io.InputStream input
      • buffer

        private java.nio.ByteBuffer buffer
    • Constructor Detail

      • OggAudioStream

        public OggAudioStream​(java.io.InputStream p_i51177_1_)
                       throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • refillFromStream

        private boolean refillFromStream()
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • forwardBuffer

        private void forwardBuffer()
      • readFrame

        private boolean readFrame​(OggAudioStream.Buffer p_216460_1_)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • convertMono

        private void convertMono​(java.nio.FloatBuffer p_216457_1_,
                                 OggAudioStream.Buffer p_216457_2_)
      • convertStereo

        private void convertStereo​(java.nio.FloatBuffer p_216458_1_,
                                   java.nio.FloatBuffer p_216458_2_,
                                   OggAudioStream.Buffer p_216458_3_)
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • getFormat

        public javax.sound.sampled.AudioFormat getFormat()
        Specified by:
        getFormat in interface IAudioStream
      • read

        public java.nio.ByteBuffer read​(int p_216455_1_)
                                 throws java.io.IOException
        Specified by:
        read in interface IAudioStream
        Throws:
        java.io.IOException
      • readAll

        public java.nio.ByteBuffer readAll()
                                    throws java.io.IOException
        Throws:
        java.io.IOException