ScummVM API documentation
OpenALSoundEnvironment.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 /*
23  * Copyright (C) 2006-2010 - Frictional Games
24  *
25  * This file is part of HPL1 Engine.
26  */
27 
28 #ifndef HPL_OPENALSOUNDENVIRONMENT_H
29 #define HPL_OPENALSOUNDENVIRONMENT_H
30 
31 #include "hpl1/engine/sound/SoundEnvironment.h"
32 
33 namespace hpl {
34 class cSoundManager;
35 
37 public:
39 
41 
42  bool CreateFromFile(const tString &asFile);
43 
44  inline float GetDensity() { return mfDensity; }
45  inline float GetDiffusion() { return mfDiffusion; }
46  inline float GetGain() { return mfGain; }
47  inline float GetGainHF() { return mfGainHF; }
48  inline float GetGainLF() { return mfGainLF; }
49  inline float GetDecayTime() { return mfDecayTime; }
50  inline float GetDecayHFRatio() { return mfDecayHFRatio; }
51  inline float GetDecayLFRatio() { return mfDecayLFRatio; }
52  inline float GetReflectionsGain() { return mfReflectionsGain; }
53  inline float GetReflectionsDelay() { return mfReflectionsDelay; }
54  inline float *GetReflectionsPan() { return mfReflectionsPan; }
55  inline float GetLateReverbGain() { return mfLateReverbGain; }
56  inline float GetLateReverbDelay() { return mfLateReverbDelay; }
57  inline float *GetLateReverbPan() { return mfLateReverbPan; }
58  inline float GetEchoTime() { return mfEchoTime; }
59  inline float GetEchoDepth() { return mfEchoDepth; }
60  inline float GetModulationTime() { return mfModulationTime; }
61  inline float GetModulationDepth() { return mfModulationDepth; }
62  inline float GetAirAbsorptionGainHF() { return mfAirAbsorptionGainHF; }
63  inline float GetHFReference() { return mfHFReference; }
64  inline float GetLFReference() { return mfLFReference; }
65  inline float GetRoomRolloffFactor() { return mfRoomRolloffFactor; }
66  inline int GetDecayHFLimit() { return mbDecayHFLimit; }
67 
68  inline void SetDensity(float afDensity) { mfDensity = afDensity; }
69  inline void SetDiffusion(float afDiffusion) { mfDiffusion = afDiffusion; }
70  inline void SetGain(float afGain) { mfGain = afGain; }
71  inline void SetGainHF(float afGainHF) { mfGainHF = afGainHF; }
72  inline void SetGainLF(float afGainLF) { mfGainLF = afGainLF; }
73  inline void SetDecayTime(float afDecayTime) { mfDecayTime = afDecayTime; }
74  inline void SetDecayHFRatio(float afDecayHFRatio) { mfDecayHFRatio = afDecayHFRatio; }
75  inline void SetDecayLFRatio(float afDecayLFRatio) { mfDecayLFRatio = afDecayLFRatio; }
76  inline void SetReflectionsGain(float afReflectionsGain) { mfReflectionsGain = afReflectionsGain; }
77  inline void SetReflectionsDelay(float afReflectionsDelay) { mfReflectionsDelay = afReflectionsDelay; }
78  inline void SetReflectionsPan(float afReflectionsPan[3]) {
79  mfReflectionsPan[0] = afReflectionsPan[0];
80  mfReflectionsPan[1] = afReflectionsPan[1];
81  mfReflectionsPan[2] = afReflectionsPan[2];
82  }
83  inline void SetLateReverbGain(float afLateReverbGain) { mfLateReverbGain = afLateReverbGain; }
84  inline void SetLateReverbDelay(float afLateReverbDelay) { mfLateReverbDelay = afLateReverbDelay; }
85  inline void SetLateReverbPan(float afLateReverbPan[3]) {
86  mfLateReverbPan[0] = afLateReverbPan[0];
87  mfLateReverbPan[1] = afLateReverbPan[1];
88  mfLateReverbPan[2] = afLateReverbPan[2];
89  }
90  inline void SetEchoTime(float afEchoTime) { mfEchoTime = afEchoTime; }
91  inline void SetEchoDepth(float afEchoDepth) { mfEchoDepth = afEchoDepth; }
92  inline void SetModulationTime(float afModulationTime) { mfModulationTime = afModulationTime; }
93  inline void SetModulationDepth(float afModulationDepth) { mfModulationDepth = afModulationDepth; }
94  inline void SetAirAbsorptionGainHF(float afAirAbsorptionGainHF) { mfAirAbsorptionGainHF = afAirAbsorptionGainHF; }
95  inline void SetHFReference(float afHFReference) { mfHFReference = afHFReference; }
96  inline void SetLFReference(float afLFReference) { mfLFReference = afLFReference; }
97  inline void SetRoomRolloffFactor(float afRoomRolloffFactor) { mfRoomRolloffFactor = afRoomRolloffFactor; }
98  inline void SetDecayHFLimit(int abDecayHFLimit) { mbDecayHFLimit = abDecayHFLimit; }
99 
100 protected:
101  float mfDensity;
102  float mfDiffusion;
103  float mfGain;
104  float mfGainHF;
105  float mfGainLF;
106  float mfDecayTime;
107  float mfDecayHFRatio;
108  float mfDecayLFRatio;
109  float mfReflectionsGain;
110  float mfReflectionsDelay;
111  float mfReflectionsPan[3];
112  float mfLateReverbGain;
113  float mfLateReverbDelay;
114  float mfLateReverbPan[3];
115  float mfEchoTime;
116  float mfEchoDepth;
117  float mfModulationTime;
118  float mfModulationDepth;
119  float mfAirAbsorptionGainHF;
120  float mfHFReference;
121  float mfLFReference;
122  float mfRoomRolloffFactor;
123  int mbDecayHFLimit;
124 };
125 
126 } // namespace hpl
127 
128 #endif // HPL_OPENALSOUNDENVIRONMENT_H
Definition: AI.h:36
Definition: str.h:59
Definition: SoundEnvironment.h:36
Definition: OpenALSoundEnvironment.h:36