X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsonitus%2Fdata%2FSink.java;fp=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsonitus%2Fdata%2FSink.java;h=5ca6a79195685112882876b13ae6e680357d046b;hb=740ea4925e1e20cde0f15afcb105de1f11371dba;hp=0000000000000000000000000000000000000000;hpb=b74bb6374b5b3f4d0f30fefe8771e9c48ceead13;p=sonitus.git diff --git a/src/main/java/net/pterodactylus/sonitus/data/Sink.java b/src/main/java/net/pterodactylus/sonitus/data/Sink.java new file mode 100644 index 0000000..5ca6a79 --- /dev/null +++ b/src/main/java/net/pterodactylus/sonitus/data/Sink.java @@ -0,0 +1,39 @@ +/* + * Sonitus - Sink.java - Copyright © 2013 David Roden + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package net.pterodactylus.sonitus.data; + +/** + * A sink is an endpoint for an audio stream. It might be a file on disk, it can + * be an audio output in the current system, or it can be sent to a remote + * streaming server for broadcasting. + * + * @author David ‘Bombe’ Roden + */ +public interface Sink { + + /** + * Connects this sink to the given source. + * + * @param source + * The source to connect to + * @throws ConnectException + * if the source can not be connected, e.g. due to a {@link Format} mismatch + */ + void connect(Source source) throws ConnectException; + +}