Rename dummy filter to basic filter.
[sonitus.git] / src / main / java / net / pterodactylus / sonitus / data / Source.java
1 package net.pterodactylus.sonitus.data;
2
3 import java.io.IOException;
4
5 /**
6  * A source produces an audio stream and accompanying metadata.
7  *
8  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
9  */
10 public interface Source extends ControlledComponent {
11
12         /**
13          * Returns the metadata of the audio stream.
14          *
15          * @return The metadata of the audio stream
16          */
17         Metadata metadata();
18
19         /**
20          * Retrieves data from the audio stream.
21          *
22          * @param bufferSize
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
27          * @throws IOException
28          *              if an I/O error occurs
29          */
30         byte[] get(int bufferSize) throws IOException;
31
32 }