|
Planeshift
|
This is an Interface Class to the Crystalspace Soundrenderer. More...
#include <system.h>
Public Member Functions | |
| void | Create3dSource (csRef< iSndSysSource > &sndsource, csRef< iSndSysSource3D > &sndsource3d, float mindist, float maxdist, csVector3 pos) |
| Creates a 3d Source on top of a 2d source. More... | |
| void | Create3DSource (csRef< iSndSysSource > &sndSource, csRef< iSndSysSource3D > &sndSource3D, float minDist, float maxDist, csVector3 pos) |
| Creates a 3D source on top of a 2D source. More... | |
| void | CreateDirectional3dSource (csRef< iSndSysSource3D > &sndsource3d, csRef< iSndSysSource3DDirectionalSimple > &sndsourcedir, csVector3 direction, float rad) |
| Creates a directional source on top of a 3d source. More... | |
| void | CreateDirectional3DSource (csRef< iSndSysSource3D > &sndSource3D, csRef< iSndSysSource3DDirectionalSimple > &sndSourceDir, csVector3 direction, float rad) |
| Creates a directional source on top of a 3D source. More... | |
| bool | CreateSource (csRef< iSndSysStream > &sndstream, csRef< iSndSysSource > &sndsource) |
| Create a Source associated to your Stream. More... | |
| bool | CreateSource (csRef< iSndSysStream > &sndStream, csRef< iSndSysSource > &sndSource) |
| Create a source associated to your stream with volume 0. More... | |
| bool | CreateStream (csRef< iSndSysData > &snddata, int loop, int type, csRef< iSndSysStream > &sndstream) |
| Creates a stream out of the given snddata. More... | |
| bool | CreateStream (csRef< iSndSysData > &sndData, bool loop, int type, csRef< iSndSysStream > &sndStream) |
| Creates a stream out of the given sound data. More... | |
| csVector3 | GetListenerPosition () const |
| Gets the current listener's position. More... | |
| bool | Initialize (iObjectRegistry *objectReg) |
| initializes this object and tries to load the soundrenderer. More... | |
| bool | Initialize (iObjectRegistry *objectReg) |
| Initializes this object by loading the CS sound renderer and creating a global listener. More... | |
| void | RemoveSource (csRef< iSndSysSource > &sndsource) |
| Removes a Source. More... | |
| void | RemoveSource (csRef< iSndSysSource > &sndSource) |
| Removes a source from the sound renderer. More... | |
| void | RemoveStream (csRef< iSndSysStream > &sndstream) |
| Removes a stream. More... | |
| void | RemoveStream (csRef< iSndSysStream > &sndStream) |
| Removes a stream from the sound renderer. More... | |
| void | UpdateListener (csVector3 v, csVector3 f, csVector3 t) |
| Updates listener position. More... | |
| void | UpdateListener (csVector3 v, csVector3 f, csVector3 t) |
| Updates listener's position. More... | |
This is an Interface Class to the Crystalspace Soundrenderer.
This is an interface class to the CrystalSpace sound renderer.
It works like a Wrapper and has some additional functionalities but no own data/objects. All it does is simplifying access to the Soundrenderer.
It works like a wrapper and has some additional functionalities but at the moment it hasn't own data/objects. All it does is simplifying access to the sound renderer. In the future this will be the class that controls the number of active sources.
| void SoundSystem::Create3dSource | ( | csRef< iSndSysSource > & | sndsource, |
| csRef< iSndSysSource3D > & | sndsource3d, | ||
| float | mindist, | ||
| float | maxdist, | ||
| csVector3 | pos | ||
| ) |
Creates a 3d Source on top of a 2d source.
Doesnt work of your stream type is CS_SND3D_DISABLE
| sndsource | your iSndSysSource object |
| sndsource3d | your iSndSysSource3D object |
| mindist | distance when volume is at max |
| maxdist | distance when volume is at min |
| pos | 3d position of this source |
| void SoundSystem::Create3DSource | ( | csRef< iSndSysSource > & | sndSource, |
| csRef< iSndSysSource3D > & | sndSource3D, | ||
| float | minDist, | ||
| float | maxDist, | ||
| csVector3 | pos | ||
| ) |
Creates a 3D source on top of a 2D source.
It doesn't work if your stream type is CS_SND3D_DISABLE. To remove the 3D source it is enough to remove the original 2D source.
| sndSource | your 2D iSndSysSource object. |
| sndSource3D | the iSndSysSource3D that will contain the 3D source. |
| minDist | greatest distance at which the sound is played at maximum volume. |
| maxDist | maximum distance at which the sound can be heard. |
| pos | 3D position of this source. |
| void SoundSystem::CreateDirectional3dSource | ( | csRef< iSndSysSource3D > & | sndsource3d, |
| csRef< iSndSysSource3DDirectionalSimple > & | sndsourcedir, | ||
| csVector3 | direction, | ||
| float | rad | ||
| ) |
Creates a directional source on top of a 3d source.
| sndsource3d | your iSndSysSource3D object |
| sndsourcedir | your iSndSysSource3DDirectionalSimple object |
| direction | direction this source is emitting to |
| rad | radiation of the directional cone |
| void SoundSystem::CreateDirectional3DSource | ( | csRef< iSndSysSource3D > & | sndSource3D, |
| csRef< iSndSysSource3DDirectionalSimple > & | sndSourceDir, | ||
| csVector3 | direction, | ||
| float | rad | ||
| ) |
Creates a directional source on top of a 3D source.
To remove the 3D source it is enough to remove the original 2D source.
| sndSource3D | your iSndSysSource3D object. |
| sndSourceDir | the iSndSysSource3DDirectionalSimple object that will contain the directional source. |
| direction | direction this source emits to. |
| rad | radiation of the directional cone. |
| bool SoundSystem::CreateSource | ( | csRef< iSndSysStream > & | sndstream, |
| csRef< iSndSysSource > & | sndsource | ||
| ) |
Create a Source associated to your Stream.
| sndstream | your iSndSysStream object |
| sndsource | your iSndSysSource object |
| bool SoundSystem::CreateSource | ( | csRef< iSndSysStream > & | sndStream, |
| csRef< iSndSysSource > & | sndSource | ||
| ) |
Create a source associated to your stream with volume 0.
| sndStream | your iSndSysStream object. |
| sndSource | the iSndSysSource object that will contain the source. |
| bool SoundSystem::CreateStream | ( | csRef< iSndSysData > & | snddata, |
| int | loop, | ||
| int | type, | ||
| csRef< iSndSysStream > & | sndstream | ||
| ) |
Creates a stream out of the given snddata.
| snddata | valid iSndSysData object |
| loop | LOOP or DONT_LOOP |
| type | 3dtype of this sound CS_SND3D_DISABLE=0 CS_SND3D_RELATIVE=1 or CS_SND3D_ABSOLUTE=2 |
| sndstream | your iSndSysStream object |
| bool SoundSystem::CreateStream | ( | csRef< iSndSysData > & | sndData, |
| bool | loop, | ||
| int | type, | ||
| csRef< iSndSysStream > & | sndStream | ||
| ) |
Creates a stream out of the given sound data.
| sndData | valid iSndSysData object. |
| loop | true if the sound must loop, false otherwise. |
| type | 3D type of this sound; it can have these values CS_SND3D_DISABLE=0, CS_SND3D_RELATIVE=1 or CS_SND3D_ABSOLUTE=2. |
| sndStream | the iSndSysStream object that will contain the stream. |
| csVector3 SoundSystem::GetListenerPosition | ( | ) | const |
Gets the current listener's position.
| bool SoundSystem::Initialize | ( | iObjectRegistry * | objectReg | ) |
initializes this object and tries to load the soundrenderer.
returns true or false
| objectReg | ps objectreg where we find our soundrenderer |
| bool SoundSystem::Initialize | ( | iObjectRegistry * | objectReg | ) |
Initializes this object by loading the CS sound renderer and creating a global listener.
| objectReg | ps iObjectRegistry used to get the sound renderer. |
| void SoundSystem::RemoveSource | ( | csRef< iSndSysSource > & | sndsource | ) |
Removes a Source.
| sndsource | iSndSysSource object to remove |
| void SoundSystem::RemoveSource | ( | csRef< iSndSysSource > & | sndSource | ) |
Removes a source from the sound renderer.
| sndSource | iSndSysSource object to remove. |
| void SoundSystem::RemoveStream | ( | csRef< iSndSysStream > & | sndstream | ) |
Removes a stream.
| sndstream | iSndSysStream object to remove |
| void SoundSystem::RemoveStream | ( | csRef< iSndSysStream > & | sndStream | ) |
Removes a stream from the sound renderer.
| sndStream | iSndSysStream object to remove. |
| void SoundSystem::UpdateListener | ( | csVector3 | v, |
| csVector3 | f, | ||
| csVector3 | t | ||
| ) |
Updates listener position.
| v | viewpoint or for that matter hearpoint |
| f | front |
| t | top |
| void SoundSystem::UpdateListener | ( | csVector3 | v, |
| csVector3 | f, | ||
| csVector3 | t | ||
| ) |
Updates listener's position.
| v | viewpoint or for that matter hearpoint. |
| f | front. |
| t | top. |