|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.commonreality.sensors.aural.GeneralAuralProcessor
public class GeneralAuralProcessor
the general aural processor is a component that monitors all the realobjects
looking for anything that is audible. Any sound is output to the simulation
as an IRealObject with the IAuralPropertyHandler properties.
It will then transform that aural into an IAfferentObject for each of
the connected agents. Calls to update(double) will remove any
IAfferentObject that have exceeded their duration.
If additional properties need to be set on a percept level (i.e. spatial
localization of the sound), this can be done by adding an
GeneralAuralProcessor.IAuralMutator via
add(org.commonreality.sensors.aural.GeneralAuralProcessor.IAuralMutator)
This should be attached to the sensors RealObjectManager on an
executor other than the sensors IO executor (since it may have to block to
create new IAfferentObjects)
| Nested Class Summary | |
|---|---|
static interface |
GeneralAuralProcessor.IAuralMutator
interface used to dynamically configure aural percepts |
| Constructor Summary | |
|---|---|
GeneralAuralProcessor(ISensor sensor)
|
|
| Method Summary | |
|---|---|
void |
add(GeneralAuralProcessor.IAuralMutator mutator)
|
void |
objectsAdded(IObjectEvent<IRealObject,?> addEvent)
|
void |
objectsRemoved(IObjectEvent<IRealObject,?> removeEvent)
this ignores the removal of the original IRealObject that launched
the IAfferentObject percept of the sound, since the percept is
internal |
void |
objectsUpdated(IObjectEvent<IRealObject,?> updateEvent)
aural events don't change once they've been detected |
double |
update(double currentTime)
update all IAfferentObjects representing percepts of hearable
aural objects, removing any of those that have elapsed. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GeneralAuralProcessor(ISensor sensor)
| Method Detail |
|---|
public void add(GeneralAuralProcessor.IAuralMutator mutator)
public double update(double currentTime)
IAfferentObjects representing percepts of hearable
aural objects, removing any of those that have elapsed.
currentTime -
public void objectsAdded(IObjectEvent<IRealObject,?> addEvent)
objectsAdded in interface IObjectListener<IRealObject>public void objectsRemoved(IObjectEvent<IRealObject,?> removeEvent)
IRealObject that launched
the IAfferentObject percept of the sound, since the percept is
internal
objectsRemoved in interface IObjectListener<IRealObject>public void objectsUpdated(IObjectEvent<IRealObject,?> updateEvent)
objectsUpdated in interface IObjectListener<IRealObject>updateEvent - IObjectListener.objectsUpdated(org.commonreality.object.manager.event.IObjectEvent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||