# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLSOUND::CComplexSound Class Reference

#include <complex_sound.h>

Inheritance diagram for NLSOUND::CComplexSound:

NLSOUND::CSound List of all members.

Public Types

enum  TPATTERN_MODE { MODE_UNDEFINED, MODE_CHAINED, MODE_ALL_IN_ONE, MODE_SPARSE }

Public Methods

bool isDetailed () const
 Return true if cone is meaningful. More...

uint32 getDuration ()
 Return the length of the sound in ms. More...

TPATTERN_MODE getPatternMode ()
void setPatternMode (TPATTERN_MODE patternMode)
const std::vector< uint32 > & getSoundSeq () const
const std::vector< uint32 > & getDelaySeq () const
const std::string & getSound (uint index) const
const std::vector< std::string > & getSounds () const
uint32 getFadeLenght () const
 CComplexSound ()
 Constructor. More...

virtual ~CComplexSound ()
 Destructor. More...

virtual void importForm (const std::string &filename, NLGEORGES::UFormElm &formRoot)
 Load the sound parameters from georges' form. More...

TSOUND_TYPE getSoundType ()
 Get the type of the sound. More...

void getSubSoundList (std::vector< std::pair< std::string, CSound * > > &subsounds) const
 Used by the george sound plugin to check sound recursion (ie sound 'toto' use sound 'titi' witch also use sound 'toto' ...). More...

bool doFadeIn ()
bool doFadeOut ()
void serial (NLMISC::IStream &s)
Tempo
virtual float getTicksPerSecond ()
virtual void setTicksPerSecond (float ticks)

Private Methods

void parseSequence (const std::string &str, std::vector< uint32 > &seq, uint scale=1)
virtual float getMaxDistance () const
 Return the max distance (if detailed()). More...


Private Attributes

TPATTERN_MODE _PatternMode
std::vector< std::string > _Sounds
float _TicksPerSeconds
std::vector< uint32_SoundSeq
std::vector< uint32_DelaySeq
 Sequence of delay in millisec. More...

uint32 _XFadeLenght
 Duration of xfade in millisec. More...

bool _DoFadeIn
 Flag for fade in. More...

bool _DoFadeOut
 Flag for fade out (only on normal termination, not explicit stop). More...

bool _MaxDistValid
uint32 _Duration
bool _DurationValid

Member Enumeration Documentation

enum NLSOUND::CComplexSound::TPATTERN_MODE
 

Enumeration values:
MODE_UNDEFINED 
MODE_CHAINED 
MODE_ALL_IN_ONE 
MODE_SPARSE 

Definition at line 46 of file complex_sound.h.

Referenced by getPatternMode, and setPatternMode.


Constructor & Destructor Documentation

NLSOUND::CComplexSound::CComplexSound  
 

Constructor.

Definition at line 138 of file complex_sound.cpp.

Referenced by getMaxDistance.

NLSOUND::CComplexSound::~CComplexSound   [virtual]
 

Destructor.

Definition at line 150 of file complex_sound.cpp.


Member Function Documentation

bool NLSOUND::CComplexSound::doFadeIn   [inline]
 

Definition at line 86 of file complex_sound.h.

References _DoFadeIn.

bool NLSOUND::CComplexSound::doFadeOut   [inline]
 

Definition at line 87 of file complex_sound.h.

References _DoFadeOut.

const std::vector<uint32>& NLSOUND::CComplexSound::getDelaySeq   const [inline]
 

Definition at line 62 of file complex_sound.h.

References _DelaySeq.

uint32 NLSOUND::CComplexSound::getDuration   [virtual]
 

Return the length of the sound in ms.

Implements NLSOUND::CSound.

Definition at line 56 of file complex_sound.cpp.

References _DelaySeq, _Duration, _DurationValid, _Sounds, _SoundSeq, _TicksPerSeconds, _XFadeLenght, NLSOUND::CSound::CSound, MODE_ALL_IN_ONE, MODE_CHAINED, MODE_SPARSE, sint32, and uint32.

uint32 NLSOUND::CComplexSound::getFadeLenght   const [inline]
 

Definition at line 66 of file complex_sound.h.

References _XFadeLenght.

float NLSOUND::CComplexSound::getMaxDistance   const [private, virtual]
 

Return the max distance (if detailed()).

Reimplemented from NLSOUND::CSound.

Definition at line 164 of file complex_sound.cpp.

References NLSOUND::CSound::_MaxDist, _MaxDistValid, _Sounds, CComplexSound, and NLSOUND::CSound::CSound.

TPATTERN_MODE NLSOUND::CComplexSound::getPatternMode   [inline]
 

Definition at line 58 of file complex_sound.h.

References _PatternMode, and TPATTERN_MODE.

const std::string& NLSOUND::CComplexSound::getSound uint    index const [inline]
 

Definition at line 63 of file complex_sound.h.

References _Sounds, and index.

const std::vector<std::string>& NLSOUND::CComplexSound::getSounds   const [inline]
 

Definition at line 64 of file complex_sound.h.

References _Sounds.

const std::vector<uint32>& NLSOUND::CComplexSound::getSoundSeq   const [inline]
 

Definition at line 61 of file complex_sound.h.

References _SoundSeq.

TSOUND_TYPE NLSOUND::CComplexSound::getSoundType   [inline, virtual]
 

Get the type of the sound.

Implements NLSOUND::CSound.

Definition at line 83 of file complex_sound.h.

References NLSOUND::CSound::SOUND_COMPLEX, and NLSOUND::CSound::TSOUND_TYPE.

void NLSOUND::CComplexSound::getSubSoundList std::vector< std::pair< std::string, CSound * > > &    subsounds const [virtual]
 

Used by the george sound plugin to check sound recursion (ie sound 'toto' use sound 'titi' witch also use sound 'toto' ...).

Implements NLSOUND::CSound.

Definition at line 44 of file complex_sound.cpp.

References _Sounds, and NLSOUND::CSound::CSound.

virtual float NLSOUND::CComplexSound::getTicksPerSecond   [inline, virtual]
 

Definition at line 79 of file complex_sound.h.

References _TicksPerSeconds.

void NLSOUND::CComplexSound::importForm const std::string &    filename,
NLGEORGES::UFormElm   formRoot
[virtual]
 

Load the sound parameters from georges' form.

Reimplemented from NLSOUND::CSound.

Definition at line 212 of file complex_sound.cpp.

References _DelaySeq, _DoFadeIn, _DoFadeOut, _DurationValid, _PatternMode, _Sounds, _SoundSeq, _TicksPerSeconds, _XFadeLenght, NLGEORGES::UFormElm::getArraySize, NLGEORGES::UFormElm::getArrayValue, NLGEORGES::UFormElm::getDfnName, NLGEORGES::UFormElm::getNodeByName, NLGEORGES::UFormElm::getValueByName, MODE_ALL_IN_ONE, MODE_CHAINED, MODE_SPARSE, nlassert, nlassertex, and parseSequence.

bool NLSOUND::CComplexSound::isDetailed   const [virtual]
 

Return true if cone is meaningful.

Implements NLSOUND::CSound.

Definition at line 15 of file complex_sound.cpp.

void NLSOUND::CComplexSound::parseSequence const std::string &    str,
std::vector< uint32 > &    seq,
uint    scale = 1
[private]
 

Definition at line 20 of file complex_sound.cpp.

Referenced by importForm.

void NLSOUND::CComplexSound::serial NLMISC::IStream   s [virtual]
 

Reimplemented from NLSOUND::CSound.

Definition at line 194 of file complex_sound.cpp.

References _DelaySeq, _DoFadeIn, _DoFadeOut, _DurationValid, _PatternMode, _Sounds, _SoundSeq, _TicksPerSeconds, _XFadeLenght, NLMISC::IStream::isReading, s, NLMISC::IStream::serial, NLMISC::IStream::serialCont, and NLMISC::IStream::serialEnum.

void NLSOUND::CComplexSound::setPatternMode TPATTERN_MODE    patternMode [inline]
 

Definition at line 59 of file complex_sound.h.

References _PatternMode, and TPATTERN_MODE.

virtual void NLSOUND::CComplexSound::setTicksPerSecond float    ticks [inline, virtual]
 

Definition at line 80 of file complex_sound.h.

References _TicksPerSeconds.


Member Data Documentation

std::vector<uint32> NLSOUND::CComplexSound::_DelaySeq [private]
 

Sequence of delay in millisec.

Definition at line 102 of file complex_sound.h.

Referenced by getDelaySeq, getDuration, importForm, and serial.

bool NLSOUND::CComplexSound::_DoFadeIn [private]
 

Flag for fade in.

Definition at line 107 of file complex_sound.h.

Referenced by doFadeIn, importForm, and serial.

bool NLSOUND::CComplexSound::_DoFadeOut [private]
 

Flag for fade out (only on normal termination, not explicit stop).

Definition at line 109 of file complex_sound.h.

Referenced by doFadeOut, importForm, and serial.

uint32 NLSOUND::CComplexSound::_Duration [private]
 

Definition at line 114 of file complex_sound.h.

Referenced by getDuration.

bool NLSOUND::CComplexSound::_DurationValid [private]
 

Definition at line 116 of file complex_sound.h.

Referenced by getDuration, importForm, and serial.

bool NLSOUND::CComplexSound::_MaxDistValid [private]
 

Definition at line 111 of file complex_sound.h.

Referenced by getMaxDistance.

TPATTERN_MODE NLSOUND::CComplexSound::_PatternMode [private]
 

Definition at line 97 of file complex_sound.h.

Referenced by getPatternMode, importForm, serial, and setPatternMode.

std::vector<std::string> NLSOUND::CComplexSound::_Sounds [private]
 

Definition at line 98 of file complex_sound.h.

Referenced by getDuration, getMaxDistance, getSound, getSounds, getSubSoundList, importForm, and serial.

std::vector<uint32> NLSOUND::CComplexSound::_SoundSeq [private]
 

Definition at line 100 of file complex_sound.h.

Referenced by getDuration, getSoundSeq, importForm, and serial.

float NLSOUND::CComplexSound::_TicksPerSeconds [private]
 

Definition at line 99 of file complex_sound.h.

Referenced by getDuration, getTicksPerSecond, importForm, serial, and setTicksPerSecond.

uint32 NLSOUND::CComplexSound::_XFadeLenght [private]
 

Duration of xfade in millisec.

Definition at line 105 of file complex_sound.h.

Referenced by getDuration, getFadeLenght, importForm, and serial.


The documentation for this class was generated from the following files: