1 /*
2 * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
116 * Indicates whether the mixer supports a line (or lines) that match
117 * the specified <code>Line.Info</code> object.
118 * Some lines may only be supported when this mixer is open.
119 * @param info describes the line for which support is queried
120 * @return <code>true</code> if at least one matching line is
121 * supported, <code>false</code> otherwise
122 */
123 public boolean isLineSupported(Line.Info info);
124
125 /**
126 * Obtains a line that is available for use and that matches the description
127 * in the specified <code>Line.Info</code> object.
128 *
129 * <p>If a <code>DataLine</code> is requested, and <code>info</code>
130 * is an instance of <code>DataLine.Info</code> specifying at
131 * least one fully qualified audio format, the last one
132 * will be used as the default format of the returned
133 * <code>DataLine</code>.
134 *
135 * @param info describes the desired line
136 * @throws LineUnavailableException if a matching line
137 * is not available due to resource restrictions
138 * @throws IllegalArgumentException if this mixer does
139 * not support any lines matching the description
140 * @throws SecurityException if a matching line
141 * is not available due to security restrictions
142 */
143 public Line getLine(Line.Info info) throws LineUnavailableException;
144
145 //$$fb 2002-04-12: fix for 4667258: behavior of Mixer.getMaxLines(Line.Info) method doesn't match the spec
146 /**
147 * Obtains the approximate maximum number of lines of the requested type that can be open
148 * simultaneously on the mixer.
149 *
150 * Certain types of mixers do not have a hard bound and may allow opening more lines.
151 * Since certain lines are a shared resource, a mixer may not be able to open the maximum
152 * number of lines if another process has opened lines of this mixer.
153 *
154 * The requested type is any line that matches the description in
155 * the provided <code>Line.Info</code> object. For example, if the info
|
1 /*
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
116 * Indicates whether the mixer supports a line (or lines) that match
117 * the specified <code>Line.Info</code> object.
118 * Some lines may only be supported when this mixer is open.
119 * @param info describes the line for which support is queried
120 * @return <code>true</code> if at least one matching line is
121 * supported, <code>false</code> otherwise
122 */
123 public boolean isLineSupported(Line.Info info);
124
125 /**
126 * Obtains a line that is available for use and that matches the description
127 * in the specified <code>Line.Info</code> object.
128 *
129 * <p>If a <code>DataLine</code> is requested, and <code>info</code>
130 * is an instance of <code>DataLine.Info</code> specifying at
131 * least one fully qualified audio format, the last one
132 * will be used as the default format of the returned
133 * <code>DataLine</code>.
134 *
135 * @param info describes the desired line
136 * @return a line that is available for use and that matches the description
137 * in the specified {@code Line.Info} object
138 * @throws LineUnavailableException if a matching line
139 * is not available due to resource restrictions
140 * @throws IllegalArgumentException if this mixer does
141 * not support any lines matching the description
142 * @throws SecurityException if a matching line
143 * is not available due to security restrictions
144 */
145 public Line getLine(Line.Info info) throws LineUnavailableException;
146
147 //$$fb 2002-04-12: fix for 4667258: behavior of Mixer.getMaxLines(Line.Info) method doesn't match the spec
148 /**
149 * Obtains the approximate maximum number of lines of the requested type that can be open
150 * simultaneously on the mixer.
151 *
152 * Certain types of mixers do not have a hard bound and may allow opening more lines.
153 * Since certain lines are a shared resource, a mixer may not be able to open the maximum
154 * number of lines if another process has opened lines of this mixer.
155 *
156 * The requested type is any line that matches the description in
157 * the provided <code>Line.Info</code> object. For example, if the info
|