2 Copyright (C) 2005 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package javax
.sound
.sampled
;
42 * A Mixer is a Line which itself holds multiple lines.
45 public interface Mixer
extends Line
48 * An Info object describes a mixer.
54 private String description
;
55 private String vendor
;
56 private String version
;
59 * Create a new mixer description.
60 * @param name the name of the mixer
61 * @param vendor the vendor
62 * @param desc a descriptive string
63 * @param vers the mixer's version
65 protected Info(String name
, String vendor
, String desc
, String vers
)
68 this.description
= desc
;
73 public final boolean equals(Object o
)
75 return super.equals(o
);
78 public final int hashCode()
80 return super.hashCode();
84 * Return the name of the mixer.
86 public final String
getName()
92 * Return the mixer's description.
94 public final String
getDescription()
100 * Return the mixer's vendor.
102 public final String
getVendor()
108 * Return the mixer's version.
110 public final String
getVersion()
115 public final String
toString()
117 return ("name=" + name
+ "; description=" + description
118 + "; vendor=" + vendor
+ "; version=" + version
);
123 * Return a Line associated with this Mixer, given its description.
124 * @param info the description of the line to find
125 * @return the corresponding Line
126 * @throws LineUnavailableException if no Line matching the description
127 * exists in this Mixer
129 Line
getLine(Line
.Info info
) throws LineUnavailableException
;
132 * Return the number of lines matching this description.
133 * @param info the description of the lines to find.
135 int getMaxLines(Line
.Info info
);
138 * Return an Info object describing this Mixer.
143 * Return an array of Info objects describing all the source lines
144 * available in this Mixer.
146 Line
.Info
[] getSourceLineInfo();
149 * Return an array of Info objects describing all the source lines
150 * available in this Mixer, which match the provided decsription.
151 * @param info the description of the source lines to find
153 Line
.Info
[] getSourceLineInfo(Line
.Info info
);
156 * Return an array of all the source lines available in this Mixer.
158 Line
[] getSourceLines();
161 * Return an array of Info objects describing all the target lines
162 * available in this Mixer.
164 Line
.Info
[] getTargetLineInfo();
167 * Return an array of Info objects describing all the target lines
168 * available in this Mixer, which match the provided decsription.
169 * @param info the description of the target lines to find
171 Line
.Info
[] getTargetLineInfo(Line
.Info info
);
174 * Return an array of all the target lines available in this Mixer.
176 Line
[] getTargetLines();
179 * Return true if a Line matching the given description is supported
180 * by this Mixer, false otherwise.
181 * @param info the description of the line to find
183 boolean isLineSupported(Line
.Info info
);
186 * Return true if this Mixer supports synchronization of the given set
188 * @param lines the lines to check
189 * @param sync true if the synchronization must be accurate at all times
191 boolean isSynchronizationSupported(Line
[] lines
, boolean sync
);
194 * Start synchronization on the given set of lines.
195 * @param lines the lines to synchronize, or null for all the lines
196 * @param sync true if the synchronization must be accurate at all times
197 * @throws IllegalArgumentException if the lines cannot be synchronized
199 void synchronize(Line
[] lines
, boolean sync
);
202 * Stop synchronization for the given set of lines.
203 * @param lines the lines to unsynchronize, or null for all the lines
205 void unsynchronize(Line
[] lines
);