ScummVM API documentation
music.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 // Music class
23 
24 #ifndef MADE_MUSIC_H
25 #define MADE_MUSIC_H
26 
27 #include "made.h"
28 
29 #include "audio/adlib_ms.h"
30 #include "audio/mididrv.h"
31 #include "audio/mididrv_ms.h"
32 #include "audio/mt32gm.h"
33 #include "audio/midiparser.h"
34 
35 namespace Made {
36 
37 class GenericResource;
38 
39 class MusicPlayer {
40 private:
41  static const uint8 MT32_GOODBYE_MSG[MidiDriver_MT32GM::MT32_DISPLAY_NUM_CHARS];
42 
43 public:
44  MusicPlayer(MadeEngine *vm, bool milesAudio);
45  ~MusicPlayer();
46 
47  void close();
48 
49  void playXMIDI(GenericResource *midiResource);
50  void playSMF(GenericResource *midiResource);
51  void stop();
52  void pause();
53  void resume();
54 
55  bool isPlaying();
56  void syncSoundSettings();
57 
58 private:
59  MadeEngine *_vm;
60  MidiParser *_parser;
61  MidiDriver_Multisource *_driver;
62 
63  MusicType _driverType;
64 
65  static void timerCallback(void *refCon);
66  void onTimer();
67 };
68 
70 public:
72 
73  // TODO Implement AdLib driver logic for Manhole / LGoP2
74 };
75 
76 } // End of namespace Made
77 
78 #endif
Definition: resource.h:165
Definition: mididrv_ms.h:86
Definition: made.h:55
MusicType
Definition: mididrv.h:44
Definition: music.h:39
Definition: adlib_ms.h:250
Definition: music.h:69
OplType
Definition: fmopl.h:62
Definition: console.h:27
Definition: midiparser.h:289