1 package net.pterodactylus.sonitus.data;
3 import java.io.IOException;
6 * A sink is a destination for audio data. It can be played on speakers, it can
7 * be written to a file, or it can be sent to a remote streaming server.
9 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
11 public interface Sink extends ControlledComponent {
14 * Opens this sink using the format parameters of the given metadata.
17 * The metadata of the stream
19 * if an I/O error occurs
21 void open(Metadata metadata) throws IOException;
23 /** Closes this sink. */
27 * Processes the given buffer of data.
32 * if an I/O error occurs
34 void process(byte[] buffer) throws IOException;