From 4d66c89b83488777904907682271dfadd1cb04c2 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 5 Oct 2016 20:08:26 +0200 Subject: SMF add support for type-0 files (count channels, not tracks) --- libs/evoral/evoral/SMF.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libs/evoral/evoral') 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 +#include #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 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 _type0channels; }; }; /* namespace Evoral */ -- cgit v1.2.3