19 #ifndef EVORAL_OLD_SMF_HPP
20 #define EVORAL_OLD_SMF_HPP
26 template<
typename Time>
class Event;
30 template<
typename Time>
40 bool eof()
const {
return feof(
_fd); }
54 void close() THROW_FILE_ERROR;
56 int read_event(uint32_t* delta_t, uint32_t* size, uint8_t** buf) const;
66 void write_chunk(const
char id[4], uint32_t length,
void* data);
70 static const uint16_t
_ppqn = 19200;
int read_event(uint32_t *delta_t, uint32_t *size, uint8_t **buf) const
void end_write() THROW_FILE_ERROR
bool _empty
true iff file contains(non-empty) events
uint32_t _header_size
size of SMF header, including MTrk chunk header
int open(const std::string &path) THROW_FILE_ERROR
size_t write_var_len(uint32_t val)
void close() THROW_FILE_ERROR
static const uint16_t _ppqn
void write_chunk_header(const char id[4], uint32_t length)
uint32_t read_var_len() const
void write_chunk(const char id[4], uint32_t length, void *data)
void seek_to_start() const
void seek_to_footer_position()
void append_event_delta(uint32_t delta_t, const Event< Time > &ev)
Time _last_ev_time
last frame time written, relative to source start
LIBARDOUR_API PBD::PropertyDescriptor< framecnt_t > length
Time last_event_time() const