#include <cmath>
#include <cassert>
#include <algorithm>
+#include <vector>
#include <boost/scoped_array.hpp>
uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
double effective_height;
- float curve[npoints];
+ std::vector<float> curve(npoints);
- audio_region()->fade_in()->curve().get_vector (0, audio_region()->fade_in()->back()->when, curve, npoints);
+ audio_region()->fade_in()->curve().get_vector (0, audio_region()->fade_in()->back()->when, &curve[0], npoints);
if (_height >= NAME_HIGHLIGHT_THRESH) {
effective_height = _height - NAME_HIGHLIGHT_SIZE - 2;
uint32_t npoints = std::min (gdk_screen_width(), (int) pwidth);
double effective_height;
- float curve[npoints];
+ std::vector<float> curve(npoints);
- audio_region()->fade_out()->curve().get_vector (0, audio_region()->fade_out()->back()->when, curve, npoints);
+ audio_region()->fade_out()->curve().get_vector (0, audio_region()->fade_out()->back()->when, &curve[0], npoints);
if (_height >= NAME_HIGHLIGHT_THRESH) {
effective_height = _height - NAME_HIGHLIGHT_SIZE - 2;
} else {
- float vec[npoints];
- inverse->curve().get_vector (0, inverse->back()->when, vec, npoints);
+ std::vector<float> vec(npoints);
+ inverse->curve().get_vector (0, inverse->back()->when, &vec[0], npoints);
for (Points::size_type i = 0, pci = 0; i < npoints; ++i, ++pci) {
ArdourCanvas::Duple &p (ipoints[pci]);
}
void
-AudioRegionView::remove_gain_point_event (ArdourCanvas::Item *item, GdkEvent */*ev*/)
+AudioRegionView::remove_gain_point_event (ArdourCanvas::Item *item, GdkEvent* /*ev*/)
{
ControlPoint *cp = reinterpret_cast<ControlPoint *> (item->get_data ("control_point"));
audio_region()->envelope()->erase (cp->model());