ScummVM API documentation
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 #ifndef LILLIPUT_SOUND_H
23 #define LILLIPUT_SOUND_H
24 
25 #include "audio/audiostream.h"
26 #include "audio/decoders/wave.h"
27 #include "audio/mididrv.h"
28 #include "audio/midiparser.h"
29 #include "audio/midiplayer.h"
30 #include "audio/mixer.h"
31 
32 namespace Lilliput {
33 
34 class LilliputEngine;
35 
37 public:
38  LilliputSound();
39  ~LilliputSound() override;
40 
41  void init();
42  void refresh();
43  void playSound(int var1, Common::Point var2, Common::Point var3, Common::Point var4);
44  void stopSound(Common::Point pos);
45  void toggleOnOff();
46  void update();
47  void remove();
48 
49 private:
50  int _fileNumb;
51  byte **_unpackedFiles;
52  uint16 *_unpackedSizes;
53  bool _isGM;
54 
55  uint32 decode(const byte *src, byte *dst, uint32 len, uint32 start);
56  byte readByte(const byte *data, uint32 offset);
57 
58  void loadMusic(const Common::Path &filename);
59  void playMusic(int var1);
60 
61  void send(uint32 b) override;
62  void sendToChannel(byte channel, uint32 b) override;
63 };
64 
65 } // End of namespace Lilliput
66 
67 #endif
68 
Definition: midiplayer.h:63
Definition: console.h:27
Definition: path.h:52
Definition: sound.h:36
Definition: rect.h:45