ScummVM API documentation
imuse.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 SCUMM_IMUSE_H
23 #define SCUMM_IMUSE_H
24 
25 #include "audio/mididrv.h"
26 #include "common/scummsys.h"
27 #include "common/serializer.h"
28 #include "common/mutex.h"
29 #include "scumm/music.h"
30 
31 class MidiDriver;
32 class OSystem;
33 
34 namespace Scumm {
35 
36 class IMuseInternal;
37 class Player;
38 class ScummEngine;
39 
40 typedef void (*sysexfunc)(Player *, const byte *, uint16);
41 
50 class IMuse : public MusicEngine {
51 public:
52  enum {
53  PROP_TEMPO_BASE,
54  PROP_LIMIT_PLAYERS,
55  PROP_RECYCLE_PLAYERS
56  };
57 
58 public:
59  virtual void on_timer(MidiDriver *midi) = 0;
60  virtual void pause(bool paused) = 0;
61  virtual void saveLoadIMuse(Common::Serializer &ser, ScummEngine *scumm, bool fixAfterLoad = true) = 0;
62  virtual bool get_sound_active(int sound) const = 0;
63  virtual int32 doCommand(int numargs, int args[]) = 0;
64  virtual int clear_queue() = 0;
65  virtual uint32 property(int prop, uint32 value) = 0;
66  virtual void addSysexHandler(byte mfgID, sysexfunc handler) = 0;
67 
68 public:
69  virtual void startSoundWithNoteOffset(int sound, int offset) = 0;
70 
71  // MusicEngine base class methods.
72  // Not actually redefined here because none are implemented.
73 
74 public:
75  // Factory methods
76  static IMuse *create(ScummEngine *vm, MidiDriver *nativeMidiDriver, MidiDriver *adlibMidiDriver, MidiDriverFlags sndType, bool nativeMT32);
77 };
78 
79 } // End of namespace Scumm
80 
81 #endif
Definition: music.h:40
MidiDriverFlags
Definition: mididrv.h:81
Definition: serializer.h:79
Definition: mididrv.h:309
Definition: scumm.h:518
Definition: imuse.h:50
Definition: system.h:161
Definition: actor.h:30