Skip to content

Commit a4fc0d9

Browse files
committed
Optimized code for updated implementation of dspu::MeterGraph
1 parent 70f242d commit a4fc0d9

3 files changed

Lines changed: 15 additions & 9 deletions

File tree

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*******************************************************************************
44

55
=== 1.0.11 ===
6-
6+
* Optimized code for updated implementation of dspu::MeterGraph.
77

88
=== 1.0.10 ===
99
* Added DC offset control at the clipping stage.

include/private/plugins/mb_clipper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ namespace lsp
327327
float *vLinSigmoid; // Linear scale for sigmoid
328328
float *vLogSigmoid; // Logarithmic scale for sigmoid
329329
float *vTime; // Time graph
330+
float *vIDisplay; // Inline display buffer
330331
float *vWaveformTime; // Waveform time graph
331332
core::IDBuffer *pIDisplay; // Inline display buffer
332333

src/main/plug/mb_clipper.cpp

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ namespace lsp
225225
vLinSigmoid = NULL;
226226
vLogSigmoid = NULL;
227227
vTime = NULL;
228+
vIDisplay = NULL;
228229
vWaveformTime = NULL;
229230
pIDisplay = NULL;
230231

@@ -279,6 +280,7 @@ namespace lsp
279280
szof_curve_buffer + // vLinSigmoid
280281
szof_curve_buffer + // vLogSigmoid
281282
szof_time_buffer + // vTime
283+
szof_time_buffer + // vIDisplay
282284
szof_time_buffer + // vWaveformTime
283285
meta::mb_clipper::BANDS_MAX * (
284286
szof_fft_buffer // vTr
@@ -359,6 +361,7 @@ namespace lsp
359361
vLinSigmoid = advance_ptr_bytes<float>(ptr, szof_curve_buffer);
360362
vLogSigmoid = advance_ptr_bytes<float>(ptr, szof_curve_buffer);
361363
vTime = advance_ptr_bytes<float>(ptr, szof_time_buffer);
364+
vIDisplay = advance_ptr_bytes<float>(ptr, szof_time_buffer);
362365
vWaveformTime = advance_ptr_bytes<float>(ptr, szof_time_buffer);
363366

364367
for (size_t i=0; i < nChannels; ++i)
@@ -2506,9 +2509,9 @@ namespace lsp
25062509
float *out = mesh->pvData[index++];
25072510
float *red = mesh->pvData[index++];
25082511

2509-
dsp::copy(&in[2], c->sInGraph.data(), meta::mb_clipper::TIME_MESH_POINTS);
2510-
dsp::copy(&out[2], c->sOutGraph.data(), meta::mb_clipper::TIME_MESH_POINTS);
2511-
dsp::copy(&red[2], c->sRedGraph.data(), meta::mb_clipper::TIME_MESH_POINTS);
2512+
c->sInGraph.read(&in[2], meta::mb_clipper::TIME_MESH_POINTS);
2513+
c->sOutGraph.read(&out[2], meta::mb_clipper::TIME_MESH_POINTS);
2514+
c->sRedGraph.read(&red[2], meta::mb_clipper::TIME_MESH_POINTS);
25122515

25132516
// Generate extra points
25142517
in[0] = 0.0f;
@@ -2560,7 +2563,7 @@ namespace lsp
25602563

25612564
float *osc = mesh->pvData[index++];
25622565

2563-
dsp::copy(&osc[2], c->sWaveformGraph.data(), meta::mb_clipper::TIME_MESH_POINTS);
2566+
c->sWaveformGraph.read(&osc[2], meta::mb_clipper::TIME_MESH_POINTS);
25642567

25652568
// Generate extra points
25662569
osc[0] = 0.0f;
@@ -2611,9 +2614,9 @@ namespace lsp
26112614
float *out = mesh->pvData[index++];
26122615
float *red = mesh->pvData[index++];
26132616

2614-
dsp::copy(&in[2], b->sInGraph.data(), meta::mb_clipper::TIME_MESH_POINTS);
2615-
dsp::copy(&out[2], b->sOutGraph.data(), meta::mb_clipper::TIME_MESH_POINTS);
2616-
dsp::copy(&red[2], b->sRedGraph.data(), meta::mb_clipper::TIME_MESH_POINTS);
2617+
b->sInGraph.read(&in[2], meta::mb_clipper::TIME_MESH_POINTS);
2618+
b->sOutGraph.read(&out[2], meta::mb_clipper::TIME_MESH_POINTS);
2619+
b->sRedGraph.read(&red[2], meta::mb_clipper::TIME_MESH_POINTS);
26172620

26182621
// Generate extra points
26192622
in[0] = 0.0f;
@@ -2665,7 +2668,7 @@ namespace lsp
26652668

26662669
float *osc = mesh->pvData[index++];
26672670

2668-
dsp::copy(&osc[2], b->sWaveformGraph.data(), meta::mb_clipper::TIME_MESH_POINTS);
2671+
b->sWaveformGraph.read(&osc[2], meta::mb_clipper::TIME_MESH_POINTS);
26692672

26702673
// Generate extra points
26712674
osc[0] = 0.0f;
@@ -3129,6 +3132,8 @@ namespace lsp
31293132
v->write("vLinSigmoid", vLinSigmoid);
31303133
v->write("vLogSigmoid", vLogSigmoid);
31313134
v->write("vTime", vTime);
3135+
v->write("vIDisplay", vIDisplay);
3136+
v->write("vWaveformTime", vWaveformTime);
31323137
v->write("pIDisplay", pIDisplay);
31333138

31343139
v->write("pBypass", pBypass);

0 commit comments

Comments
 (0)