isndsys/ss_source.h
Go to the documentation of this file.00001 /* 00002 Copyright (C) 2004 by Andrew Mann 00003 Copyright (C) 1998-2000 by Jorrit Tyberghein 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 00020 #ifndef __CS_SNDSYS_ISNDSYS_SOURCE_H__ 00021 #define __CS_SNDSYS_ISNDSYS_SOURCE_H__ 00022 00027 #include "csutil/scf.h" 00028 #include "csgeom/vector3.h" 00029 #include "isndsys/ss_structs.h" 00030 00034 SCF_VERSION (iSndSysSource, 0, 1, 0); 00035 SCF_VERSION (iSndSysSourceSoftware, 0, 1, 0); 00036 SCF_VERSION (iSndSysSourceSoftware3D, 0, 1, 0); 00037 00038 struct iSndSysFilter; 00039 struct iSndSysStream; 00040 00041 #ifndef CS_SNDSYS_SOURCE_DISTANCE_INFINITE 00042 #define CS_SNDSYS_SOURCE_DISTANCE_INFINITE -1.0f 00043 #endif 00044 00048 struct iSndSysSource : public iBase 00049 { 00051 virtual void SetVolume (float volume) = 0; 00053 virtual float GetVolume () = 0; 00054 00056 virtual csRef<iSndSysStream> GetStream() = 0; 00057 00059 virtual iSndSysSource *GetPtr() = 0; 00060 }; 00061 00065 struct iSndSysSourceSoftware : public iSndSysSource 00066 { 00071 virtual size_t MergeIntoBuffer(csSoundSample *channel_buffer, 00072 size_t buffer_samples) = 0; 00073 }; 00074 00078 struct iSndSysSourceSoftware3D : public iSndSysSourceSoftware 00079 { 00081 virtual void SetPosition(csVector3 pos) = 0; 00083 virtual csVector3 GetPosition() = 0; 00084 00086 virtual void SetDirection(csVector3 dir) = 0; 00088 virtual csVector3 GetDirection() = 0; 00089 00098 virtual void SetDirectionalRadiation(float rad) = 0; 00099 00101 virtual float GetDirectionalRadiation() = 0; 00102 00111 virtual void SetMinimumDistance (float distance) = 0; 00112 00118 virtual void SetMaximumDistance (float distance) = 0; 00119 00124 virtual float GetMinimumDistance () = 0; 00125 00130 virtual float GetMaximumDistance () = 0; 00131 00133 // virtual bool AttachFilter(csRef<iSound2Filter> filter) = 0; 00134 00136 // virtual bool RemoveFilter(csRef<iSound2Filter> filter)= 0; 00137 }; 00138 00141 #endif // __CS_SNDSYS_ISNDSYS_SOURCE_H__
Generated for Crystal Space by doxygen 1.4.6