#ifndef TINSEL_MIDI_H
#define TINSEL_MIDI_H

#include "common/file.h"
#include "common/array.h"
#include "sound/midiparser.h"
#include "sound/mididrv.h"

namespace Tinsel {

struct MidiFile {
	uint32 offset;
	uint32 length;
	uint32 file_offset;
};
class Midi {
	Common::File _file;
	MidiParser *_xmidiparser;
	MidiDriver *_mididrv;
	Common::Array<MidiFile> _mfiles;

public:
	Midi(Audio::Mixer *mixer);
	virtual ~Midi();
	bool loadFile(uint32 offset);
};

} // namespace Tinsel

#endif
