diff options
author | Robin Gareus <robin@gareus.org> | 2016-10-05 20:08:26 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-10-05 20:08:26 +0200 |
commit | 4d66c89b83488777904907682271dfadd1cb04c2 (patch) | |
tree | 81a4003b6d5c651f4f877ec315a21e0c3bded91a /libs/evoral/evoral | |
parent | f6570bb5070ae217822299492ddeae3ad19bc46f (diff) |
SMF add support for type-0 files (count channels, not tracks)
Diffstat (limited to 'libs/evoral/evoral')
-rw-r--r-- | libs/evoral/evoral/SMF.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/evoral/evoral/SMF.hpp b/libs/evoral/evoral/SMF.hpp index fd7263b5c4..0cbd5bb638 100644 --- a/libs/evoral/evoral/SMF.hpp +++ b/libs/evoral/evoral/SMF.hpp @@ -21,6 +21,7 @@ #define EVORAL_SMF_HPP #include <glibmm/threads.h> +#include <set> #include "evoral/visibility.h" #include "evoral/types.hpp" @@ -49,7 +50,7 @@ public: std::string _file_name; }; - SMF() : _smf(0), _smf_track(0), _empty(true) {}; + SMF(); virtual ~SMF(); static bool test(const std::string& path); @@ -75,11 +76,17 @@ public: double round_to_file_precision (double val) const; + bool is_type0 () const { return _type0; } + std::set<uint8_t> channels () const { return _type0channels; } + private: smf_t* _smf; smf_track_t* _smf_track; bool _empty; ///< true iff file contains(non-empty) events mutable Glib::Threads::Mutex _smf_lock; + + bool _type0; + std::set<uint8_t> _type0channels; }; }; /* namespace Evoral */ |