1 package net.pterodactylus.sonitus.data;
3 import java.io.IOException;
6 * A source produces an audio stream and accompanying metadata.
8 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
10 public interface Source {
13 * Returns the metadata of the audio stream.
15 * @return The metadata of the audio stream
20 * Retrieves data from the audio stream.
23 * The maximum amount of bytes to retrieve from the audio stream
24 * @return A buffer filled with up to {@code bufferSize} bytes of data; the
25 * returned buffer may contain less data than requested but will not
26 * contain excess elements
28 * if an I/O error occurs
30 byte[] get(int bufferSize) throws IOException;