summaryrefslogtreecommitdiffstats
path: root/src/server/Buffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/Buffer.cpp')
-rw-r--r--src/server/Buffer.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/server/Buffer.cpp b/src/server/Buffer.cpp
index 2e977845..e08510a5 100644
--- a/src/server/Buffer.cpp
+++ b/src/server/Buffer.cpp
@@ -1,6 +1,6 @@
/*
This file is part of Ingen.
- Copyright 2007-2015 David Robillard <http://drobilla.net/>
+ Copyright 2007-2016 David Robillard <http://drobilla.net/>
Ingen is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free
@@ -112,7 +112,8 @@ Buffer::recycle()
void
Buffer::set_type(LV2_URID type, LV2_URID value_type)
{
- _type = type;
+ _type = type;
+ _value_type = value_type;
if (type == _factory.uris().atom_Sequence && value_type) {
_value_buffer = _factory.get_buffer(value_type, 0, 0, false);
}
@@ -333,6 +334,12 @@ Buffer::append_event(int64_t frames,
return true;
}
+bool
+Buffer::append_event(int64_t frames, const LV2_Atom* body)
+{
+ return append_event(frames, body->size, body->type, (const uint8_t*)(body + 1));
+}
+
SampleCount
Buffer::next_value_offset(SampleCount offset, SampleCount end) const
{