summaryrefslogtreecommitdiff
path: root/src/music/midifile.hpp
diff options
context:
space:
mode:
authorNiels Martin Hansen <nielsm@indvikleren.dk>2018-03-15 22:14:59 +0100
committerMichael Lutz <michi@icosahedron.de>2018-06-05 22:58:35 +0200
commite2fa4b71c62bb09add85c231bd30a2b86ae8b5e6 (patch)
tree2d6bc56d09daff9bc1f2b17deab15e4c07ed31d2 /src/music/midifile.hpp
parent921101ed065c6420fdf39c735b747140819972b7 (diff)
downloadopenttd-e2fa4b71c62bb09add85c231bd30a2b86ae8b5e6.tar.xz
Feature: Console command to dump decoded music to .mid file
Diffstat (limited to 'src/music/midifile.hpp')
-rw-r--r--src/music/midifile.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/music/midifile.hpp b/src/music/midifile.hpp
index e41435364..7c567d45c 100644
--- a/src/music/midifile.hpp
+++ b/src/music/midifile.hpp
@@ -36,11 +36,16 @@ struct MidiFile {
std::vector<TempoChange> tempos; ///< list of tempo changes in file
uint16 tickdiv; ///< ticks per quarter note
+ MidiFile();
+ ~MidiFile();
+
bool LoadFile(const char *filename);
bool LoadMpsData(const byte *data, size_t length);
bool LoadSong(const MusicSongInfo &song);
void MoveFrom(MidiFile &other);
+ bool WriteSMF(const char *filename);
+
static bool ReadSMFHeader(const char *filename, SMFHeader &header);
static bool ReadSMFHeader(FILE *file, SMFHeader &header);
};