Om
1.0.0
A universal framework for multimedia simulation
|
A generic interface for classes that perform sound propagation and rendering. More...
#include <omAcousticContext.h>
Public Member Functions | |
virtual | ~AcousticContext () |
Destroy an acoustic context and release all internal resources. More... | |
virtual void | update (const AcousticRequest &request, const Time &dt, AcousticResult *result=((void *) 0))=0 |
Update the state of all scenes and listeners in the acoustic context for the specified timestep. More... | |
virtual Bool | updateScene (SoundSceneID sceneID, const AcousticRequest &request, const Time &dt, AcousticResult *result=((void *) 0))=0 |
Update the state of all listeners in the given scene for the specified timestep. More... | |
virtual Bool | updateListener (SoundListenerID listenerID, const AcousticRequest &request, const Time &dt, AcousticResult *result=((void *) 0))=0 |
Update the state of a single listener in the acoustic context for the specified timestep. More... | |
virtual SoundResult | renderListener (SoundListenerID listenerID, SoundBuffer &buffer, Size numSamples)=0 |
Render a buffer of output sound for the specified listener. More... | |
virtual Size | getListenerCount () const =0 |
Return the number of listeners there are in this acoustic context. More... | |
virtual SoundListenerID | addListener (SoundListener *listener)=0 |
Add a new sound listener to this acoustic context and return the ID of the listener in the context. More... | |
virtual Bool | removeListener (SoundListenerID listenerID)=0 |
Remove the listener with the specified ID from this acoustic context. More... | |
virtual void | clearListeners ()=0 |
Remove all listeners from this acoustic context. More... | |
virtual Size | getSourceCount () const =0 |
Return the number of sources there are in this acoustic context. More... | |
virtual SoundSourceID | addSource (SoundSource *source)=0 |
Add a new sound source to this acoustic context and return the ID of the source in the context. More... | |
virtual Bool | removeSource (SoundSourceID sourceID)=0 |
Remove the source with the specified ID from this acoustic context. More... | |
virtual void | clearSources ()=0 |
Remove all sources from this acoustic context. More... | |
virtual Size | getObjectCount () const =0 |
Return the number of objects there are in this acoustic context. More... | |
virtual SoundObjectID | addObject (SoundObject *object)=0 |
Add a new sound object to this acoustic context and return the ID of the object in the context. More... | |
virtual Bool | removeObject (SoundObjectID objectID)=0 |
Remove the object with the specified ID from this acoustic context. More... | |
virtual void | clearObjects ()=0 |
Remove all objects from this acoustic context. More... | |
virtual Size | getShapeCount () const =0 |
Return the number of shapes there are in this acoustic context. More... | |
virtual SoundShapeID | addShape (SoundShape *shape)=0 |
Add a new sound shape to this acoustic context and return the ID of the shape in the context. More... | |
virtual Bool | removeShape (SoundShapeID shapeID)=0 |
Remove the shape with the specified ID from this acoustic context. More... | |
virtual void | clearShapes ()=0 |
Remove all shapes from this acoustic context. More... | |
virtual Size | getSceneCount () const =0 |
Return the number of scenes there are in this acoustic context. More... | |
virtual SoundSceneID | addScene ()=0 |
Add a new sound scene to this acoustic context and return the ID of the scene in the context. More... | |
virtual Bool | removeScene (SoundSceneID sceneID)=0 |
Remove the object with the specified ID from this acoustic context. More... | |
virtual void | clearScenes ()=0 |
Remove all scenes from this acoustic context. More... | |
virtual Bool | addSceneObject (SoundSceneID scene, SoundObjectID object)=0 |
Add an existing object to the scene with the given ID. More... | |
virtual Bool | removeSceneObject (SoundSceneID scene, SoundObjectID object)=0 |
Remove an existing object from the scene with the given ID. More... | |
virtual Bool | addSceneSource (SoundSceneID scene, SoundSourceID source)=0 |
Add an existing source to the scene with the given ID. More... | |
virtual Bool | removeSceneSource (SoundSceneID scene, SoundSourceID source)=0 |
Remove an existing source from the scene with the given ID. More... | |
virtual Bool | addSceneListener (SoundSceneID scene, SoundListenerID listener)=0 |
Add an existing listener to the scene with the given ID. More... | |
virtual Bool | removeSceneListener (SoundSceneID scene, SoundListenerID listener)=0 |
Remove an existing listener from the scene with the given ID. More... | |
virtual Bool | addObjectShape (SoundObjectID object, SoundShapeID shape)=0 |
Add an existing shape to the object with the given ID. More... | |
virtual Bool | removeObjectShape (SoundObjectID object, SoundShapeID shape)=0 |
Remove an existing shape from the object with the given ID. More... | |
virtual Bool | addSourceShape (SoundSourceID source, SoundShapeID shape)=0 |
Add an existing shape to the source with the given ID. More... | |
virtual Bool | removeSourceShape (SoundSourceID source, SoundShapeID shape)=0 |
Remove an existing shape from the source with the given ID. More... | |
virtual Bool | addListenerShape (SoundListenerID listener, SoundShapeID shape)=0 |
Add an existing shape to the listener with the given ID. More... | |
virtual Bool | removeListenerShape (SoundListenerID listener, SoundShapeID shape)=0 |
Remove an existing shape from the listener with the given ID. More... | |
virtual const AcousticContextDelegate & | getDelegate () const =0 |
Return a reference to the delegate for this acoustic context. More... | |
virtual void | setDelegate (const AcousticContextDelegate &newDelegate)=0 |
Set the delegate for this acoustic context. More... | |
Static Public Attributes | |
static const AcousticID | INVALID_ID = -1 |
The ID to use to represent an invalid context object ID. More... | |
A generic interface for classes that perform sound propagation and rendering.
Subclasses can provide different implementations that meet the requirements of various applications.
|
virtual |
Destroy an acoustic context and release all internal resources.
|
pure virtual |
Update the state of all scenes and listeners in the acoustic context for the specified timestep.
The requested output acoustic data is placed in the result object if the pointer is not NULL.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Update the state of all listeners in the given scene for the specified timestep.
The state of the specified scene is updated but no other scenes are changed. This method can be used to update scenes at different rates (e.g. for different priorities).
The requested output acoustic data is placed in the result object if the pointer is not NULL.
The method returns whether or not the specified scene was able to be updated.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Update the state of a single listener in the acoustic context for the specified timestep.
The state of the specified listener is updated but no other listeners are changed. This method can be used to update listeners at different rates (e.g. for different priorities).
The requested output acoustic data is placed in the result object if the pointer is not NULL.
The method returns whether or not the specified listener was able to be updated.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Render a buffer of output sound for the specified listener.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Return the number of listeners there are in this acoustic context.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Add a new sound listener to this acoustic context and return the ID of the listener in the context.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Remove the listener with the specified ID from this acoustic context.
The method returns whether or not the listener was able to be removed.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Remove all listeners from this acoustic context.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Return the number of sources there are in this acoustic context.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Add a new sound source to this acoustic context and return the ID of the source in the context.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Remove the source with the specified ID from this acoustic context.
The method returns whether or not the source was able to be removed.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Remove all sources from this acoustic context.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Return the number of objects there are in this acoustic context.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Add a new sound object to this acoustic context and return the ID of the object in the context.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Remove the object with the specified ID from this acoustic context.
The method returns whether or not the object was able to be removed.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Remove all objects from this acoustic context.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Return the number of shapes there are in this acoustic context.
|
pure virtual |
Add a new sound shape to this acoustic context and return the ID of the shape in the context.
|
pure virtual |
Remove the shape with the specified ID from this acoustic context.
The method returns whether or not the shape was able to be removed.
|
pure virtual |
Remove all shapes from this acoustic context.
|
pure virtual |
Return the number of scenes there are in this acoustic context.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Add a new sound scene to this acoustic context and return the ID of the scene in the context.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Remove the object with the specified ID from this acoustic context.
The method returns whether or not the object was able to be removed.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Remove all scenes from this acoustic context.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Add an existing object to the scene with the given ID.
An object can be part of more than one scene. The method returns whether or not the object was able to be added to the scene.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Remove an existing object from the scene with the given ID.
The method returns whether or not the object was able to be removed from the scene.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Add an existing source to the scene with the given ID.
An source can be part of more than one scene. The method returns whether or not the source was able to be added to the scene.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Remove an existing source from the scene with the given ID.
The method returns whether or not the source was able to be removed from the scene.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Add an existing listener to the scene with the given ID.
An listener can be part of more than one scene. The method returns whether or not the listener was able to be added to the scene.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Remove an existing listener from the scene with the given ID.
The method returns whether or not the listener was able to be removed from the scene.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Add an existing shape to the object with the given ID.
A shape can be part of more than one object. The method returns whether or not the shape was able to be added to the object.
|
pure virtual |
Remove an existing shape from the object with the given ID.
The method returns whether or not the shape was able to be removed from the object.
|
pure virtual |
Add an existing shape to the source with the given ID.
A shape can be part of more than one source. The method returns whether or not the shape was able to be added to the source.
|
pure virtual |
Remove an existing shape from the source with the given ID.
The method returns whether or not the shape was able to be removed from the source.
|
pure virtual |
Add an existing shape to the listener with the given ID.
A shape can be part of more than one listener. The method returns whether or not the shape was able to be added to the listener.
|
pure virtual |
Remove an existing shape from the listener with the given ID.
The method returns whether or not the shape was able to be removed from the listener.
|
pure virtual |
Return a reference to the delegate for this acoustic context.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
pure virtual |
Set the delegate for this acoustic context.
Implemented in om::sound::acoustics::contexts::GeometricAcousticContext.
|
static |
The ID to use to represent an invalid context object ID.