Ardour  8.7-15-gadf511264b
Curve.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2016 David Robillard <d@drobilla.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef EVORAL_CURVE_HPP
20 #define EVORAL_CURVE_HPP
21 
22 #include <inttypes.h>
23 #include <boost/noncopyable.hpp>
24 
25 #include "temporal/timeline.h"
26 
27 #include "evoral/visibility.h"
28 
29 namespace Evoral {
30 
31 class ControlList;
32 
33 class LIBEVORAL_API Curve : public boost::noncopyable
34 {
35 public:
36  Curve (const ControlList& cl);
37 
38  bool rt_safe_get_vector (Temporal::timepos_t const & x0, Temporal::timepos_t const & x1, float *arg, int32_t veclen) const;
39  void get_vector (Temporal::timepos_t const & x0, Temporal::timepos_t const & x1, float *arg, int32_t veclen) const;
40 
41  void solve () const;
42 
43  void mark_dirty() const { _dirty = true; }
44 
45 private:
46  double multipoint_eval (Temporal::timepos_t const & x) const;
47 
48  void _get_vector (Temporal::timepos_t x0, Temporal::timepos_t x1, float *arg, int32_t veclen) const;
49 
50  mutable bool _dirty;
52 };
53 
54 } // namespace Evoral
55 
56 #endif // EVORAL_CURVE_HPP
57 
double multipoint_eval(Temporal::timepos_t const &x) const
const ControlList & _list
Definition: Curve.h:51
void mark_dirty() const
Definition: Curve.h:43
bool rt_safe_get_vector(Temporal::timepos_t const &x0, Temporal::timepos_t const &x1, float *arg, int32_t veclen) const
void solve() const
bool _dirty
Definition: Curve.h:50
Curve(const ControlList &cl)
void _get_vector(Temporal::timepos_t x0, Temporal::timepos_t x1, float *arg, int32_t veclen) const
void get_vector(Temporal::timepos_t const &x0, Temporal::timepos_t const &x1, float *arg, int32_t veclen) const
#define LIBEVORAL_API
Definition: editor.h:87
DebugBits ControlList