NL3D::CPSSoundServImpl Class Reference

#include <u_ps_sound_impl.h>

Inheritance diagram for NL3D::CPSSoundServImpl:

NL3D::UPSSoundServer

Detailed Description

This class implements PS sound server. It warps the calls to NEL sound. Everything is in a .h file to avoid dependency
Author:
Nicolas Vizerie

Nevrax France

Date:
2001

Definition at line 155 of file u_ps_sound_impl.h.

Public Member Functions

 CPSSoundServImpl ()
 construct this sound server; You must init it then

UPSSoundInstancecreateSound (const NLMISC::TStringId &soundName, bool spawned=true)
 inherited from IPSSoundServer

const NLSOUND::UAudioMixergetAudioMixer (void) const
NLSOUND::UAudioMixergetAudioMixer (void)
 get the audio mixer associated with that server

void init (NLSOUND::UAudioMixer *audioMixer)
 init this particle system sound server, using the given audio mixer


Protected Attributes

NLSOUND::UAudioMixer_AudioMixer


Constructor & Destructor Documentation

NL3D::CPSSoundServImpl::CPSSoundServImpl  )  [inline]
 

construct this sound server; You must init it then

Definition at line 159 of file u_ps_sound_impl.h.

References _AudioMixer.

00159                            : _AudioMixer(NULL)
00160         {
00161         }


Member Function Documentation

UPSSoundInstance* NL3D::CPSSoundServImpl::createSound const NLMISC::TStringId soundName,
bool  spawned = true
[inline, virtual]
 

inherited from IPSSoundServer

Implements NL3D::UPSSoundServer.

Definition at line 178 of file u_ps_sound_impl.h.

References _AudioMixer, NLSOUND::UAudioMixer::createSource(), NL3D::CPSSoundInstanceImpl::init(), NLSOUND::USource::setLooping(), and NL3D::SpawnedSourceEndedCallback().

00179         {               
00180                 if (!_AudioMixer) 
00181                         return NULL;
00182                 CPSSoundInstanceImpl *sound = new CPSSoundInstanceImpl;
00183                 NLSOUND::USource *source = _AudioMixer->createSource(soundName, spawned, SpawnedSourceEndedCallback, sound );
00184                 if (source)
00185                 {                       
00186                         if (spawned)
00187                         {
00188                                 source->setLooping(false);
00189                         }
00190                         sound->init(source, this, spawned);
00191                         return sound;
00192                 }
00193                 else
00194                 {
00195                         // should usually not happen
00196                         delete sound;
00197                         return NULL;
00198                 }
00199         }

const NLSOUND::UAudioMixer* NL3D::CPSSoundServImpl::getAudioMixer void   )  const [inline]
 

Definition at line 174 of file u_ps_sound_impl.h.

References _AudioMixer.

00174 { return _AudioMixer;}

NLSOUND::UAudioMixer* NL3D::CPSSoundServImpl::getAudioMixer void   )  [inline]
 

get the audio mixer associated with that server

Definition at line 173 of file u_ps_sound_impl.h.

References _AudioMixer.

Referenced by NL3D::CPSSoundInstanceImpl::release().

00173 { return _AudioMixer;}

void NL3D::CPSSoundServImpl::init NLSOUND::UAudioMixer audioMixer  )  [inline]
 

init this particle system sound server, using the given audio mixer

Definition at line 166 of file u_ps_sound_impl.h.

References _AudioMixer.

Referenced by NL3D::UParticleSystemSound::setPSSound().

00167         {               
00168                 _AudioMixer = audioMixer;
00169         }


Field Documentation

NLSOUND::UAudioMixer* NL3D::CPSSoundServImpl::_AudioMixer [protected]
 

Definition at line 203 of file u_ps_sound_impl.h.

Referenced by CPSSoundServImpl(), createSound(), getAudioMixer(), and init().


The documentation for this class was generated from the following file:
Generated on Tue Mar 16 07:25:53 2004 for NeL by doxygen 1.3.6