ScummVM API documentation
midi_data.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 MTROPOLIS_PLUGIN_MIDI_DATA_H
23 #define MTROPOLIS_PLUGIN_MIDI_DATA_H
24 
25 #include "mtropolis/data.h"
26 
27 namespace MTropolis {
28 
29 namespace Data {
30 
31 namespace Midi {
32 
34  struct EmbeddedFile {
35  Common::Array<uint8> contents;
36  };
37 
38  struct EmbeddedPart {
39  uint8 hasFile;
40  uint8 loop;
41  uint8 overrideTempo;
42  uint8 volume;
43  };
44 
45  struct SingleNotePart {
46  uint8 channel;
47  uint8 note;
48  uint8 velocity;
49  uint8 program;
50  };
51 
53  EmbeddedPart embedded;
54  SingleNotePart singleNote;
55  };
56 
57  MidiModifier();
58 
59  PlugInTypeTaggedValue executeWhen;
60  PlugInTypeTaggedValue terminateWhen;
61 
62  uint8 embeddedFlag;
63  ModeSpecificUnion modeSpecific;
64 
65  PlugInTypeTaggedValue embeddedTempo; // Float
66  PlugInTypeTaggedValue embeddedFadeIn; // Float
67  PlugInTypeTaggedValue embeddedFadeOut; // Float
68  PlugInTypeTaggedValue singleNoteDuration; // Float
69 
71 
72 protected:
73  DataReadErrorCode load(PlugIn &plugIn, const PlugInModifier &prefix, DataReader &reader) override;
74 };
75 
76 } // End of namespace Midi
77 
78 } // End of namespace Data
79 
80 } // End of namespace MTropolis
81 
82 #endif
Definition: runtime.h:1185
Definition: midi_data.h:33
Definition: actions.h:25
Definition: ptr.h:159
Definition: data.h:1904
Definition: data.h:261