LMMS
Loading...
Searching...
No Matches
ValueBuffer.h
Go to the documentation of this file.
1/*
2 * ValueBuffer.h - a container class for passing buffers of model values around
3 *
4 * Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
5 * Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
6 *
7 * This file is part of LMMS - https://lmms.io
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with this program (see COPYING); if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301 USA.
23 *
24 */
25
26#ifndef LMMS_VALUE_BUFFER_H
27#define LMMS_VALUE_BUFFER_H
28
29#include <vector>
30
31#include "lmms_export.h"
32
33namespace lmms
34{
35
36
37class LMMS_EXPORT ValueBuffer : public std::vector<float>
38{
39public:
40 ValueBuffer() = default;
42
43 void fill(float value);
44
45 float value(int offset ) const;
46
47 const float * values() const;
48 float * values();
49
50 int length() const;
51
52 void interpolate(float start, float end);
53};
54
55
56} // namespace lmms
57
58#endif // LMMS_VALUE_BUFFER_H
float interpolate(const float *data, size_t len, float pos)
Definition Util.cpp:215
void fill(float value)
Definition ValueBuffer.cpp:14
const float * values() const
Definition ValueBuffer.cpp:24
float value(int offset) const
Definition ValueBuffer.cpp:19
ValueBuffer()=default
int length() const
Definition ValueBuffer.cpp:34
static PuglViewHint int value
Definition pugl.h:1708
virtual ASIOError start()=0
Definition AudioAlsa.cpp:35
png_uint_32 length
Definition png.c:2247