Class controlling a sound sub tree for GraphInstanceObjects usage.
MyLogic.h
#include "murl_logic_graph_instance_objects.h"
#include "murl_logic_graph_sound_instance.h"
...
Logic::GraphInstanceObjects<Logic::GraphSoundInstance> mMyInstances;
MyLogic.cpp
Bool App::MyLogic::OnInit(
const Logic::IState* state)
{
const Graph::IRoot* root = state->GetGraphRoot();
if (!mMyInstances.Init(root, "/MY_LOCATION", "/MY_INSTANCE_NODE", "/MY_INSTANCE"))
{
return false;
}
return true;
}
Bool App::MyLogic::OnDeInit(
const Logic::IState* state)
{
if (!mMyInstances.DeInit())
{
ret = false;
}
return ret;
}
bool Bool
Boolean data type This typedef represents a boolean value (true or false).
Definition: murl_types.h:174
MyGraph.xml
<Namespace id="MY_LOCATION">
<Instance id="MY_INSTANCE_NODE" graphResourceId="MyInstanceXml" replications="10"
</Namespace>
MyInstance.xml
<Graph>
<Namespace id="MY_INSTANCE{replication}" activeAndVisible="no">
<Timeline id="timeline">
<AudioSequence id="sequence"/>
</Timeline>
</Namespace>
</Graph>
Alternatively a replication with anonymous namespace can be accessed as follows.
Bool App::MyLogic::OnInit(
const Logic::IState* state)
{
if (!mMyInstances.Init(root->GetRootNamespace(), "/MY_LOCATION/MY_INSTANCE_NODE"))
{
return false;
}
return true;
}
MyInstance.xml
<Graph>
<Namespace activeAndVisible="no">
<Timeline id="timeline">
<AudioSequence id="sequence"/>
</Timeline>
</Namespace>
</Graph>
|
| GraphSoundInstance (Real masterVolume=static_cast< Real >(1.0)) |
| The default constructor. More...
|
|
| ~GraphSoundInstance () override |
| The destructor.
|
|
Bool | Init (INodeObserver *nodeObserver, const Graph::IRoot *root, const String &replicationIdPath, SInt32 index) override |
| Initialize the object. More...
|
|
Bool | Init (INodeObserver *nodeObserver, Graph::INode *replicationNode, SInt32 index) override |
| Initialize the object. More...
|
|
Bool | DeInit () override |
| Deinitialize the object. More...
|
|
void | SetObtained (Bool isObtained) override |
| Set the obtained state. More...
|
|
virtual Bool | Init (INodeObserver *nodeObserver, const Graph::IRoot *root, const String &timelinePath, const String &sequencePath, SInt32 index) |
| Initialize the object. More...
|
|
virtual Bool | Init (INodeObserver *nodeObserver, Graph::INamespace *namespaceNode, const String &timelinePath, const String &sequencePath, SInt32 index) |
| Initialize the object. More...
|
|
| BaseStepable () |
| The default constructor. More...
|
|
| ~BaseStepable () override |
| The destructor. More...
|
|
| operator IStepablePtr () |
| Conversion operator. More...
|
|
| ~Stepable () override |
| The destructor.
|
|
Bool | SetAppStepable (IAppStepablePtr appStepable) override |
| Implementation of IStepable::SetAppStepable() method. More...
|
|
void | SetEnabled (Bool isEnabled) override |
| Implementation of IStepable::SetEnabled() method. More...
|
|
Bool | IsEnabled () const override |
| Implementation of IStepable::IsEnabled() method. More...
|
|
void | Reset () override |
| Implementation of IStepable::Reset() method.
|
|
void | ProcessTick (const Logic::IState *state) override |
| Implementation of IStepable::ProcessTick() method. More...
|
|
void | FinishTick (const Logic::IState *state) override |
| Implementation of IStepable::FinishTick() method. More...
|
|
| GraphSoundObject () |
| The default constructor. More...
|
|
| GraphSoundObject (Real masterVolume) |
| Constructor taking a master volume. More...
|
|
virtual | ~GraphSoundObject () |
| The destructor.
|
|
virtual Bool | Init (INodeObserver *nodeObserver, const Graph::IRoot *root, const String &timelinePath, const String &sequencePath, SInt32 index) |
| Initialize the object. More...
|
|
virtual Bool | Init (INodeObserver *nodeObserver, Graph::INamespace *namespaceNode, const String &timelinePath, const String &sequencePath, SInt32 index) |
| Initialize the object. More...
|
|
virtual Bool | StartPlaying (Real startTime=0) |
| Start playing the sound. More...
|
|
virtual Bool | StartPlaying (Real startTime, Real endTime) |
| Start playing the sound. More...
|
|
virtual Bool | IsPlaying () const |
| Check if the sound is playing. More...
|
|
virtual Bool | PausePlaying () |
| Pause playing the sound. More...
|
|
virtual Bool | ContinuePlaying () |
| Continue playing the sound. More...
|
|
virtual Bool | StopPlaying () |
| Stop playing the sound. More...
|
|
virtual void | SetVolume (Real volume) |
| Set the sound volume. More...
|
|
virtual void | SetMasterVolume (Real volume) |
| Set the master volume. More...
|
|
virtual Real | GetMasterVolume () const |
| Get the master volume. More...
|
|