Class handling the play state and volume of a Graph::ITimelineNode which is enclosing a Graph::IAudioSequenceNode node. More...
#include "murl_logic_graph_sound_object.h"
Public Member Functions | |
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 | DeInit () |
Deinitialize 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... | |
Static Public Member Functions | |
static GraphSoundObjectPtr | Create () |
Create a GraphSoundObject object. More... | |
static GraphSoundObjectPtr | Create (Real masterVolume) |
Create a GraphSoundObject object with a given master volume. More... | |
Public Attributes | |
TimelineNode | mTimelineNode |
The timeline node reference. | |
AudioSequenceNode | mAudioSequenceNode |
The audio sequence node reference. | |
Detailed Description
Class handling the play state and volume of a Graph::ITimelineNode which is enclosing a Graph::IAudioSequenceNode node.
e.g.
Constructor & Destructor Documentation
◆ GraphSoundObject() [1/2]
|
inline |
◆ GraphSoundObject() [2/2]
|
inline |
Constructor taking a master volume.
- Parameters
-
masterVolume The master volume in range [0.0 .. 1.0].
Member Function Documentation
◆ Create() [1/2]
|
inlinestatic |
Create a GraphSoundObject object.
The default master volume is 1.0.
- Returns
- The GraphSoundObject shared pointer.
References GraphSoundObject().
◆ Create() [2/2]
|
inlinestatic |
Create a GraphSoundObject object with a given master volume.
- Parameters
-
masterVolume The master volume in range [0.0 .. 1.0].
- Returns
- The GraphSoundObject shared pointer.
References GraphSoundObject().
◆ Init() [1/2]
|
inlinevirtual |
Initialize the object.
- Parameters
-
nodeObserver The INodeObserver object. root The graph root node. timelinePath The full path to the graph timeline node instance. sequencePath The full path to the graph audio sequence node instance. index The index of the instance.
- Returns
- true if successful.
References Murl::Graph::IRoot::GetRootNamespace().
Referenced by Murl::Logic::GraphSoundInstance::Init().
◆ Init() [2/2]
|
inlinevirtual |
Initialize the object.
- Parameters
-
nodeObserver The INodeObserver object. namespaceNode The graph namespace node. timelinePath The relative path to the graph timeline node instance. sequencePath The relative path to the graph audio sequence node instance. index The index of the instance.
- Returns
- true if successful.
References Murl::Logic::INodeObserver::Add(), Murl::Logic::GraphNodeT< NodeType >::GetReference(), Murl::Logic::GraphNodeT< NodeType >::IsValid(), mAudioSequenceNode, and mTimelineNode.
◆ DeInit()
|
inlinevirtual |
Deinitialize the object.
- Returns
- true if successful.
Reimplemented in Murl::Logic::GraphSoundInstance.
References StopPlaying().
Referenced by Murl::Logic::GraphSoundInstance::DeInit().
◆ StartPlaying() [1/2]
Start playing the sound.
- Parameters
-
startTime The start time in seconds.
- Returns
- true if successful.
References Murl::Graph::IPlayable::GetTotalDuration(), Murl::Graph::IPlayable::IsEndlessLoopEnabled(), Murl::Logic::GraphNodeT< NodeType >::IsValid(), mAudioSequenceNode, mTimelineNode, and Murl::Graph::IRunnable::Start().
Referenced by ContinuePlaying().
◆ StartPlaying() [2/2]
|
inlinevirtual |
Start playing the sound.
- Parameters
-
startTime The start time in seconds. endTime The end time in seconds.
- Returns
- true if successful.
References Murl::Logic::GraphNodeT< NodeType >::IsValid(), mAudioSequenceNode, mTimelineNode, and Murl::Graph::IRunnable::Start().
◆ IsPlaying()
|
inlinevirtual |
Check if the sound is playing.
- Returns
- true if the sound is playing.
References Murl::Graph::IRunnable::IsRunning(), Murl::Logic::GraphNodeT< NodeType >::IsValid(), and mTimelineNode.
◆ PausePlaying()
|
inlinevirtual |
Pause playing the sound.
- Returns
- true successful.
References Murl::Logic::GraphNodeT< NodeType >::IsValid(), mTimelineNode, and Murl::Graph::IRunnable::Pause().
◆ ContinuePlaying()
|
inlinevirtual |
Continue playing the sound.
Continue if the sound is paused, otherwise start the sound.
- Returns
- true successful.
References Murl::Graph::IRunnable::IsPaused(), Murl::Logic::GraphNodeT< NodeType >::IsValid(), mTimelineNode, Murl::Graph::IRunnable::Start(), and StartPlaying().
◆ StopPlaying()
|
inlinevirtual |
Stop playing the sound.
- Returns
- true successful.
References Murl::Logic::GraphNodeT< NodeType >::IsValid(), mTimelineNode, Murl::Graph::IRunnable::Reset(), and Murl::Graph::IRunnable::Stop().
Referenced by DeInit(), Murl::Logic::GraphSoundInstance::OnReset(), and Murl::Logic::GraphSoundInstance::SetObtained().
◆ SetVolume()
|
inlinevirtual |
Set the sound volume.
The sound volume is multiplied by the master volume.
- Parameters
-
volume The volume in range [0.0 .. 1.0].
References Murl::Logic::GraphNodeT< NodeType >::IsValid(), mAudioSequenceNode, and Murl::Graph::IAudible::SetVolume().
◆ SetMasterVolume()
|
inlinevirtual |
Set the master volume.
- Parameters
-
volume The master volume in range [0.0 .. 1.0].
Referenced by Murl::Logic::GraphSoundInstance::OnReset().
◆ GetMasterVolume()
|
inlinevirtual |
Get the master volume.
- Returns
- The master volume.
The documentation for this class was generated from the following file:
- murl_logic_graph_sound_object.h