#include <sound_anim_marker.h>
Public Member Functions | |
| virtual void | addSound (const NLMISC::TStringId &soundName) |
| CSoundAnimMarker (float time=0.0f) | |
| virtual void | getSounds (std::vector< NLMISC::TStringId > &sounds) |
| virtual float | getTime () const |
| virtual void | play (UAudioMixer *mixer, NL3D::CCluster *cluster, CSoundContext &context) |
| virtual void | removeSound (const NLMISC::TStringId &soundName) |
| virtual void | setTime (float time) |
| virtual | ~CSoundAnimMarker () |
Protected Attributes | |
| TMarkerSoundSet | _Sounds |
| float | _Time |
|
|
Definition at line 52 of file sound_anim_marker.h.
00052 : _Time(time) {} |
|
|
Definition at line 41 of file sound_anim_marker.cpp.
00042 {
00043 }
|
|
|
Add a new sound in the set of to-be-played sounds for this marker Definition at line 65 of file sound_anim_marker.cpp. References nlwarning. Referenced by NLSOUND::CSoundAnimation::load().
|
|
|
Return the set of sounds of this marker Definition at line 92 of file sound_anim_marker.cpp. Referenced by NLSOUND::CSoundAnimation::save().
|
|
|
Returns the time of this marker Definition at line 59 of file sound_anim_marker.h. Referenced by NLSOUND::CSoundAnimation::play(), and NLSOUND::CSoundAnimation::save().
00059 { return _Time; }
|
|
||||||||||||||||
|
Play all the sounds of this marker Definition at line 47 of file sound_anim_marker.cpp. References NLSOUND::UAudioMixer::createSource(), NLSOUND::USource::play(), NLSOUND::CSoundContext::Position, NLSOUND::CSoundContext::RelativeGain, NLSOUND::USource::setPos(), and NLSOUND::USource::setRelativeGain(). Referenced by NLSOUND::CSoundAnimation::play().
00048 {
00049 TMarkerSoundSet::iterator first(_Sounds.begin()), last(_Sounds.end());
00050
00051 for (; first != last; ++first)
00052 {
00053 USource* source = mixer->createSource((*first), true, NULL, NULL, cluster, &context);
00054 if (source != NULL)
00055 {
00056 source->setRelativeGain(context.RelativeGain);
00057 source->setPos(context.Position);
00058 source->play();
00059 }
00060 }
00061 }
|
|
|
Remove a sound Definition at line 77 of file sound_anim_marker.cpp. References nlwarning.
|
|
|
Set the time of this marker Definition at line 56 of file sound_anim_marker.h. Referenced by NLSOUND::CSoundAnimation::load().
00056 { _Time = time; }
|
|
|
The set of sounds to be played Definition at line 77 of file sound_anim_marker.h. |
|
|
The time position of this marker Definition at line 80 of file sound_anim_marker.h. |
1.3.6