ScummVM API documentation
base_sound.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  * This file is based on WME Lite.
24  * http://dead-code.org/redir.php?target=wmelite
25  * Copyright (c) 2011 Jan Nedoma
26  */
27 
28 #ifndef WINTERMUTE_BASE_SOUND_H
29 #define WINTERMUTE_BASE_SOUND_H
30 
31 #include "engines/wintermute/base/base.h"
32 #include "engines/wintermute/dctypes.h" // Added by ClassView
33 #include "engines/wintermute/persistent.h"
34 #include "audio/mixer.h"
35 
36 namespace Wintermute {
37 
38 class BaseSoundBuffer;
39 class BaseSound : public BaseClass {
40 public:
41  bool setPan(float pan);
42  int32 _soundPrivateVolume;
43  int getVolume();
44  bool setVolume(int volume);
45  bool setPrivateVolume(int volume);
46  bool setLoopStart(uint32 pos);
47  uint32 getPositionTime();
48  bool setPositionTime(uint32 time);
49  bool _soundPaused;
50  bool _soundFreezePaused;
51  bool isPlaying();
52  bool isPaused();
53  bool _soundPlaying;
54  bool _soundLooping;
55  uint32 _soundLoopStart;
56  uint32 _soundPosition;
57  DECLARE_PERSISTENT(BaseSound, BaseClass)
58  bool resume();
59  bool pause(bool freezePaused = false);
60  bool stop();
61  bool play(bool looping = false);
62  uint32 getLength();
63  bool _soundStreamed;
64  TSoundType _soundType;
65  char *_soundFilename;
66  bool setSoundSimple();
67  bool setSound(const char *filename, TSoundType type = TSoundType::SOUND_SFX, bool streamed = false, uint32 initialPrivateVolume = 100);
68  BaseSound(BaseGame *inGame);
69  ~BaseSound() override;
70 
71  bool applyFX(TSFXType type = SFX_NONE, float param1 = 0, float param2 = 0, float param3 = 0, float param4 = 0);
72 
73  TSFXType _sFXType;
74  float _sFXParam1;
75  float _sFXParam2;
76  float _sFXParam3;
77  float _sFXParam4;
78 
79 private:
80  BaseSoundBuffer *_sound;
81 };
82 
83 } // End of namespace Wintermute
84 
85 #endif
Definition: base_game.h:79
Definition: base_sound_buffer.h:43
Definition: base_sound.h:39
Definition: base.h:43
Definition: achievements_tables.h:27