Clean up some tests.
This commit is contained in:
parent
b17ba8b3a7
commit
c102ebb6da
64 changed files with 615 additions and 541 deletions
|
@ -5,29 +5,30 @@
|
|||
#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();
|
||||
|
||||
void Read(const std::string& path);
|
||||
MidiDocument* getDocument() const;
|
||||
|
||||
MidiDocument* GetDocument() const;
|
||||
void read(const Path& path);
|
||||
|
||||
private:
|
||||
|
||||
bool ProcessHeader();
|
||||
bool ProcessTrackChunk(bool debug=false);
|
||||
int ProcessEvent(MidiTrack* track);
|
||||
bool processHeader();
|
||||
bool processTrackChunk(bool debug=false);
|
||||
int processEvent(MidiTrack* track);
|
||||
|
||||
private:
|
||||
|
||||
std::unique_ptr<File> mFile;
|
||||
MidiDocumentPtr mDocument;
|
||||
int mLastMidiChannel {0};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue