|
Préférences
Moteurs de recherche
|
||||||||||||||||||||||||||
JavaTM 2 Platform Std. Ed. v1.4.2
javax.sound.sampled
|
Nested Class Summary | |
static class |
LineEvent.Type
The LineEvent.Type inner class identifies what kind of event occurred on a line. |
Field Summary |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary | |
LineEvent(Line line,
LineEvent.Type type,
long position)
Constructs a new event of the specified type, originating from the specified line. |
Method Summary | |
long |
getFramePosition()
Obtains the position in the line's audio data when the event occurred, expressed in sample frames. |
Line |
getLine()
Obtains the audio line that is the source of this event. |
LineEvent.Type |
getType()
Obtains the event's type. |
String |
toString()
Obtains a string representation of the event. |
Methods inherited from class java.util.EventObject |
getSource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LineEvent(Line line, LineEvent.Type type, long position)
line
- the source of this eventtype
- the event type (OPEN
, CLOSE
, START
, or STOP
)position
- the number of sample frames that the line had already processed when the event occurred,
or AudioSystem.NOT_SPECIFIED
Method Detail |
public final Line getLine()
public final LineEvent.Type getType()
LineEvent.Type.OPEN
, LineEvent.Type.CLOSE
,
LineEvent.Type.START
, or LineEvent.Type.STOP
)public final long getFramePosition()
Note that this field is relevant only to certain events generated by
data lines, such as START
and STOP
. For
events generated by lines that do not count sample frames, and for any
other events for which this value is not known, the position value
should be AudioSystem.NOT_SPECIFIED
.
public String toString()
toString
in class EventObject