Package net.minecraft.client.sounds
Interface AudioStream
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Subinterfaces:
FiniteAudioStream
,FloatSampleSource
- All Known Implementing Classes:
ClientTests.SineStream
,JOrbisAudioStream
,LoopingAudioStream
-
Method Summary
Modifier and TypeMethodDescriptionread
(int pSize) Reads audio data from the stream and returns a byte buffer containing at most the specified number of bytes.
-
Method Details
-
getFormat
AudioFormat getFormat() -
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.- 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
-