|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.jagrlib.DefaultProperty
cz.cuni.jagrlib.Piece
cz.cuni.jagrlib.piece.AudioReplay
public class AudioReplay
Audio replay module with GUI window.
Field Summary | |
---|---|
protected javax.sound.sampled.AudioFormat |
audioFormat
Audio format of the replayed data. |
protected static int |
BAR_HEIGHT
Height of progress bar canvas (in pixels). |
protected static int |
BAR_WIDTH
Width of progress bar canvas (in pixels). |
protected static int |
BIG_STEP
Fraction of big step (PageDown, PageUp). |
protected int |
bytesPerSample
Number of bytes per sample ( 8 to 32 ). |
protected int |
bytesPerSecond
Accelerator for replay-loop. |
protected static java.lang.String |
CATEGORY
Object category. |
protected javax.sound.sampled.DataLine.Info |
dataLineInfo
Information about the used audio data line. |
protected static double |
FRAME
Replay frame size in seconds. |
protected java.lang.String |
frameTitle
Replay frame title. |
protected int |
frequency
Replay frequency in Hz (samples per second). |
protected int |
fromChannel
First replayed channel ( 0 or 1 ). |
protected int |
fromSample
Start of replayed segment (in samples). |
protected boolean |
chPosition
Sample pointer should be changed. |
protected java.lang.String |
info
Replay info string. |
static java.lang.String |
INFO_STRING
|
protected int |
newPtr
New value of samplePtr . |
static RegPiece |
reg
Static registration instance for this class. |
protected boolean |
restart
Restart the whole replay? |
protected SampleData |
sampleObject
Source data object. |
protected int |
samplePtr
Source data pointer (in samples). |
protected static int |
SMALL_STEP
Fraction of small step (Left, Right). |
protected javax.sound.sampled.SourceDataLine |
sourceDataLine
Audio data line object. |
protected boolean |
stopped
Stopped state (space bar can restart the replay). |
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
protected cz.cuni.jagrlib.piece.AudioReplay.ReplayThread |
thread
Replay-thread instance. |
protected static int |
TINY_STEP
Fraction of tiny step (Shift+Left, Shift+Right). |
protected int |
toChannel
After the last replayed channel ( 1 or 2 ). |
protected int |
toSample
End of replayed segment (in samples). |
protected boolean |
userBreak
Has the user-break occurred? |
static java.lang.String |
WINDOW_TITLE
|
Fields inherited from class cz.cuni.jagrlib.Piece |
---|
channels, pl, plugs, TEMPLATE_TYPE |
Fields inherited from interface cz.cuni.jagrlib.iface.Property |
---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
Constructor Summary | |
---|---|
AudioReplay()
|
Method Summary | |
---|---|
protected void |
finishReplay()
Finishes the replay loop. |
boolean |
fire(int type)
Triggers the (undetermined) action. |
java.lang.Object |
get(java.lang.String key)
Gets the given property. |
protected void |
moveRelative(int delta)
Move replay pointer relative to the actual position. |
void |
set(java.lang.String key,
java.lang.Object value)
Sets the given property. |
static int |
setTemplate(Template t,
int ord)
General-purpose registration routine. |
protected void |
startStopReplay()
Start/stop replaying. |
Methods inherited from class cz.cuni.jagrlib.Piece |
---|
className, connect, findPlug, findPlug, getInfo, getInterface, getInterface, getPlug, getReg, init, isCompatible, isCompatible, isConnected, logError, logWarning, myInterface, newInputPlug, newOptOutputPlug, newOutputPlug, newPlug, noTemplates, propBegin, propBounds, propDefault, propEnd, propEnum, propManipulator, propManipulator, setProgressListener, setRegStrings, setTemplateDynamic, stop |
Methods inherited from class cz.cuni.jagrlib.DefaultProperty |
---|
booleanProperty, booleanProperty, colorDoubleProperty, colorProperty, commit, doubleProperty, doubleProperty, doubleProperty, enumProperty, floatProperty, floatProperty, floatProperty, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, set, stringProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cz.cuni.jagrlib.iface.Property |
---|
commit |
Methods inherited from interface cz.cuni.jagrlib.Breakable |
---|
setProgressListener, stop |
Field Detail |
---|
protected static final int BAR_WIDTH
protected static final int BAR_HEIGHT
protected static final double FRAME
protected static final int BIG_STEP
protected static final int SMALL_STEP
protected static final int TINY_STEP
protected java.lang.String frameTitle
protected java.lang.String info
protected boolean restart
protected boolean userBreak
protected boolean stopped
protected boolean chPosition
protected int newPtr
samplePtr
.
protected int frequency
protected int bytesPerSample
8
to 32
).
protected int bytesPerSecond
protected javax.sound.sampled.AudioFormat audioFormat
protected javax.sound.sampled.DataLine.Info dataLineInfo
protected javax.sound.sampled.SourceDataLine sourceDataLine
protected cz.cuni.jagrlib.piece.AudioReplay.ReplayThread thread
protected SampleData sampleObject
protected int samplePtr
protected int fromSample
protected int toSample
protected int fromChannel
0
or 1
).
protected int toChannel
1
or 2
).
public static final java.lang.String INFO_STRING
public static final java.lang.String WINDOW_TITLE
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
Constructor Detail |
---|
public AudioReplay()
Method Detail |
---|
protected void finishReplay()
protected void startStopReplay()
protected void moveRelative(int delta)
public boolean fire(int type)
fire
in interface Trigger
type
- The action type (whatever it means..).
true
if the action was successful.public void set(java.lang.String key, java.lang.Object value)
set
in interface Property
set
in class DefaultProperty
key
- Key string.value
- The new value.Property.commit()
public java.lang.Object get(java.lang.String key)
get
in interface Property
get
in class DefaultProperty
key
- Key string.
null
.public static int setTemplate(Template t, int ord)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |