ScummVM API documentation
mlalf98.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#ifdef ENABLE_EOB
23
24#ifndef KYRA_SOUND_MLALF98_H
25#define KYRA_SOUND_MLALF98_H
26
27#include "common/scummsys.h"
28#include "common/array.h"
29
30namespace Common {
31 class SeekableReadStream;
32}
33
34namespace Audio {
35 class Mixer;
36}
37
38namespace Kyra {
39
40class MLALF98Internal;
41
42class MLALF98 {
43public:
44 enum EmuType {
45 kType9801_26 = 1,
46 kType9801_86 = 2
47 };
48
49 struct ADPCMData {
50 ADPCMData() : smpStart(0), smpEnd(0), unk4(0), unk5(0), volume(0), unk7(0) {}
51 uint16 smpStart;
52 uint16 smpEnd;
53 uint8 unk4;
54 uint8 unk5;
55 uint8 volume;
56 uint8 unk7;
57 };
58
59 typedef Common::Array<ADPCMData> ADPCMDataArray;
60
61public:
62 MLALF98(Audio::Mixer *mixer, EmuType emuType);
63 ~MLALF98();
64
65 // The caller has to dispose of the stream. The stream can be discarded
66 // immediately after calling the respective loader function.
67 void loadMusicData(Common::SeekableReadStream *data);
68 void loadSoundEffectData(Common::SeekableReadStream *data);
69 void loadExtData(ADPCMDataArray &data);
70
71 void startMusic(int track);
72 void fadeOutMusic();
73 void startSoundEffect(int track);
74
75 void allChannelsOff();
76 void resetExtUnit();
77
78 void setMusicVolume(int volume);
79 void setSoundEffectVolume(int volume);
80
81private:
82 MLALF98Internal *_drv;
83};
84
85} // End of namespace Kyra
86
87#endif
88
89#endif
Definition: mixer.h:70
Definition: array.h:52
Definition: stream.h:745
Definition: system.h:39
Definition: algorithm.h:29
Definition: detection.h:27