Fix for bug #8555: geometry node front/bake was broken.
[plumiferos.git] / intern / SoundSystem / SND_Scene.h
bloba2ac4970891d37792cd86b3e5224aee0f843787c
1 /*
2 * SND_Scene.h
4 * The scene for sounds.
6 * $Id: SND_Scene.h 229 2002-12-27 13:11:01Z mein $
8 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version. The Blender
14 * Foundation also sells licenses for use in proprietary software under
15 * the Blender License. See http://www.blender.org/BL/ for information
16 * about this.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software Foundation,
25 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
28 * All rights reserved.
30 * The Original Code is: all of this file.
32 * Contributor(s): none yet.
34 * ***** END GPL/BL DUAL LICENSE BLOCK *****
37 #ifdef WIN32
38 #pragma warning (disable:4786) // get rid of stupid stl-visual compiler debug warning
39 #endif //WIN32
41 #ifndef __SND_SCENE_H
42 #define __SND_SCENE_H
44 #include "SoundDefines.h"
45 #include "SND_SoundObject.h"
46 #include "SND_CDObject.h"
47 #include "SND_SoundListener.h"
48 #include "SND_WaveSlot.h"
50 #include "MT_Vector3.h"
51 #include "MT_Matrix3x3.h"
52 #include "STR_String.h"
54 #include <set>
57 class SND_Scene
59 std::set<class SND_SoundObject*> m_soundobjects;
61 GEN_List m_activeobjects;
62 class SND_IAudioDevice* m_audiodevice;
63 class SND_WaveCache* m_wavecache;
64 class SND_SoundListener m_listener;
65 bool m_audio; // to check if audio works
66 bool m_audioplayback; // to check if audioplayback is wanted
68 void UpdateListener();
69 void BuildActiveList(MT_Scalar curtime);
70 void UpdateActiveObects();
71 void UpdateCD();
73 public:
74 SND_Scene(SND_IAudioDevice* adi);
75 ~SND_Scene();
77 bool IsPlaybackWanted();
79 void AddActiveObject(SND_SoundObject* pObject, MT_Scalar curtime);
80 void RemoveActiveObject(SND_SoundObject* pObject);
81 void DeleteObjectWhenFinished(SND_SoundObject* pObject);
83 void Proceed();
85 int LoadSample(const STR_String& samplename,
86 void* memlocation,
87 int size);
88 void RemoveAllSamples();
89 bool CheckBuffer(SND_SoundObject* pObject);
90 bool IsSampleLoaded(STR_String& samplename);
92 void AddObject(SND_SoundObject* pObject);
93 bool SetCDObject(SND_CDObject* cdobject);
94 void DeleteObject(SND_SoundObject* pObject);
95 void RemoveAllObjects();
96 void StopAllObjects();
97 int GetObjectStatus(SND_SoundObject* pObject) const;
99 void SetListenerTransform(const MT_Vector3& pos,
100 const MT_Vector3& vel,
101 const MT_Matrix3x3& mat);
103 SND_SoundListener* GetListener();
106 #endif //__SND_SCENE_H