Om
1.0.0
A universal framework for multimedia simulation
|
A class that uses geometric sound propagation algorithms to simulate virtual acoustics. More...
#include <omGeometricAcousticContext.h>
Classes | |
class | Request |
A class that stores implementation-specific parameters for a geometric acoustic context. More... | |
Public Member Functions | |
GeometricAcousticContext () | |
Create a new empty geometric acoustic context with the default state. More... | |
~GeometricAcousticContext () | |
Destroy a geometric acoustic context and release all internal resources. More... | |
virtual void | update (const AcousticRequest &request, const Time &dt, AcousticResult *result=((void *) 0)) |
Update the state of all 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)) |
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)) |
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) |
Render a buffer of output sound for the specified listener. More... | |
virtual Size | getListenerCount () const |
Return the number of listeners there are in this acoustic context. More... | |
virtual SoundListenerID | addListener (SoundListener *listener) |
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) |
Remove the listener with the specified ID from this acoustic context. More... | |
virtual void | clearListeners () |
Remove all listeners from this acoustic context. More... | |
virtual Size | getSourceCount () const |
Return the number of sources there are in this acoustic context. More... | |
virtual SoundSourceID | addSource (SoundSource *source) |
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) |
Remove the source with the specified ID from this acoustic context. More... | |
virtual void | clearSources () |
Remove all sources from this acoustic context. More... | |
virtual Size | getObjectCount () const |
Return the number of objects there are in this acoustic context. More... | |
virtual SoundObjectID | addObject (SoundObject *object) |
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) |
Remove the object with the specified ID from this acoustic context. More... | |
virtual void | clearObjects () |
Remove all objects from this acoustic context. More... | |
virtual Size | getSceneCount () const |
Return the number of scenes there are in this acoustic context. More... | |
virtual SoundSceneID | addScene () |
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) |
Remove the object with the specified ID from this acoustic context. More... | |
virtual void | clearScenes () |
Remove all scenes from this acoustic context. More... | |
virtual Bool | addSceneObject (SoundSceneID scene, SoundObjectID object) |
Add an existing object to the scene with the given ID. More... | |
virtual Bool | removeSceneObject (SoundSceneID scene, SoundObjectID object) |
Remove an existing object from the scene with the given ID. More... | |
virtual Bool | addSceneSource (SoundSceneID scene, SoundSourceID source) |
Add an existing source to the scene with the given ID. More... | |
virtual Bool | removeSceneSource (SoundSceneID scene, SoundSourceID source) |
Remove an existing source from the scene with the given ID. More... | |
virtual Bool | addSceneListener (SoundSceneID scene, SoundListenerID listener) |
Add an existing listener to the scene with the given ID. More... | |
virtual Bool | removeSceneListener (SoundSceneID scene, SoundListenerID listener) |
Remove an existing listener from the scene with the given ID. More... | |
virtual const AcousticContextDelegate & | getDelegate () const |
Return a reference to the delegate for this acoustic context. More... | |
virtual void | setDelegate (const AcousticContextDelegate &newDelegate) |
Set the delegate for this acoustic context. More... | |
Public Member Functions inherited from om::sound::acoustics::contexts::AcousticContext | |
virtual | ~AcousticContext () |
Destroy an acoustic context and release all internal resources. 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 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... | |
Additional Inherited Members | |
Static Public Attributes inherited from om::sound::acoustics::contexts::AcousticContext | |
static const AcousticID | INVALID_ID = -1 |
The ID to use to represent an invalid context object ID. More... | |
A class that uses geometric sound propagation algorithms to simulate virtual acoustics.
om::sound::acoustics::contexts::GeometricAcousticContext::GeometricAcousticContext | ( | ) |
Create a new empty geometric acoustic context with the default state.
om::sound::acoustics::contexts::GeometricAcousticContext::~GeometricAcousticContext | ( | ) |
Destroy a geometric acoustic context and release all internal resources.
|
virtual |
Update the state of all 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.
Implements om::sound::acoustics::contexts::AcousticContext.
|
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.
Implements om::sound::acoustics::contexts::AcousticContext.
|
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.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Render a buffer of output sound for the specified listener.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Return the number of listeners there are in this acoustic context.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Add a new sound listener to this acoustic context and return the ID of the listener in the context.
Implements om::sound::acoustics::contexts::AcousticContext.
|
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.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Remove all listeners from this acoustic context.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Return the number of sources there are in this acoustic context.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Add a new sound source to this acoustic context and return the ID of the source in the context.
Implements om::sound::acoustics::contexts::AcousticContext.
|
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.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Remove all sources from this acoustic context.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Return the number of objects there are in this acoustic context.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Add a new sound object to this acoustic context and return the ID of the object in the context.
Implements om::sound::acoustics::contexts::AcousticContext.
|
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.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Remove all objects from this acoustic context.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Return the number of scenes there are in this acoustic context.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Add a new sound scene to this acoustic context and return the ID of the scene in the context.
Implements om::sound::acoustics::contexts::AcousticContext.
|
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.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Remove all scenes from this acoustic context.
Implements om::sound::acoustics::contexts::AcousticContext.
|
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.
Implements om::sound::acoustics::contexts::AcousticContext.
|
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.
Implements om::sound::acoustics::contexts::AcousticContext.
|
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.
Implements om::sound::acoustics::contexts::AcousticContext.
|
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.
Implements om::sound::acoustics::contexts::AcousticContext.
|
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.
Implements om::sound::acoustics::contexts::AcousticContext.
|
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.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Return a reference to the delegate for this acoustic context.
Implements om::sound::acoustics::contexts::AcousticContext.
|
virtual |
Set the delegate for this acoustic context.
Implements om::sound::acoustics::contexts::AcousticContext.