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
SourceTemplate.cpp
Go to the documentation of this file.
1 //
2 // C++ Implementation: Audio::SourceTemplate
3 //
4 
5 #include "SourceTemplate.h"
6 #include "config.h"
7 
8 #include <math.h>
9 
10 namespace Audio {
11 
12  SourceTemplate::SourceTemplate(const std::string &sound, VSFileSystem::VSFileType type, bool _looping) throw() :
13  soundName(sound),
14  soundType(type),
15  cosAngleRange(-1,-1),
16  pfRadiusRatios(1,1),
17  referenceFreqs(250,5000),
18  gain(1)
19  {
20  setLooping(_looping);
21  setStreaming(false);
22  setRelative(false);
23  setAttenuated(true);
24  }
25 
27  {
28  }
29 
31  {
32  return Range<Scalar>(Scalar(acos(cosAngleRange.min)),
33  Scalar(acos(cosAngleRange.max)));
34  }
35 
37  {
38  cosAngleRange.min = Scalar(cos(r.min));
39  cosAngleRange.max = Scalar(cos(r.max));
40  }
41 
42 
43 };