Java Doc for Mixer.java in  » 6.0-JDK-Core » sound » javax » sound » sampled » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » sound » javax.sound.sampled 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.sound.sampled.Mixer

Mixer
public interface Mixer extends Line(Code)
A mixer is an audio device with one or more lines. It need not be designed for mixing audio signals. A mixer that actually mixes audio has multiple input (source) lines and at least one output (target) line. The former are often instances of classes that implement SourceDataLine , and the latter, TargetDataLine . Port objects, too, are either source lines or target lines. A mixer can accept prerecorded, loopable sound as input, by having some of its source lines be instances of objects that implement the Clip interface.

Through methods of the Line interface, which Mixer extends, a mixer might provide a set of controls that are global to the mixer. For example, the mixer can have a master gain control. These global controls are distinct from the controls belonging to each of the mixer's individual lines.

Some mixers, especially those with internal digital mixing capabilities, may provide additional capabilities by implementing the DataLine interface.

A mixer can support synchronization of its lines. When one line in a synchronized group is started or stopped, the other lines in the group automatically start or stop simultaneously with the explicitly affected one.
author:
   Kara Kytle
version:
   1.38, 07/05/05
since:
   1.3


Inner Class :public static class Info



Method Summary
public  LinegetLine(Line.Info info)
     Obtains a line that is available for use and that matches the description in the specified Line.Info object.
public  intgetMaxLines(Line.Info info)
     Obtains the approximate maximum number of lines of the requested type that can be open simultaneously on the mixer. Certain types of mixers do not have a hard bound and may allow opening more lines. Since certain lines are a shared resource, a mixer may not be able to open the maximum number of lines if another process has opened lines of this mixer. The requested type is any line that matches the description in the provided Line.Info object.
public  InfogetMixerInfo()
     Obtains information about this mixer, including the product's name, version, vendor, etc.
public  Line.Info[]getSourceLineInfo()
     Obtains information about the set of source lines supported by this mixer. Some source lines may only be available when this mixer is open. array of Line.Info objects representing source linesfor this mixer.
public  Line.Info[]getSourceLineInfo(Line.Info info)
     Obtains information about source lines of a particular type supported by the mixer. Some source lines may only be available when this mixer is open.
Parameters:
  info - a Line.Info object describing lines about which informationis queried an array of Line.Info objects describing source lines matchingthe type requested.
public  Line[]getSourceLines()
     Obtains the set of all source lines currently open to this mixer.
public  Line.Info[]getTargetLineInfo()
     Obtains information about the set of target lines supported by this mixer. Some target lines may only be available when this mixer is open. array of Line.Info objects representing target linesfor this mixer.
public  Line.Info[]getTargetLineInfo(Line.Info info)
     Obtains information about target lines of a particular type supported by the mixer. Some target lines may only be available when this mixer is open.
Parameters:
  info - a Line.Info object describing lines about which informationis queried an array of Line.Info objects describing target lines matchingthe type requested.
public  Line[]getTargetLines()
     Obtains the set of all target lines currently open from this mixer.
public  booleanisLineSupported(Line.Info info)
     Indicates whether the mixer supports a line (or lines) that match the specified Line.Info object.
public  booleanisSynchronizationSupported(Line[] lines, boolean maintainSync)
     Reports whether this mixer supports synchronization of the specified set of lines.
public  voidsynchronize(Line[] lines, boolean maintainSync)
     Synchronizes two or more lines.
public  voidunsynchronize(Line[] lines)
     Releases synchronization for the specified lines.



Method Detail
getLine
public Line getLine(Line.Info info) throws LineUnavailableException(Code)
Obtains a line that is available for use and that matches the description in the specified Line.Info object.

If a DataLine is requested, and info is an instance of DataLine.Info specifying at least one fully qualified audio format, the last one will be used as the default format of the returned DataLine.
Parameters:
  info - describes the desired line
throws:
  LineUnavailableException - if a matching lineis not available due to resource restrictions
throws:
  IllegalArgumentException - if this mixer doesnot support any lines matching the description
throws:
  SecurityException - if a matching lineis not available due to security restrictions




getMaxLines
public int getMaxLines(Line.Info info)(Code)
Obtains the approximate maximum number of lines of the requested type that can be open simultaneously on the mixer. Certain types of mixers do not have a hard bound and may allow opening more lines. Since certain lines are a shared resource, a mixer may not be able to open the maximum number of lines if another process has opened lines of this mixer. The requested type is any line that matches the description in the provided Line.Info object. For example, if the info object represents a speaker port, and the mixer supports exactly one speaker port, this method should return 1. If the info object represents a source data line and the mixer supports the use of 32 source data lines simultaneously, the return value should be 32. If there is no limit, this function returns AudioSystem.NOT_SPECIFIED.
Parameters:
  info - a Line.Info that describes the line for whichthe number of supported instances is queried the maximum number of matching lines supported, or AudioSystem.NOT_SPECIFIED



