summaryrefslogtreecommitdiffabout
path: root/include/midillo/MTrk.h
Unidiff
Diffstat (limited to 'include/midillo/MTrk.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/midillo/MTrk.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/include/midillo/MTrk.h b/include/midillo/MTrk.h
new file mode 100644
index 0000000..0884388
--- a/dev/null
+++ b/include/midillo/MTrk.h
@@ -0,0 +1,54 @@
1#ifndef __MIDILLO_MTRK_H
2#define __MIDILLO_MTRK_H
3
4#include <istream>
5#include <ostream>
6#include <list>
7#include <midillo/chunk.h>
8#include <midillo/event.h>
9
10/**
11 * @file
12 * @brief MTrk -- track chunk container
13 */
14
15namespace midillo {
16 using std::istream;
17 using std::ostream;
18
19 /**
20 * MTrk track chunk container class
21 */
22 class MTrk_t : public chunk_t {
23 public:
24 /**
25 * MIDI events contained in the track
26 */
27 events_t events;
28
29 /**
30 * Load MTrk chunk from the stream
31 * @param s input stream
32 */
33 void load(istream& s);
34
35 /**
36 * Save MTrk chunk to the stream
37 * @param s output stream
38 */
39 void save(ostream& s) const;
40
41 /**
42 * Dump textual representation of MTrk chunk to stream
43 * @param s output stream
44 */
45 void dump(ostream& s) const;
46 };
47
48 inline ostream& operator<<(ostream& s,const MTrk_t& mtrk) {
49 mtrk.dump(s); return s;
50 }
51
52}
53
54#endif /* __MIDILLO_MTRK_H */