1 #include "outputs/internal.hpp"
9 class output_driver_gmidi_offset
: public output_driver
12 output_driver_gmidi_offset(const std::string
& filename
)
15 out
= new std::ofstream(filename
.c_str(), std::ios_base::binary
);
19 throw std::runtime_error("Unable to open output file");
21 set_gmidi_callback(make_bound_method(*this, &output_driver_gmidi_offset::midi_data
));
25 ~output_driver_gmidi_offset()
35 void midi_data(uint64_t timestamp
, uint8_t data
)
38 (*out
) << timestamp
<< std::endl
;
47 class output_driver_gmidi_offset_factory
: output_driver_factory
50 output_driver_gmidi_offset_factory()
51 : output_driver_factory("gmidi-offset")
55 output_driver
& make(const std::string
& type
, const std::string
& name
, const std::string
& parameters
)
58 throw std::runtime_error("gmidi-offset output does not take parameters");
59 return *new output_driver_gmidi_offset(name
);