Class ClientTests.SineStream

java.lang.Object
net.neoforged.neoforge.debug.client.ClientTests.SineStream
All Implemented Interfaces:
Closeable, AutoCloseable, AudioStream
Enclosing class:
ClientTests

private static final class ClientTests.SineStream extends Object implements AudioStream
  • Field Details

  • Constructor Details

    • SineStream

      private SineStream()
  • Method Details

    • getFormat

      public AudioFormat getFormat()
      Specified by:
      getFormat in interface AudioStream
    • read

      public ByteBuffer read(int capacity)
      Description copied from interface: AudioStream
      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 interface AudioStream
      Parameters:
      capacity - the maximum number of bytes to read
      Returns:
      a byte buffer containing at most the specified number of bytes to read
    • close

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