CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

source.h

00001 /*
00002     Copyright (C) 1998, 1999 by Nathaniel 'NooTe' Saint Martin
00003     Copyright (C) 1998, 1999 by Jorrit Tyberghein
00004     Written by Nathaniel 'NooTe' Saint Martin
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public
00017     License along with this library; if not, write to the Free
00018     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019 */
00020 
00021 #ifndef __CS_ISOUND_SOURCE_H__
00022 #define __CS_ISOUND_SOURCE_H__
00023 
00024 #include "csutil/scf.h"
00025 #include "csgeom/vector3.h"
00026 
00028 #define SOUND_RESTART   1
00029 #define SOUND_LOOP      2
00030 
00032 enum
00033 {
00035   SOUND3D_DISABLE,
00037   SOUND3D_RELATIVE,
00039   SOUND3D_ABSOLUTE
00040 };
00041 
00042 #define SOUND_DISTANCE_INFINITE -1.0f
00043 
00044 SCF_VERSION (iSoundSource, 0, 0, 2);
00045 
00052 struct iSoundSource : public iBase
00053 {
00055   virtual void Play (unsigned long playMethod = 0) = 0;
00057   virtual void Stop () = 0;
00059   virtual void SetVolume (float volume) = 0;
00061   virtual float GetVolume () = 0;
00063   virtual void SetFrequencyFactor (float factor) = 0;
00065   virtual float GetFrequencyFactor () = 0;
00066 
00068   virtual int GetMode3D() = 0;
00070   virtual void SetMode3D(int m) = 0;
00072   virtual void SetPosition(csVector3 pos) = 0;
00074   virtual csVector3 GetPosition() = 0;
00076   virtual void SetVelocity(csVector3 spd) = 0;
00078   virtual csVector3 GetVelocity() = 0;
00079 
00084   virtual void SetMinimumDistance (float distance) = 0;
00085 
00089   virtual void SetMaximumDistance (float distance) = 0;
00090 
00092   virtual float GetMinimumDistance () = 0;
00093 
00095   virtual float GetMaximumDistance () = 0;
00096 };
00097 
00098 #endif // __CS_ISOUND_SOURCE_H__

Generated for Crystal Space by doxygen 1.3.9.1