|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.actor.lib.javasound.LiveSoundActor
This actor forms a base class for actors that interact with real-time sound through the ptolemy.media.LiveSound class. This class manages the parameters for live sound.
Note: Requires Java 2 v1.3.0 or later.
LiveSound,
AudioPlayer,
AudioCapture,
Serialized Form
| Yellow (chf) |
| Green (neuendor) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.Entity |
ptolemy.kernel.Entity.ContainedObjectsIterator |
| Field Summary | |
protected int |
_channels
|
protected boolean |
_isExecuting
|
protected int |
_transferSize
|
ptolemy.data.expr.Parameter |
bitsPerSample
The number desired number of bits per sample. |
ptolemy.data.expr.Parameter |
channels
The number of audio channels to use. |
ptolemy.data.expr.Parameter |
sampleRate
The desired sample rate to use, in Hz. |
ptolemy.data.expr.Parameter |
transferSize
The number of samples that will be transferred to the audio driver together. |
| Fields inherited from class ptolemy.actor.AtomicActor |
_stopRequested |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Fields inherited from interface ptolemy.actor.Executable |
COMPLETED, NOT_READY, STOP_ITERATING |
| Constructor Summary | |
LiveSoundActor(ptolemy.kernel.CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name. |
|
| Method Summary | |
protected void |
_initializeAudio()
Initialize the audio system. |
void |
attributeChanged(ptolemy.kernel.util.Attribute attribute)
Handle change requests for all parameters. |
void |
initialize()
Initialize this actor. |
void |
liveSoundChanged(LiveSoundEvent event)
Notify this actor that the an audio parameter of LiveSound has changed. |
void |
wrapup()
Wrapup execution. |
| Methods inherited from class ptolemy.actor.TypedAtomicActor |
_addPort, attributeTypeChanged, clone, newPort, typeConstraintList |
| Methods inherited from class ptolemy.actor.AtomicActor |
_createReceivers, clone, connectionsChanged, fire, getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, removeDependency, setContainer, stop, stopFire, terminate |
| Methods inherited from class ptolemy.kernel.ComponentEntity |
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, propagateExistence, setName |
| Methods inherited from class ptolemy.kernel.Entity |
_description, _exportMoMLContents, _removePort, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName, validateSettables |
| Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition |
| Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeList, attributeList, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, toplevel, toString, workspace |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ptolemy.actor.Actor |
getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, newReceiver, outputPortList |
| Methods inherited from interface ptolemy.actor.Executable |
fire, iterate, postfire, prefire, preinitialize, stop, stopFire, terminate |
| Methods inherited from interface ptolemy.kernel.util.Derivable |
getDerivedLevel, getDerivedList, propagateValue |
| Methods inherited from interface ptolemy.kernel.util.Nameable |
description, getFullName, getName, getName |
| Field Detail |
public ptolemy.data.expr.Parameter sampleRate
An exception will be occur if this parameter is set to an unsupported sample rate.
public ptolemy.data.expr.Parameter bitsPerSample
An exception will occur if this parameter is set to an unsupported bit resolution.
public ptolemy.data.expr.Parameter channels
An exception will occur if this parameter is set to an an unsupported channel number.
public ptolemy.data.expr.Parameter transferSize
protected int _channels
protected int _transferSize
protected boolean _isExecuting
| Constructor Detail |
public LiveSoundActor(ptolemy.kernel.CompositeEntity container,
java.lang.String name)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.kernel.util.NameDuplicationException
container - The container.name - The name of this actor.
ptolemy.kernel.util.IllegalActionException - If the actor cannot be contained
by the proposed container.
ptolemy.kernel.util.NameDuplicationException - If the container already has an
actor with this name.| Method Detail |
public void attributeChanged(ptolemy.kernel.util.Attribute attribute)
throws ptolemy.kernel.util.IllegalActionException
ptolemy.kernel.util.IllegalActionException - If the change is not
allowed.
public void initialize()
throws ptolemy.kernel.util.IllegalActionException
initialize in interface ptolemy.actor.Executableptolemy.kernel.util.IllegalActionException - If there is a problem
beginning audio playback.public void liveSoundChanged(LiveSoundEvent event)
liveSoundChanged in interface LiveSoundListenerevent - The live sound change event.
public void wrapup()
throws ptolemy.kernel.util.IllegalActionException
wrapup in interface ptolemy.actor.Executableptolemy.kernel.util.IllegalActionException - May be thrown by derived classes.
protected void _initializeAudio()
throws ptolemy.kernel.util.IllegalActionException,
java.io.IOException
ptolemy.kernel.util.IllegalActionException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||