Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Renderer.h
Go to the documentation of this file.
1 //
2 // C++ Interface: Audio::SceneManager
3 //
4 #ifndef __AUDIO_RENDERER_H__INCLUDED__
5 #define __AUDIO_RENDERER_H__INCLUDED__
6 
7 #include <string>
8 #include <map>
9 #include <set>
10 #include "Exceptions.h"
11 #include "Singleton.h"
12 #include "Types.h"
13 #include "Format.h"
14 
15 #include "vsfilesystem.h"
16 
17 namespace Audio {
18 
19  // Some forwards
20  class Source;
21  class Sound;
22  class Listener;
23 
24 
36  class Renderer
37  {
38  private:
39  Scalar meterDistance;
40  Scalar dopplerFactor;
41  Format outputFormat;
42 
43  public:
47  Renderer() throw(Exception);
48 
49  virtual ~Renderer();
50 
64  virtual SharedPtr<Sound> getSound(
65  const std::string &name,
67  bool streaming = false) throw(Exception) = 0;
68 
70  virtual bool owns(SharedPtr<Sound> sound) = 0;
71 
78  virtual void attach(SharedPtr<Source> source) throw(Exception) = 0;
79 
86  virtual void attach(SharedPtr<Listener> listener) throw(Exception) = 0;
87 
91  virtual void detach(SharedPtr<Source> source) throw() = 0;
92 
96  virtual void detach(SharedPtr<Listener> listener) throw() = 0;
97 
98 
99 
104  virtual void setMeterDistance(Scalar distance) throw();
105 
109  virtual Scalar getMeterDistance() const throw();
110 
111 
119  virtual void setDopplerFactor(Scalar factor) throw();
120 
124  virtual Scalar getDopplerFactor() const throw();
125 
126 
127 
135  virtual void setOutputFormat(const Format &format) throw(Exception);
136 
140  virtual const Format& getOutputFormat() const throw();
141 
149  virtual void beginTransaction() throw(Exception);
150 
152  virtual void commitTransaction() throw(Exception);
153  };
154 
155 };
156 
157 #endif//__AUDIO_RENDERER_H__INCLUDED__