NO-OP: whitespace (clang-format)
This commit is contained in:
parent
1ed0e88e23
commit
76f30fe74e
@ -18,8 +18,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/buffer_set.h"
|
||||
@ -48,29 +48,28 @@ ThreadBuffers::ensure_buffers (ChanCount howmany, size_t custom)
|
||||
{
|
||||
// std::cerr << "ThreadBuffers " << this << " resize buffers with count = " << howmany << std::endl;
|
||||
|
||||
/* this is all protected by the process lock in the Session
|
||||
*/
|
||||
/* this is all protected by the process lock in the Session */
|
||||
|
||||
/* we always need at least 1 midi buffer */
|
||||
if (howmany.n_midi() < 1) {
|
||||
howmany.set_midi(1);
|
||||
if (howmany.n_midi () < 1) {
|
||||
howmany.set_midi (1);
|
||||
}
|
||||
|
||||
if (howmany.n_audio() == 0 && howmany.n_midi() == 1) {
|
||||
if (howmany.n_audio () == 0 && howmany.n_midi () == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
AudioEngine* _engine = AudioEngine::instance ();
|
||||
|
||||
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
|
||||
size_t count = std::max (scratch_buffers->available().get(*t), howmany.get(*t));
|
||||
for (DataType::iterator t = DataType::begin (); t != DataType::end (); ++t) {
|
||||
size_t count = std::max (scratch_buffers->available ().get (*t), howmany.get (*t));
|
||||
size_t size;
|
||||
if (custom > 0) {
|
||||
size = custom;
|
||||
} else {
|
||||
size = (*t == DataType::MIDI)
|
||||
? _engine->raw_buffer_size (*t)
|
||||
: _engine->raw_buffer_size (*t) / sizeof (Sample);
|
||||
? _engine->raw_buffer_size (*t)
|
||||
: _engine->raw_buffer_size (*t) / sizeof (Sample);
|
||||
}
|
||||
|
||||
scratch_buffers->ensure_buffers (*t, count, size);
|
||||
@ -82,16 +81,16 @@ ThreadBuffers::ensure_buffers (ChanCount howmany, size_t custom)
|
||||
|
||||
size_t audio_buffer_size = custom > 0 ? custom : _engine->raw_buffer_size (DataType::AUDIO) / sizeof (Sample);
|
||||
|
||||
delete [] gain_automation_buffer;
|
||||
delete[] gain_automation_buffer;
|
||||
gain_automation_buffer = new gain_t[audio_buffer_size];
|
||||
delete [] trim_automation_buffer;
|
||||
delete[] trim_automation_buffer;
|
||||
trim_automation_buffer = new gain_t[audio_buffer_size];
|
||||
delete [] send_gain_automation_buffer;
|
||||
delete[] send_gain_automation_buffer;
|
||||
send_gain_automation_buffer = new gain_t[audio_buffer_size];
|
||||
delete [] scratch_automation_buffer;
|
||||
delete[] scratch_automation_buffer;
|
||||
scratch_automation_buffer = new gain_t[audio_buffer_size];
|
||||
|
||||
allocate_pan_automation_buffers (audio_buffer_size, howmany.n_audio(), false);
|
||||
allocate_pan_automation_buffers (audio_buffer_size, howmany.n_audio (), false);
|
||||
}
|
||||
|
||||
void
|
||||
@ -106,12 +105,11 @@ ThreadBuffers::allocate_pan_automation_buffers (samplecnt_t nframes, uint32_t ho
|
||||
}
|
||||
|
||||
if (pan_automation_buffer) {
|
||||
|
||||
for (uint32_t i = 0; i < npan_buffers; ++i) {
|
||||
delete [] pan_automation_buffer[i];
|
||||
delete[] pan_automation_buffer[i];
|
||||
}
|
||||
|
||||
delete [] pan_automation_buffer;
|
||||
delete[] pan_automation_buffer;
|
||||
}
|
||||
|
||||
pan_automation_buffer = new pan_t*[howmany];
|
||||
|
Loading…
Reference in New Issue
Block a user