Planeshift

system.h

Go to the documentation of this file.
00001 /*
00002  * system.h
00003  *
00004  * Copyright (C) 2001-2010 Atomic Blue ([email protected], http://www.planeshift.it)
00005  *
00006  * Credits : Saul Leite <[email protected]>
00007  *           Mathias 'AgY' Voeroes <[email protected]>
00008  *           and all past and present planeshift coders
00009  *
00010  * This program is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU General Public License
00012  * as published by the Free Software Foundation (version 2 of the License.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00021  *
00022  */
00023 
00024 #ifndef _SOUND_SYSTEM_H_
00025 #define _SOUND_SYSTEM_H_
00026 
00027 #include <cssysdef.h>
00028 #include <iutil/objreg.h>
00029 #include <isndsys.h>
00030 
00037 class SoundSystem
00038 {
00039     public:
00045     bool Initialize(iObjectRegistry* objectReg);
00046 
00054     bool CreateStream (csRef<iSndSysData> &snddata, int loop, int type,
00055                        csRef<iSndSysStream> &sndstream);
00056 
00061     void RemoveStream(csRef<iSndSysStream> &sndstream);
00062 
00068     bool CreateSource (csRef<iSndSysStream> &sndstream,
00069                        csRef<iSndSysSource> &sndsource);
00070 
00075     void RemoveSource (csRef<iSndSysSource> &sndsource);
00076 
00086     void Create3dSource (csRef<iSndSysSource> &sndsource,
00087                          csRef<iSndSysSource3D> &sndsource3d,
00088                          float mindist, float maxdist, csVector3 pos);
00089 
00097     void CreateDirectional3dSource (csRef<iSndSysSource3D> &sndsource3d,
00098                                     csRef<iSndSysSource3DDirectionalSimple> &sndsourcedir,
00099                                     csVector3 direction, float rad);
00100 
00107     void UpdateListener( csVector3 v, csVector3 f, csVector3 t );
00108 
00109     private:
00110     csRef<iSndSysRenderer> sndrenderer; 
00111     csRef<iSndSysListener> listener;    
00112 };
00113 
00114 #endif /*_SOUND_SYSTEM_H_*/