Initialize uninitialized variable
[ardour.git] / libs / ardour / thread_buffers.cc
index b51576bfc920e1e46a5b908f38b5fe58dd106182..6e801ffd9cbb507d768798fc12a582256ef988d4 100644 (file)
@@ -1,21 +1,22 @@
 /*
-    Copyright (C) 2010 Paul Davis
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * Copyright (C) 2010-2012 Carl Hetherington <carl@carlh.net>
+ * Copyright (C) 2010-2017 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2013-2017 Robin Gareus <robin@gareus.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 
 #include <iostream>
 #include <algorithm>
@@ -30,10 +31,13 @@ using namespace std;
 ThreadBuffers::ThreadBuffers ()
        : silent_buffers (new BufferSet)
        , scratch_buffers (new BufferSet)
+       , noinplace_buffers (new BufferSet)
        , route_buffers (new BufferSet)
        , mix_buffers (new BufferSet)
        , gain_automation_buffer (0)
+       , trim_automation_buffer (0)
        , send_gain_automation_buffer (0)
+       , scratch_automation_buffer (0)
        , pan_automation_buffer (0)
        , npan_buffers (0)
 {
@@ -70,6 +74,7 @@ ThreadBuffers::ensure_buffers (ChanCount howmany, size_t custom)
                }
 
                scratch_buffers->ensure_buffers (*t, count, size);
+               noinplace_buffers->ensure_buffers (*t, count, size);
                mix_buffers->ensure_buffers (*t, count, size);
                silent_buffers->ensure_buffers (*t, count, size);
                route_buffers->ensure_buffers (*t, count, size);
@@ -79,14 +84,18 @@ ThreadBuffers::ensure_buffers (ChanCount howmany, size_t custom)
 
        delete [] gain_automation_buffer;
        gain_automation_buffer = new gain_t[audio_buffer_size];
+       delete [] trim_automation_buffer;
+       trim_automation_buffer = new gain_t[audio_buffer_size];
        delete [] send_gain_automation_buffer;
        send_gain_automation_buffer = new gain_t[audio_buffer_size];
+       delete [] scratch_automation_buffer;
+       scratch_automation_buffer = new gain_t[audio_buffer_size];
 
        allocate_pan_automation_buffers (audio_buffer_size, howmany.n_audio(), false);
 }
 
 void
-ThreadBuffers::allocate_pan_automation_buffers (framecnt_t nframes, uint32_t howmany, bool force)
+ThreadBuffers::allocate_pan_automation_buffers (samplecnt_t nframes, uint32_t howmany, bool force)
 {
        /* we always need at least 2 pan buffers */