ScummVM API documentation
volume_manager.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#ifndef ZVISION_VOLUME_MANAGER
23#define ZVISION_VOLUME_MANAGER
24
25#include "common/scummsys.h"
26#include "math/angle.h"
27#include "zvision/zvision.h"
28
29
30namespace ZVision {
31
32enum volumeScaling {
33 kVolumeLinear,
34 kVolumePowerLaw,
35 kVolumeParabolic,
36 kVolumeCubic,
37 kVolumeQuartic,
38 kVolumeLogPower,
39 kVolumeLogAmplitude
40};
41
43public:
44 VolumeManager(ZVision *engine, volumeScaling mode);
45 ~VolumeManager() {};
46 volumeScaling getMode() const {
47 return _mode;
48 }
49 void setMode(volumeScaling mode) {
50 _mode = mode;
51 }
52 uint8 convert(uint8 inputValue);
53 uint8 convert(uint8 inputValue, volumeScaling &mode);
54 uint8 convert(uint8 inputValue, Math::Angle azimuth, uint8 directionality = 255);
55 uint8 convert(uint8 inputValue, volumeScaling &mode, Math::Angle azimuth, uint8 directionality = 255);
56#if defined(USE_MPEG2) && defined(USE_A52)
57 double getVobAmplification(Common::String fileName) const;
58#endif
59
60private:
61 uint _scriptScale = 100; // Z-Vision scripts internally use a volume scale of 0-100; ScummVM uses a scale of 0-255.
62 volumeScaling _mode = kVolumeLinear;
63};
64
65} // End of namespace ZVision
66
67#endif // ZVISION_VOLUME_MANAGER
Definition: str.h:59
Definition: volume_manager.h:42
Definition: focus_list.h:27