* disabled debugging output
[ardour.git] / libs / evoral / evoral / SMF.hpp
index a7a2abf4bf469c6c3ae54176d7e86e5ccdaf6bf2..e9f2f47bfebb14a1e54b57dac9fe3909f3c92875 100644 (file)
@@ -19,8 +19,7 @@
 #ifndef EVORAL_SMF_HPP
 #define EVORAL_SMF_HPP
 
-#include <string>
-#include "evoral/types.hpp"
+#include "evoral/MIDIFile.hpp"
 
 namespace Evoral {
        
@@ -31,7 +30,7 @@ template<typename Time> class EventRingBuffer;
 /** Standard Midi File (Type 0)
  */
 template<typename Time>
-class SMF {
+class SMF : public MIDIFile<Time> {
 public:
        SMF();
        virtual ~SMF();
@@ -44,17 +43,17 @@ public:
        
        Time last_event_time() const { return _last_ev_time; }
        
-       void begin_write(FrameTime start_time);
-       void append_event_unlocked(uint32_t delta_t, const Event<Time>& ev);
-       void end_write();
+       void begin_write();
+       void append_event_delta(uint32_t delta_t, const Event<Time>& ev);
+       void end_write() THROW_FILE_ERROR;
        
        void flush();
        int  flush_header();
        int  flush_footer();
 
 protected:
-       int  open(const std::string& path);
-       void close();
+       int  open(const std::string& path) THROW_FILE_ERROR;
+       void close() THROW_FILE_ERROR;
        
        int read_event(uint32_t* delta_t, uint32_t* size, uint8_t** buf) const;