summaryrefslogtreecommitdiffstats
path: root/src/server/Buffer.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-10-02 23:56:47 -0400
committerDavid Robillard <d@drobilla.net>2016-10-02 23:56:47 -0400
commita513af4218d0a62a45960d04ff6ddeecb8d3d4f5 (patch)
tree928d0ded4a352403b01a5b6a20fdd2a47a56256d /src/server/Buffer.cpp
parent05d89a68915df359fb50eae7e9a8e44a8bde7e7b (diff)
downloadingen-a513af4218d0a62a45960d04ff6ddeecb8d3d4f5.tar.gz
ingen-a513af4218d0a62a45960d04ff6ddeecb8d3d4f5.tar.bz2
ingen-a513af4218d0a62a45960d04ff6ddeecb8d3d4f5.zip
Add event outputs to Trigger and Controller
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
{