1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
21 //#include "nel/3d/u_particle_system_sound.h" we don't include this to avoid a link with NLSOUND
22 #include "nel/3d/particle_system.h"
23 #include "nel/3d/u_ps_sound_interface.h"
24 #include "nel/3d/u_ps_sound_impl.h"
33 void assignSoundServerToPS(UPSSoundServer
*soundServer
)
35 CParticleSystem::registerSoundServer(soundServer
);
39 /// init the particle system sound with the given AudioMixer
40 void UParticleSystemSound::setPSSound(NLSOUND::UAudioMixer
*audioMixer
)
42 static CPSSoundServImpl soundServer
;
43 soundServer
.init(audioMixer
);
46 assignSoundServerToPS(&soundServer
);
50 assignSoundServerToPS(NULL
);
55 void CPSSoundInstanceImpl::release(void)
57 if (!_Spawned
) // remove this source from the audio mixer if it hasn't been spawned
59 if (_SoundServImpl
->getAudioMixer())
61 // _SoundServImpl->getAudioMixer()->removeSource(_Source);
67 if (_Source
) // tells this spawned source not to notify us when it ends
69 _Source
->unregisterSpawnCallBack();
79 /* End of particle_system_sound_user.cpp */