ScummVM API documentation
bgatmosphere.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  * This file is dual-licensed.
22  * In addition to the GPLv3 license mentioned above, this code is also
23  * licensed under LGPL 2.1. See LICENSES/COPYING.LGPL file for the
24  * full text of the license.
25  *
26  */
27 
28 #ifndef GOB_SOUND_BGATMOSPHERE_H
29 #define GOB_SOUND_BGATMOSPHERE_H
30 
31 #include "common/array.h"
32 #include "common/mutex.h"
33 #include "common/random.h"
34 
35 #include "gob/sound/sound.h"
36 #include "gob/sound/soundmixer.h"
37 
38 namespace Audio {
39 class Mixer;
40 }
41 
42 namespace Gob {
43 
44 class SoundDesc;
45 
47 public:
49  ~BackgroundAtmosphere() override;
50 
51  void playBA();
52  void stopBA();
53 
54  void setPlayMode(Sound::BackgroundPlayMode mode);
55 
56  void queueSample(SoundDesc &sndDesc);
57  void queueClear();
58 
59  void setShadable(bool shadable);
60  void shade();
61  void unshade();
62 
63 private:
64  Sound::BackgroundPlayMode _playMode;
65 
67  int _queuePos;
68  bool _shaded;
69  bool _shadable;
70 
71  Common::Mutex _mutex;
72 
74 
75  void checkEndSample() override;
76  void getNextQueuePos();
77 };
78 
79 } // End of namespace Gob
80 
81 #endif // GOB_SOUND_BGATMOSPHERE_H
Definition: array.h:52
Definition: random.h:44
Definition: bgatmosphere.h:46
Definition: mixer.h:59
Definition: anifile.h:40
Definition: mutex.h:67
Definition: sounddesc.h:43
Definition: soundmixer.h:40
Definition: system.h:38