Clean project structure.
This commit is contained in:
parent
78a4fa99ff
commit
947bf937fd
496 changed files with 206 additions and 137 deletions
|
@ -1,36 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "MidiDocument.h"
|
||||
#include "MetaMidiEvent.h"
|
||||
#include "MidiTrack.h"
|
||||
#include "MidiChannelEvent.h"
|
||||
#include "File.h"
|
||||
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
|
||||
using Path = std::filesystem::path;
|
||||
|
||||
class MidiReader
|
||||
{
|
||||
static constexpr const char TrackChunkLabel[] = "MTrk";
|
||||
static constexpr const char HeaderLabel[] = "MThd";
|
||||
|
||||
public:
|
||||
MidiReader();
|
||||
|
||||
MidiDocument* getDocument() const;
|
||||
|
||||
void read(const Path& path);
|
||||
|
||||
private:
|
||||
bool processHeader();
|
||||
bool processTrackChunk(bool debug=false);
|
||||
int processEvent(MidiTrack* track);
|
||||
|
||||
private:
|
||||
std::unique_ptr<File> mFile;
|
||||
MidiDocumentPtr mDocument;
|
||||
int mLastMidiChannel {0};
|
||||
MidiChannelEvent::Type mLastChannelEventType;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue