mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 13:46:30 +01:00
NO-OP: whitespace (clang-format)
This commit is contained in:
parent
1ed0e88e23
commit
76f30fe74e
1 changed files with 16 additions and 18 deletions
|
|
@ -18,8 +18,8 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#include "ardour/audioengine.h"
|
#include "ardour/audioengine.h"
|
||||||
#include "ardour/buffer_set.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;
|
// 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 */
|
/* we always need at least 1 midi buffer */
|
||||||
if (howmany.n_midi() < 1) {
|
if (howmany.n_midi () < 1) {
|
||||||
howmany.set_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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioEngine* _engine = AudioEngine::instance ();
|
AudioEngine* _engine = AudioEngine::instance ();
|
||||||
|
|
||||||
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++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 count = std::max (scratch_buffers->available ().get (*t), howmany.get (*t));
|
||||||
size_t size;
|
size_t size;
|
||||||
if (custom > 0) {
|
if (custom > 0) {
|
||||||
size = custom;
|
size = custom;
|
||||||
} else {
|
} else {
|
||||||
size = (*t == DataType::MIDI)
|
size = (*t == DataType::MIDI)
|
||||||
? _engine->raw_buffer_size (*t)
|
? _engine->raw_buffer_size (*t)
|
||||||
: _engine->raw_buffer_size (*t) / sizeof (Sample);
|
: _engine->raw_buffer_size (*t) / sizeof (Sample);
|
||||||
}
|
}
|
||||||
|
|
||||||
scratch_buffers->ensure_buffers (*t, count, size);
|
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);
|
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];
|
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];
|
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];
|
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];
|
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
|
void
|
||||||
|
|
@ -106,12 +105,11 @@ ThreadBuffers::allocate_pan_automation_buffers (samplecnt_t nframes, uint32_t ho
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pan_automation_buffer) {
|
if (pan_automation_buffer) {
|
||||||
|
|
||||||
for (uint32_t i = 0; i < npan_buffers; ++i) {
|
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];
|
pan_automation_buffer = new pan_t*[howmany];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue