|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLSOUND::CAmbiantSource Class ReferenceStereo mix of a envsound, seen as a source (see CEnvSoundUser).
More...
#include <ambiant_source.h>
List of all members.
Detailed Description
Stereo mix of a envsound, seen as a source (see CEnvSoundUser).
Plays a stereo mix made up of two channels for crossfading random ambiant sounds, plus a third channel for random sparse sounds.
-
Author:
-
Olivier Cado , Nevrax France
-
Date:
-
2001
Definition at line 50 of file ambiant_source.h.
Constructor & Destructor Documentation
NLSOUND::CAmbiantSource::CAmbiantSource |
( |
|
) |
|
|
NLSOUND::CAmbiantSource::~CAmbiantSource |
( |
|
) |
[virtual] |
|
Member Function Documentation
TTime NLSOUND::CAmbiantSource::calcPosInCycle |
( |
bool & |
crossfade, |
|
|
uint32 & |
leadchannel |
|
) |
[protected] |
|
void NLSOUND::CAmbiantSource::calcRandomSparseSoundTime |
( |
TSoundId |
currentsparesound |
) |
[protected] |
|
void NLSOUND::CAmbiantSource::enable |
( |
bool |
toplay, |
|
|
float |
gain |
|
) |
[virtual] |
|
|
Enable (play with high priority) and set general gain, or disable (stop and set low priority).
Definition at line 130 of file ambiant_source.cpp.
References _AmbiantSounds, _Play, _StereoChannels, _StereoGain, AMBIANT_CH1, calcPosInCycle, calcRandomSparseSoundTime, NLSOUND::HighPri, NLSOUND::LowPri, nldebug, and SPARSE_CH. |
TSoundId NLSOUND::CAmbiantSource::getRandomSound |
( |
const std::vector< CSound * > & |
bank |
) |
const [protected] |
|
void NLSOUND::CAmbiantSource::init |
( |
void |
|
) |
[inline, static] |
|
virtual void NLSOUND::CAmbiantSource::initPos |
( |
const NLMISC::CVector * |
posvector |
) |
[virtual] |
|
|
Init.
You can pass a position vector to link to (if the playable has stereo source(s)) When reading from a stream, call init() *after* serial(). |
void NLSOUND::CAmbiantSource::setProperties |
( |
std::vector< TSoundId > & |
ambiantsounds, |
|
|
std::vector< TSoundId > & |
sparsesounds, |
|
|
uint32 |
crossfadeTimeMs = 4000, |
|
|
uint32 |
sustainTimeMs = 16000, |
|
|
uint32 |
sparseAvgPeriodMs = 30000 |
|
) |
|
|
void NLSOUND::CAmbiantSource::update |
( |
|
) |
[virtual] |
|
|
Update.
Definition at line 239 of file ambiant_source.cpp.
References _AmbiantSounds, _CrossfadeTime, _NextSparseSoundTime, _Play, _SparseSounds, _StereoChannels, _StereoGain, _Sustain, AMBIANT_CH1, calcPosInCycle, calcRandomSparseSoundTime, getRandomSound, NLSOUND::HighPri, NLSOUND::MidPri, nlassert, nldebug, SPARSE_CH, NLSOUND::TSoundId, and NLMISC::TTime. |
Member Data Documentation
std::vector<CSound*> NLSOUND::CAmbiantSource::_AmbiantSounds [private]
|
|
uint32 NLSOUND::CAmbiantSource::_CrossfadeTime [private]
|
|
NLMISC::TTime NLSOUND::CAmbiantSource::_NextSparseSoundTime [private]
|
|
bool NLSOUND::CAmbiantSource::_Play [private]
|
|
bool NLSOUND::CAmbiantSource::_RandomSoundChosen [private]
|
|
uint32 NLSOUND::CAmbiantSource::_SparseAvgPeriod [private]
|
|
std::vector<CSound*> NLSOUND::CAmbiantSource::_SparseSounds [private]
|
|
CSimpleSource NLSOUND::CAmbiantSource::_StereoChannels[MAX_ENV_CHANNELS] [private]
|
|
float NLSOUND::CAmbiantSource::_StereoGain [private]
|
|
bool NLSOUND::CAmbiantSource::_Sustain [private]
|
|
uint32 NLSOUND::CAmbiantSource::_SustainTime [private]
|
|
The documentation for this class was generated from the following files:
|
|