ScummVM API documentation
capcom98.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_CAPCOM98_H
25#define KYRA_SOUND_CAPCOM98_H
26
27#include "audio/mididrv.h"
28#include "common/scummsys.h"
29
30namespace Audio {
31 class Mixer;
32}
33
34namespace Kyra {
35
36class CapcomPC98AudioDriverInternal;
37
38class CapcomPC98AudioDriver {
39public:
40 CapcomPC98AudioDriver(Audio::Mixer *mixer, MidiDriver::DeviceHandle dev);
41 ~CapcomPC98AudioDriver();
42
43 bool isUsable() const;
44
45 // All data passed to the following functions has to be maintained by the caller.
46 void reset();
47 void loadFMInstruments(const uint8 *data);
48 void startSong(const uint8 *data, uint8 volume, bool loop);
49 void stopSong();
50 void startSoundEffect(const uint8 *data, uint8 volume);
51 void stopSoundEffect();
52
53 int checkSoundMarker() const;
54 bool songIsPlaying() const;
55 bool soundEffectIsPlaying() const;
56
57 void fadeOut();
58 void allNotesOff();
59
60 void setMusicVolume(int volume);
61 void setSoundEffectVolume(int volume);
62
63private:
64 CapcomPC98AudioDriverInternal *_drv;
65};
66
67} // End of namespace Kyra
68
69#endif
70
71#endif
Definition: mixer.h:70
uint32 DeviceHandle
Definition: mididrv.h:322
Definition: system.h:39
Definition: detection.h:27