public class IzouSoundLineBaseClass extends IzouModule implements Line, AutoCloseable, IzouSoundLine
Modifier and Type | Field and Description |
---|---|
protected boolean |
isMutable |
protected boolean |
isMutedFromSystem |
protected Line |
line |
protected SoundManager |
soundManager |
log, main
Constructor and Description |
---|
IzouSoundLineBaseClass(Line line,
Main main,
boolean isPermanent,
AddOnModel addOnModel) |
Modifier and Type | Method and Description |
---|---|
void |
addLineListener(LineListener listener)
follows no predictable behaviour, can be seen as not implemented.
|
void |
close()
Closes the line, indicating that any system resources
in use by the line can be released.
|
AddOnModel |
getAddOnModel()
gets the associated AddonModel
|
Control |
getControl(Control.Type control)
Obtains a control of the specified type, if there is any.
|
Control[] |
getControls()
Obtains the set of controls associated with this line.
|
Line.Info |
getLineInfo()
Obtains the
Line.Info object describing this
line. |
Identification |
getResponsibleID()
gets the ID responsible
|
boolean |
isControlSupported(Control.Type control)
Indicates whether the line supports a control of the specified type.
|
boolean |
isMutedFromSystem()
returns whether the Line is muted
|
boolean |
isMuteIfNonPermanent()
retruns whether other Addons audio-inputs should be muted while this line is open (only works for non-permanent lines).
|
boolean |
isOpen()
Indicates whether the line is open, meaning that it has reserved
system resources and is operational, although it might not currently be
playing or capturing sound.
|
boolean |
isPermanent()
returns whether the line is permanently-available.
|
void |
open()
Opens the line, indicating that it should acquire any required
system resources and become operational.
|
protected void |
opening() |
void |
removeLineListener(LineListener listener)
follows no predictable behaviour, can be seen as not implemented.
|
void |
setMuteIfNonPermanent(boolean muteIfNonPermanent)
sets whether other Addons audio-inputs should be muted while this line is open (only works for non-permanent lines).
|
debug, debug, error, error, fatal, fatal, getID, getMain
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isOwner
protected final SoundManager soundManager
protected final boolean isMutable
protected boolean isMutedFromSystem
public IzouSoundLineBaseClass(Line line, Main main, boolean isPermanent, AddOnModel addOnModel)
public Line.Info getLineInfo()
Line.Info
object describing this
line.getLineInfo
in interface Line
public void open() throws LineUnavailableException
OPEN
event is dispatched
to the line's listeners.
Note that some lines, once closed, cannot be reopened. Attempts
to reopen such a line will always result in an LineUnavailableException
.
Some types of lines have configurable properties that may affect
resource allocation. For example, a DataLine
must
be opened with a particular format and buffer size. Such lines
should provide a mechanism for configuring these properties, such
as an additional open
method or methods which allow
an application to specify the desired settings.
This method takes no arguments, and opens the line with the current
settings. For SourceDataLine
and
TargetDataLine
objects, this means that the line is
opened with default settings. For a Clip
, however,
the buffer size is determined when data is loaded. Since this method does not
allow the application to specify any data to load, an IllegalArgumentException
is thrown. Therefore, you should instead use one of the open
methods
provided in the Clip
interface to load data into the Clip
.
For DataLine
's, if the DataLine.Info
object which was used to retrieve the line, specifies at least
one fully qualified audio format, the last one will be used
as the default format.
open
in interface Line
IllegalArgumentException
- if this method is called on a Clip instance.LineUnavailableException
- if the line cannot be
opened due to resource restrictions.SecurityException
- if the line cannot be
opened due to security restrictions.close()
,
isOpen()
protected void opening()
public void close()
CLOSE
event is dispatched
to the line's listeners.close
in interface AutoCloseable
close
in interface Line
SecurityException
- if the line cannot be
closed due to security restrictions.open()
,
isOpen()
public boolean isOpen()
public Control[] getControls()
getControls
in interface Line
isMutedFromSystem()
public boolean isControlSupported(Control.Type control)
isControlSupported
in interface Line
control
- the type of the control for which support is queriedpublic Control getControl(Control.Type control) throws IllegalArgumentException
getControl
in interface Line
control
- the type of the requested controlIllegalArgumentException
- - if a control of the specified type is not supportedisMutedFromSystem()
public void addLineListener(LineListener listener)
addLineListener
in interface Line
listener
- the listenerpublic void removeLineListener(LineListener listener)
removeLineListener
in interface Line
listener
- the listenerpublic boolean isPermanent()
isPermanent
in interface IzouSoundLine
public AddOnModel getAddOnModel()
getAddOnModel
in interface IzouSoundLine
public Identification getResponsibleID()
getResponsibleID
in interface IzouSoundLine
public boolean isMutedFromSystem()
isMutedFromSystem
in interface IzouSoundLine
public void setMuteIfNonPermanent(boolean muteIfNonPermanent)
setMuteIfNonPermanent
in interface IzouSoundLine
muteIfNonPermanent
- true if muted, false if notpublic boolean isMuteIfNonPermanent()
isMuteIfNonPermanent
in interface IzouSoundLine
Copyright © 2016. All rights reserved.