Package net.minecraft.client.sounds
Interface FloatSampleSource
- All Superinterfaces:
AudioStream
,AutoCloseable
,Closeable
,FiniteAudioStream
- All Known Implementing Classes:
JOrbisAudioStream
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault ByteBuffer
read
(int pSize) Reads audio data from the stream and returns a byte buffer containing at most the specified number of bytes.default ByteBuffer
readAll()
boolean
readChunk
(it.unimi.dsi.fastutil.floats.FloatConsumer p_340937_) Methods inherited from interface net.minecraft.client.sounds.AudioStream
getFormat
-
Field Details
-
EXPECTED_MAX_FRAME_SIZE
static final int EXPECTED_MAX_FRAME_SIZE- See Also:
-
-
Method Details
-
readChunk
- Throws:
IOException
-
read
Reads audio data from the stream and returns a byte buffer containing at most the specified number of bytes. The method reads audio frames from the stream and adds them to the output buffer until the buffer contains at least the specified number of bytes or the end fo the stream is reached.- Specified by:
read
in interfaceAudioStream
- Parameters:
pSize
- the maximum number of bytes to read- Returns:
- a byte buffer containing at most the specified number of bytes to read
- Throws:
IOException
- if an I/O error occurs while reading the audio data
-
readAll
- Specified by:
readAll
in interfaceFiniteAudioStream
- Throws:
IOException
-