getMixerInfo
public Info getMixerInfo()(Code)
Obtains information about this mixer, including the product's name, version, vendor, etc. a mixer info object that describes this mixer
See Also:   Mixer.Info



getSourceLineInfo
public Line.Info[] getSourceLineInfo()(Code)
Obtains information about the set of source lines supported by this mixer. Some source lines may only be available when this mixer is open. array of Line.Info objects representing source linesfor this mixer. If no source lines are supported,an array of length 0 is returned.



getSourceLineInfo
public Line.Info[] getSourceLineInfo(Line.Info info)(Code)
Obtains information about source lines of a particular type supported by the mixer. Some source lines may only be available when this mixer is open.
Parameters:
  info - a Line.Info object describing lines about which informationis queried an array of Line.Info objects describing source lines matchingthe type requested. If no matching source lines are supported, an array of length 0is returned.



getSourceLines
public Line[] getSourceLines()(Code)
Obtains the set of all source lines currently open to this mixer. the source lines currently open to the mixer.If no source lines are currently open to this mixer, anarray of length 0 is returned.
throws:
  SecurityException - if the matching linesare not available due to security restrictions



getTargetLineInfo
public Line.Info[] getTargetLineInfo()(Code)
Obtains information about the set of target lines supported by this mixer. Some target lines may only be available when this mixer is open. array of Line.Info objects representing target linesfor this mixer. If no target lines are supported,an array of length 0 is returned.



getTargetLineInfo
public Line.Info[] getTargetLineInfo(Line.Info info)(Code)
Obtains information about target lines of a particular type supported by the mixer. Some target lines may only be available when this mixer is open.
Parameters:
  info - a Line.Info object describing lines about which informationis queried an array of Line.Info objects describing target lines matchingthe type requested. If no matching target lines are supported, an array of length 0is returned.



getTargetLines
public Line[] getTargetLines()(Code)
Obtains the set of all target lines currently open from this mixer. target lines currently open from the mixer.If no target lines are currently open from this mixer, anarray of length 0 is returned.
throws:
  SecurityException - if the matching linesare not available due to security restrictions



isLineSupported
public boolean isLineSupported(Line.Info info)(Code)
Indicates whether the mixer supports a line (or lines) that match the specified Line.Info object. Some lines may only be supported when this mixer is open.
Parameters:
  info - describes the line for which support is queried true if at least one matching line issupported, false otherwise



isSynchronizationSupported
public boolean isSynchronizationSupported(Line[] lines, boolean maintainSync)(Code)
Reports whether this mixer supports synchronization of the specified set of lines.
Parameters:
  lines - the set of lines for which synchronization support is queried
Parameters:
  maintainSync - true if the synchronizationmust be precisely maintained (i.e., the synchronization must be sample-accurate)at all times during operation of the lines , or falseif precise synchronization is required only during start and stop operations true if the lines can be synchronized, falseotherwise



synchronize
public void synchronize(Line[] lines, boolean maintainSync)(Code)
Synchronizes two or more lines. Any subsequent command that starts or stops audio playback or capture for one of these lines will exert the same effect on the other lines in the group, so that they start or stop playing or capturing data simultaneously.
Parameters:
  lines - the lines that should be synchronized
Parameters:
  maintainSync - true if the synchronizationmust be precisely maintained (i.e., the synchronization must be sample-accurate)at all times during operation of the lines , or falseif precise synchronization is required only during start and stop operations
throws:
  IllegalArgumentException - if the lines cannot be synchronized.This may occur if the lines are of different types or have differentformats for which this mixer does not support synchronization, or ifall lines specified do not belong to this mixer.



unsynchronize
public void unsynchronize(Line[] lines)(Code)
Releases synchronization for the specified lines. The array must be identical to one for which synchronization has already been established; otherwise an exception may be thrown. However, null may be specified, in which case all currently synchronized lines that belong to this mixer are unsynchronized.
Parameters:
  lines - the synchronized lines for which synchronization should bereleased, or null for all this mixer's synchronized lines
throws:
  IllegalArgumentException - if the lines cannot be unsynchronized.This may occur if the argument specified does not exactly match a setof lines for which synchronization has already been established.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.