57 if (result != FMOD_OK)
59 std::string fmod_result = FMOD_ErrorString(result);
60 ReportError(
"Can't create reverb:\n" + fmod_result);
66 FMOD_REVERB_PROPERTIES prop;
68 if (type ==
"generic")
69 prop = FMOD_PRESET_GENERIC;
70 else if (type ==
"paddedcell")
71 prop = FMOD_PRESET_PADDEDCELL;
72 else if (type ==
"room")
73 prop = FMOD_PRESET_ROOM;
74 else if (type ==
"bathroom")
75 prop = FMOD_PRESET_BATHROOM;
76 else if (type ==
"livingroom")
77 prop = FMOD_PRESET_LIVINGROOM;
78 else if (type ==
"stoneroom")
79 prop = FMOD_PRESET_STONEROOM;
80 else if (type ==
"auditorium")
81 prop = FMOD_PRESET_AUDITORIUM;
82 else if (type ==
"concerthall")
83 prop = FMOD_PRESET_CONCERTHALL;
84 else if (type ==
"cave")
85 prop = FMOD_PRESET_CAVE;
86 else if (type ==
"arena")
87 prop = FMOD_PRESET_ARENA;
88 else if (type ==
"hangar")
89 prop = FMOD_PRESET_HANGAR;
90 else if (type ==
"carpetedhallway")
91 prop = FMOD_PRESET_CARPETTEDHALLWAY;
92 else if (type ==
"hallway")
93 prop = FMOD_PRESET_HALLWAY;
94 else if (type ==
"stonecorridor")
95 prop = FMOD_PRESET_STONECORRIDOR;
96 else if (type ==
"alley")
97 prop = FMOD_PRESET_ALLEY;
98 else if (type ==
"forest")
99 prop = FMOD_PRESET_FOREST;
100 else if (type ==
"city")
101 prop = FMOD_PRESET_CITY;
102 else if (type ==
"mountains")
103 prop = FMOD_PRESET_MOUNTAINS;
104 else if (type ==
"quarry")
105 prop = FMOD_PRESET_QUARRY;
106 else if (type ==
"plain")
107 prop = FMOD_PRESET_PLAIN;
108 else if (type ==
"parkinglot")
109 prop = FMOD_PRESET_PARKINGLOT;
110 else if (type ==
"sewerpipe")
111 prop = FMOD_PRESET_SEWERPIPE;
112 else if (type ==
"underwater")
113 prop = FMOD_PRESET_UNDERWATER;
115 reverb->setProperties(&prop);
118 FMOD_VECTOR fmod_pos;
120 fmod_pos.x = global_pos.x;
121 fmod_pos.y = global_pos.y;
122 fmod_pos.z = global_pos.z;
125 FMOD_RESULT result2 =
reverb->set3DAttributes(&fmod_pos, min_distance, max_distance);
126 if (result2 != FMOD_OK)
128 std::string fmod_result = FMOD_ErrorString(result);
129 ReportError(
"Can't set reverb attributes:\n" + fmod_result);
136 Report(
"Reverb '" + name +
"' created with type: " + type);
Reverb(Object *parent, const std::string &name, std::string type, const Vector3 &position, Real min_distance, Real max_distance, bool permanent)