Package net.minecraft.client.audio
Class OggAudioStream
- java.lang.Object
-
- net.minecraft.client.audio.OggAudioStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,IAudioStream
public class OggAudioStream extends java.lang.Object implements IAudioStream
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
OggAudioStream.Buffer
-
Field Summary
Fields Modifier and Type Field Description private javax.sound.sampled.AudioFormat
audioFormat
private java.nio.ByteBuffer
buffer
private long
handle
private java.io.InputStream
input
-
Constructor Summary
Constructors Constructor Description OggAudioStream(java.io.InputStream p_i51177_1_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
private void
convertMono(java.nio.FloatBuffer p_216457_1_, OggAudioStream.Buffer p_216457_2_)
private void
convertStereo(java.nio.FloatBuffer p_216458_1_, java.nio.FloatBuffer p_216458_2_, OggAudioStream.Buffer p_216458_3_)
private void
forwardBuffer()
javax.sound.sampled.AudioFormat
getFormat()
java.nio.ByteBuffer
read(int p_216455_1_)
java.nio.ByteBuffer
readAll()
private boolean
readFrame(OggAudioStream.Buffer p_216460_1_)
private boolean
refillFromStream()
-
-
-
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 interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
getFormat
public javax.sound.sampled.AudioFormat getFormat()
- Specified by:
getFormat
in interfaceIAudioStream
-
read
public java.nio.ByteBuffer read(int p_216455_1_) throws java.io.IOException
- Specified by:
read
in interfaceIAudioStream
- Throws:
java.io.IOException
-
readAll
public java.nio.ByteBuffer readAll() throws java.io.IOException
- Throws:
java.io.IOException
-
-