MidiBuffer::iterator this_cycle_start = dst.end();
// Translates stamps to be relative to start, but add offset.
- const size_t events_read = _playback_buf->read(dst, start, end, offset);
-
- gint32 frames_read = end - start;
- /*cout << "frames read = " << frames_read << " events read = " << events_read
+ /*const size_t events_read = _playback_buf->read(dst, start, end, offset);
+ cout << "frames read = " << frames_read << " events read = " << events_read
<< " end = " << end << " start = " << start << " offset = " << offset
<< " readspace " << _playback_buf->read_space()
<< " writespace " << _playback_buf->write_space() << endl;*/
+
+ gint32 frames_read = end - start;
g_atomic_int_add(&_frames_read_from_ringbuffer, frames_read);
// Feed the data through the MidiStateTracker
int open(const std::string& path);
void close();
+ int read_event(uint32_t* delta_t, uint32_t* size, uint8_t** buf) const;
+
+private:
/** Used by flush_footer() to find the position to write the footer */
void seek_to_footer_position();
void write_chunk(const char id[4], uint32_t length, void* data);
size_t write_var_len(uint32_t val);
uint32_t read_var_len() const;
- int read_event(uint32_t* delta_t, uint32_t* size, uint8_t** buf) const;
-private:
static const uint16_t _ppqn = 19200;
FILE* _fd;