41 template<
typename Time>
67 template<
typename Time>
73 get_read_vector (&vec);
75 if (vec.
len[0] + vec.
len[1] < size) {
79 assert (vec.
len[0] > 0 || vec.
len[1] > 0);
82 memcpy (buf, vec.
buf[0], std::min (vec.
len[0], size));
85 if (vec.
len[0] < size) {
87 memcpy (buf + vec.
len[0], vec.
buf[1], size - vec.
len[0]);
94 template<
typename Time>
117 template<
typename Time>
122 if (!buf || size == 0 || write_space() < (
sizeof(Time) +
sizeof(
Evoral::EventType) +
sizeof(uint32_t) + size)) {
bool read(Time *time, Evoral::EventType *type, uint32_t *size, uint8_t *buf)
uint32_t write(Time time, Evoral::EventType type, uint32_t size, const uint8_t *buf)
EventRingBuffer(size_t capacity)
bool peek(uint8_t *, size_t size)
size_t write(const T *src, size_t cnt)