92
281
//---------------------------------------------------------
94
283
void AudioTrack::copyData(unsigned pos, int dstChannels, unsigned nframes, float** dstBuffer)
96
int srcChannels = channels();
97
float* buffer[srcChannels];
98
float data[nframes * srcChannels];
100
for (int i = 0; i < srcChannels; ++i)
101
buffer[i] = data + i * nframes;
103
if (!getData(pos, srcChannels, nframes, buffer) || off() || (isMute() && !_prefader)) {
104
for (int i = 0; i < dstChannels; ++i) {
105
memset(dstBuffer[i], 0, sizeof(float) * nframes);
111
//---------------------------------------------------
113
//---------------------------------------------------
116
AuxList* al = song->auxs();
117
unsigned naux = al->size();
118
for (unsigned i = 0; i < naux; ++i) {
119
float m = _auxSend[i];
120
if (m <= 0.0) // optimize
122
AudioAux* a = (AudioAux*)((*al)[i]);
123
float** dst = a->sendBuffer();
124
for (int ch = 0; ch < srcChannels; ++ch) {
125
float* db = dst[ch % a->channels()];
126
float* sb = buffer[ch];
127
for (unsigned f = 0; f < nframes; ++f) {
128
*db++ += (*sb++ * m); // add to mix
134
//---------------------------------------------------
135
// apply plugin chain
136
//---------------------------------------------------
138
_efxPipe->apply(srcChannels, nframes, buffer);
140
//---------------------------------------------------
142
//---------------------------------------------------
144
float meter[srcChannels];
146
for (int i = 0; i < srcChannels; ++i) {
147
float* p = buffer[i];
149
for (unsigned k = 0; k < nframes; ++k) {
155
_meter[i] = lrint(meter[i] * 32767.0);
156
if (_meter[i] > _peak[i])
157
_peak[i] = _meter[i];
161
for (int i = 0; i < dstChannels; ++i)
162
memset(dstBuffer[i], 0, sizeof(float) * nframes);
166
//---------------------------------------------------
168
// postfader metering
169
//---------------------------------------------------
172
double _volume = volume();
174
vol[0] = _volume * (1.0 - _pan);
175
vol[1] = _volume * (1.0 + _pan);
177
if (srcChannels == dstChannels) {
179
for (int c = 0; c < dstChannels; ++c) {
180
float* sp = buffer[c];
181
float* dp = dstBuffer[c];
182
for (unsigned k = 0; k < nframes; ++k)
183
*dp++ = (*sp++ * vol[c]);
187
for (int c = 0; c < dstChannels; ++c) {
189
float* sp = buffer[c];
190
float* dp = dstBuffer[c];
191
//printf("2 dstBuffer[c]=%d\n",long(dstBuffer[c]));
192
for (unsigned k = 0; k < nframes; ++k) {
193
float val = *sp++ * vol[c];
195
double f = fabs(val);
199
_meter[c] = lrint(meter[c] * 32767.0);
200
if (_meter[c] > _peak[c])
201
_peak[c] = _meter[c];
205
else if (srcChannels == 1 && dstChannels == 2) {
206
float* sp = buffer[0];
208
for (int c = 0; c < dstChannels; ++c) {
209
float* dp = dstBuffer[c];
210
for (unsigned k = 0; k < nframes; ++k)
211
*dp++ = (*sp++ * vol[c]);
216
for (unsigned k = 0; k < nframes; ++k) {
218
double f = fabs(val) * _volume;
221
*(dstBuffer[0] + k) = val * vol[0];
222
*(dstBuffer[1] + k) = val * vol[1];
224
_meter[0] = lrint(meter[0] * 32767.0);
225
if (_meter[0] > _peak[0])
226
_peak[0] = _meter[0];
229
else if (srcChannels == 2 && dstChannels == 1) {
230
float* sp1 = buffer[0];
231
float* sp2 = buffer[1];
233
float* dp = dstBuffer[0];
234
for (unsigned k = 0; k < nframes; ++k)
235
*dp++ = (*sp1++ * vol[0] + *sp2++ * vol[1]);
238
float* dp = dstBuffer[0];
241
for (unsigned k = 0; k < nframes; ++k) {
242
float val1 = *sp1++ * vol[0];
243
float val2 = *sp2++ * vol[1];
244
double f1 = fabs(val1);
247
double f2 = fabs(val2);
250
*dp++ = (val1 + val2);
252
_meter[0] = lrint(meter[0] * 32767.0);
253
if (_meter[0] > _peak[0])
254
_peak[0] = _meter[0];
255
_meter[1] = lrint(meter[1] * 32767.0);
256
if (_meter[1] > _peak[1])
257
_peak[1] = _meter[1];
285
//Changed by T356. 12/12/09.
286
// Overhaul and streamline to eliminate multiple processing during one process loop.
287
// Was causing ticking sound with synths + multiple out routes because synths were being processed multiple times.
288
// Make better use of AudioTrack::outBuffers as a post-effect pre-volume cache system for multiple calls here during processing.
289
// Previously only WaveTrack used them. (Changed WaveTrack as well).
291
int srcChannels = channels();
293
//Added by Tim. p3.3.16
295
printf("MusE: AudioTrack::copyData name:%s processed:%d\n", name().latin1(), processed());
298
// Special consideration for metronome: It is not part of the track list,
299
// and it has no in or out routes, yet multiple output tracks may call addData on it !
300
// We can't tell how many output tracks call it, so we can only assume there might be more than one.
301
// Not strictly necessary here because only addData is ever called, but just to be consistent...
302
//bool usedirectbuf = (outRoutes()->size() <= 1) || (type() == AUDIO_OUTPUT);
303
bool usedirectbuf = ((outRoutes()->size() <= 1) || (type() == AUDIO_OUTPUT)) && (this != metronome);
307
float* buffer[srcChannels];
308
//float data[nframes * srcChannels];
309
//for(i = 0; i < srcChannels; ++i)
310
// buffer[i] = data + i * nframes;
312
// precalculate stereo volume
314
double _volume = volume();
316
vol[0] = _volume * (1.0 - _pan);
317
vol[1] = _volume * (1.0 + _pan);
318
float meter[srcChannels];
320
// Have we been here already during this process cycle?
323
// If there is only one (or no) output routes, it's an error - we've been called more than once per process cycle!
326
printf("MusE: AudioTrack::copyData Error! One or no out routes, but already processed! Copying local buffers anyway...\n");
329
// Is there already some data gathered from a previous call during this process cycle?
332
// Point the input buffers at our local cached 'pre-volume' buffers. They need processing, so continue on after.
333
for(i = 0; i < srcChannels; ++i)
334
buffer[i] = outBuffers[i];
338
// No data was available from a previous call during this process cycle. Zero the supplied buffers and just return.
339
for(i = 0; i < dstChannels; ++i)
341
if(config.useDenormalBias)
343
for(unsigned int q = 0; q < nframes; ++q)
344
dstBuffer[i][q] = denormalBias;
347
memset(dstBuffer[i], 0, sizeof(float) * nframes);
354
// First time here during this process cycle.
356
// Point the input buffers at a temporary stack buffer.
357
float data[nframes * srcChannels];
358
for(i = 0; i < srcChannels; ++i)
359
buffer[i] = data + i * nframes;
361
// getData can use the supplied buffers, or change buffer to point to its own local buffers or Jack buffers etc.
362
// For ex. if this is an audio input, Jack will set the pointers for us in AudioInput::getData!
363
if(!getData(pos, srcChannels, nframes, buffer) || off() || (isMute() && !_prefader))
365
//Added by Tim. p3.3.16
367
printf("MusE: AudioTrack::copyData name:%s dstChannels:%d zeroing buffers\n", name().latin1(), dstChannels);
370
// No data was available. Zero the supplied buffers.
372
for(i = 0; i < dstChannels; ++i)
374
if(config.useDenormalBias)
376
for(q = 0; q < nframes; ++q)
377
dstBuffer[i][q] = denormalBias;
380
memset(dstBuffer[i], 0, sizeof(float) * nframes);
383
for(i = 0; i < srcChannels; ++i)
391
if(config.useDenormalBias)
393
for(q = 0; q < nframes; ++q)
394
outBuffers[i][q] = denormalBias;
397
memset(outBuffers[i], 0, sizeof(float) * nframes);
407
//---------------------------------------------------
408
// apply plugin chain
409
//---------------------------------------------------
411
_efxPipe->apply(srcChannels, nframes, buffer);
413
//---------------------------------------------------
415
//---------------------------------------------------
417
if(hasAuxSend() && !isMute())
419
AuxList* al = song->auxs();
420
unsigned naux = al->size();
421
for(unsigned k = 0; k < naux; ++k)
423
float m = _auxSend[k];
424
if(m <= 0.0001) // optimize
426
AudioAux* a = (AudioAux*)((*al)[k]);
427
float** dst = a->sendBuffer();
428
int auxChannels = a->channels();
429
if((srcChannels ==1 && auxChannels==1) || srcChannels == 2)
431
for(int ch = 0; ch < srcChannels; ++ch)
433
float* db = dst[ch % a->channels()]; // no matter whether there's one or two dst buffers
434
float* sb = buffer[ch];
435
for(unsigned f = 0; f < nframes; ++f)
436
*db++ += (*sb++ * m * vol[ch]); // add to mix
439
else if(srcChannels==1 && auxChannels==2) // copy mono to both channels
441
for(int ch = 0; ch < auxChannels; ++ch)
443
float* db = dst[ch % a->channels()];
444
float* sb = buffer[0];
445
for(unsigned f = 0; f < nframes; ++f)
446
*db++ += (*sb++ * m * vol[ch]); // add to mix
452
//---------------------------------------------------
454
//---------------------------------------------------
458
for(i = 0; i < srcChannels; ++i)
460
float* p = buffer[i];
462
for(unsigned k = 0; k < nframes; ++k)
469
//_meter[i] = lrint(meter[i] * 32767.0);
470
_meter[i] = meter[i];
471
if(_meter[i] > _peak[i])
472
_peak[i] = _meter[i];
479
for(i = 0; i < dstChannels; ++i)
481
if(config.useDenormalBias)
483
for(q = 0; q < nframes; q++)
484
dstBuffer[i][q] = denormalBias;
487
memset(dstBuffer[i], 0, sizeof(float) * nframes);
493
for(i = 0; i < srcChannels; ++i)
495
if(config.useDenormalBias)
497
for(q = 0; q < nframes; ++q)
498
outBuffers[i][q] = denormalBias;
501
memset(outBuffers[i], 0, sizeof(float) * nframes);
511
// If we're using local cached 'pre-volume' buffers, copy the input buffers (as they are right now: post-effect pre-volume) back to them.
514
for(i = 0; i < srcChannels; ++i)
515
AL::dsp->cpy(outBuffers[i], buffer[i], nframes);
518
// We have some data! Set to true.
522
//---------------------------------------------------
524
// postfader metering
525
//---------------------------------------------------
527
if(srcChannels == dstChannels)
531
for(int c = 0; c < dstChannels; ++c)
533
float* sp = buffer[c];
534
float* dp = dstBuffer[c];
535
for(unsigned k = 0; k < nframes; ++k)
536
*dp++ = (*sp++ * vol[c]);
541
for(int c = 0; c < dstChannels; ++c)
544
float* sp = buffer[c];
545
float* dp = dstBuffer[c];
546
//printf("2 dstBuffer[c]=%d\n",long(dstBuffer[c]));
547
for(unsigned k = 0; k < nframes; ++k)
549
float val = *sp++ * vol[c];
551
double f = fabs(val);
555
//_meter[c] = lrint(meter[c] * 32767.0);
556
_meter[c] = meter[c];
557
if(_meter[c] > _peak[c])
558
_peak[c] = _meter[c];
562
else if(srcChannels == 1 && dstChannels == 2)
564
float* sp = buffer[0];
567
for(int c = 0; c < dstChannels; ++c)
569
float* dp = dstBuffer[c];
570
for(unsigned k = 0; k < nframes; ++k)
571
*dp++ = (*sp++ * vol[c]);
577
for(unsigned k = 0; k < nframes; ++k)
580
double f = fabs(val) * _volume;
583
*(dstBuffer[0] + k) = val * vol[0];
584
*(dstBuffer[1] + k) = val * vol[1];
586
//_meter[0] = lrint(meter[0] * 32767.0);
587
_meter[0] = meter[0];
588
if(_meter[0] > _peak[0])
589
_peak[0] = _meter[0];
592
else if(srcChannels == 2 && dstChannels == 1)
594
float* sp1 = buffer[0];
595
float* sp2 = buffer[1];
598
float* dp = dstBuffer[0];
599
for(unsigned k = 0; k < nframes; ++k)
600
*dp++ = (*sp1++ * vol[0] + *sp2++ * vol[1]);
604
float* dp = dstBuffer[0];
607
for(unsigned k = 0; k < nframes; ++k)
609
float val1 = *sp1++ * vol[0];
610
float val2 = *sp2++ * vol[1];
611
double f1 = fabs(val1);
614
double f2 = fabs(val2);
617
*dp++ = (val1 + val2);
619
//_meter[0] = lrint(meter[0] * 32767.0);
620
_meter[0] = meter[0];
621
if(_meter[0] > _peak[0])
622
_peak[0] = _meter[0];
623
//_meter[1] = lrint(meter[1] * 32767.0);
624
_meter[1] = meter[1];
625
if(_meter[1] > _peak[1])
626
_peak[1] = _meter[1];
262
633
//---------------------------------------------------------
264
635
//---------------------------------------------------------
266
637
void AudioTrack::addData(unsigned pos, int dstChannels, unsigned nframes, float** dstBuffer)
270
int srcChannels = channels();
271
float* buffer[srcChannels];
272
float data[nframes * srcChannels];
274
for (int i = 0; i < srcChannels; ++i)
275
buffer[i] = data + i * nframes;
276
// getData can use the supplied buffers or change buffer to point
279
if (!getData(pos, srcChannels, nframes, buffer)) {
280
for (int i = 0; i < srcChannels; ++i)
285
//---------------------------------------------------
287
//---------------------------------------------------
290
AuxList* al = song->auxs();
291
unsigned naux = al->size();
292
for (unsigned i = 0; i < naux; ++i) {
293
float m = _auxSend[i];
294
if (m <= 0.0) // optimize
296
AudioAux* a = (AudioAux*)((*al)[i]);
297
float** dst = a->sendBuffer();
298
for (int ch = 0; ch < srcChannels; ++ch) {
299
float* db = dst[ch % a->channels()];
300
float* sb = buffer[ch];
301
for (unsigned f = 0; f < nframes; ++f) {
302
*db++ += (*sb++ * m); // add to mix
308
//---------------------------------------------------
309
// apply plugin chain
310
//---------------------------------------------------
312
_efxPipe->apply(srcChannels, nframes, buffer);
314
//---------------------------------------------------
316
//---------------------------------------------------
318
float meter[srcChannels];
320
for (int i = 0; i < srcChannels; ++i) {
321
float* p = buffer[i];
323
for (unsigned k = 0; k < nframes; ++k) {
329
_meter[i] = lrint(meter[i] * 32767.0);
330
if (_meter[i] > _peak[i])
331
_peak[i] = _meter[i];
337
//---------------------------------------------------
339
// postfader metering
340
//---------------------------------------------------
343
double _volume = volume();
345
vol[0] = _volume * (1.0 - _pan);
346
vol[1] = _volume * (1.0 + _pan);
348
if (srcChannels == dstChannels) {
350
for (int c = 0; c < dstChannels; ++c) {
351
float* sp = buffer[c];
352
float* dp = dstBuffer[c];
353
for (unsigned k = 0; k < nframes; ++k)
354
*dp++ += (*sp++ * vol[c]);
358
for (int c = 0; c < dstChannels; ++c) {
360
float* sp = buffer[c];
361
float* dp = dstBuffer[c];
362
for (unsigned k = 0; k < nframes; ++k) {
363
float val = *sp++ * vol[c];
365
double f = fabs(val);
369
_meter[c] = lrint(meter[c] * 32767.0);
370
if (_meter[c] > _peak[c])
371
_peak[c] = _meter[c];
375
else if (srcChannels == 1 && dstChannels == 2) {
377
for (int c = 0; c < dstChannels; ++c) {
378
float* dp = dstBuffer[c];
379
float* sp = buffer[0];
380
for (unsigned k = 0; k < nframes; ++k)
381
*dp++ += (*sp++ * vol[c]);
385
float* sp = buffer[0];
387
for (unsigned k = 0; k < nframes; ++k) {
389
double f = fabs(val) * _volume;
392
*(dstBuffer[0] + k) += val * vol[0];
393
*(dstBuffer[1] + k) += val * vol[1];
395
_meter[0] = lrint(meter[0] * 32767.0);
396
if (_meter[0] > _peak[0])
397
_peak[0] = _meter[0];
400
else if (srcChannels == 2 && dstChannels == 1) {
401
float* sp1 = buffer[0];
402
float* sp2 = buffer[1];
404
float* dp = dstBuffer[0];
405
for (unsigned k = 0; k < nframes; ++k)
406
*dp++ += (*sp1++ * vol[0] + *sp2++ * vol[1]);
409
float* dp = dstBuffer[0];
412
for (unsigned k = 0; k < nframes; ++k) {
413
float val1 = *sp1++ * vol[0];
414
float val2 = *sp2++ * vol[1];
415
double f1 = fabs(val1);
418
double f2 = fabs(val2);
421
*dp++ += (val1 + val2);
423
_meter[0] = lrint(meter[0] * 32767.0);
424
if (_meter[0] > _peak[0])
425
_peak[0] = _meter[0];
426
_meter[1] = lrint(meter[1] * 32767.0);
427
if (_meter[1] > _peak[1])
428
_peak[1] = _meter[1];
639
//Changed by T356. 12/12/09.
640
// Overhaul and streamline to eliminate multiple processing during one process loop.
641
// Was causing ticking sound with synths + multiple out routes because synths were being processed multiple times.
642
// Make better use of AudioTrack::outBuffers as a post-effect pre-volume cache system for multiple calls here during processing.
643
// Previously only WaveTrack used them. (Changed WaveTrack as well).
645
//Added by Tim. p3.3.16
647
printf("MusE: AudioTrack::addData name:%s processed:%d\n", name().latin1(), processed());
656
int srcChannels = channels();
658
// Special consideration for metronome: It is not part of the track list,
659
// and it has no in or out routes, yet multiple output tracks may call addData on it !
660
// We can't tell how many output tracks call it, so we can only assume there might be more than one.
661
//bool usedirectbuf = (outRoutes()->size() <= 1) || (type() == AUDIO_OUTPUT);
662
bool usedirectbuf = ((outRoutes()->size() <= 1) || (type() == AUDIO_OUTPUT)) && (this != metronome);
666
float* buffer[srcChannels];
667
//float data[nframes * srcChannels];
668
//for (i = 0; i < srcChannels; ++i)
669
// buffer[i] = data + i * nframes;
671
// precalculate stereo volume
673
double _volume = volume();
675
vol[0] = _volume * (1.0 - _pan);
676
vol[1] = _volume * (1.0 + _pan);
677
float meter[srcChannels];
679
// Have we been here already during this process cycle?
682
// If there is only one (or no) output routes, it's an error - we've been called more than once per process cycle!
685
printf("MusE: AudioTrack::addData Error! One or no out routes, but already processed! Copying local buffers anyway...\n");
688
// Is there already some data gathered from a previous call during this process cycle?
691
// Point the input buffers at our local cached 'pre-volume' buffers. They need processing, so continue on after.
692
for(i = 0; i < srcChannels; ++i)
693
buffer[i] = outBuffers[i];
696
// No data was available from a previous call during this process cycle. Nothing to add, just return.
701
// First time here during this process cycle.
703
// Point the input buffers at a temporary stack buffer.
704
float data[nframes * srcChannels];
705
for(i = 0; i < srcChannels; ++i)
706
buffer[i] = data + i * nframes;
708
// getData can use the supplied buffers, or change buffer to point to its own local buffers or Jack buffers etc.
709
// For ex. if this is an audio input, Jack will set the pointers for us.
710
if(!getData(pos, srcChannels, nframes, buffer))
712
// No data was available. Nothing to add, but zero our local buffers and the meters.
713
for(i = 0; i < srcChannels; ++i)
715
// If we're using local buffers, we must zero them so that the next thing requiring them
716
// during this process cycle will see zeros.
720
if(config.useDenormalBias)
722
for(unsigned int q = 0; q < nframes; ++q)
723
outBuffers[i][q] = denormalBias;
726
memset(outBuffers[i], 0, sizeof(float) * nframes);
739
//---------------------------------------------------
740
// apply plugin chain
741
//---------------------------------------------------
743
_efxPipe->apply(srcChannels, nframes, buffer);
745
//---------------------------------------------------
747
//---------------------------------------------------
749
if(hasAuxSend() && !isMute())
751
AuxList* al = song->auxs();
752
unsigned naux = al->size();
753
for(unsigned k = 0; k < naux; ++k)
755
float m = _auxSend[k];
756
if(m <= 0.0001) // optimize
758
AudioAux* a = (AudioAux*)((*al)[k]);
759
float** dst = a->sendBuffer();
760
int auxChannels = a->channels();
761
if((srcChannels ==1 && auxChannels==1) || srcChannels==2)
763
for(int ch = 0; ch < srcChannels; ++ch)
765
float* db = dst[ch % a->channels()];
766
float* sb = buffer[ch];
767
for(unsigned f = 0; f < nframes; ++f)
768
*db++ += (*sb++ * m * vol[ch]); // add to mix
771
else if(srcChannels == 1 && auxChannels == 2)
773
for(int ch = 0; ch < auxChannels; ++ch)
775
float* db = dst[ch % a->channels()];
776
float* sb = buffer[0];
777
for(unsigned f = 0; f < nframes; ++f)
778
*db++ += (*sb++ * m * vol[ch]); // add to mix
784
//---------------------------------------------------
786
//---------------------------------------------------
790
for(i = 0; i < srcChannels; ++i)
792
float* p = buffer[i];
794
for(unsigned k = 0; k < nframes; ++k)
801
//_meter[i] = lrint(meter[i] * 32767.0);
802
_meter[i] = meter[i];
803
if(_meter[i] > _peak[i])
804
_peak[i] = _meter[i];
810
// If we're using local buffers, we must zero them.
814
for(i = 0; i < srcChannels; ++i)
816
if(config.useDenormalBias)
818
for(unsigned int q = 0; q < nframes; ++q)
819
outBuffers[i][q] = denormalBias;
822
memset(outBuffers[i], 0, sizeof(float) * nframes);
832
// If we're using local cached 'pre-volume' buffers, copy the input buffers (as they are right now: post-effect pre-volume) back to them.
835
for(i = 0; i < srcChannels; ++i)
836
AL::dsp->cpy(outBuffers[i], buffer[i], nframes);
839
// We have some data! Set to true.
843
//---------------------------------------------------
845
// postfader metering
846
//---------------------------------------------------
848
if(srcChannels == dstChannels)
852
for(int c = 0; c < dstChannels; ++c)
854
float* sp = buffer[c];
855
float* dp = dstBuffer[c];
856
for(unsigned k = 0; k < nframes; ++k)
857
*dp++ += (*sp++ * vol[c]);
862
for(int c = 0; c < dstChannels; ++c)
865
float* sp = buffer[c];
866
float* dp = dstBuffer[c];
867
for(unsigned k = 0; k < nframes; ++k)
869
float val = *sp++ * vol[c];
871
double f = fabs(val);
875
//_meter[c] = lrint(meter[c] * 32767.0);
876
_meter[c] = meter[c];
877
if(_meter[c] > _peak[c])
878
_peak[c] = _meter[c];
882
else if(srcChannels == 1 && dstChannels == 2)
886
for(int c = 0; c < dstChannels; ++c)
888
float* dp = dstBuffer[c];
889
float* sp = buffer[0];
890
for(unsigned k = 0; k < nframes; ++k)
891
*dp++ += (*sp++ * vol[c]);
896
float* sp = buffer[0];
898
for(unsigned k = 0; k < nframes; ++k)
901
double f = fabs(val) * _volume;
904
*(dstBuffer[0] + k) += val * vol[0];
905
*(dstBuffer[1] + k) += val * vol[1];
907
//_meter[0] = lrint(meter[0] * 32767.0);
908
_meter[0] = meter[0];
909
if(_meter[0] > _peak[0])
910
_peak[0] = _meter[0];
913
else if(srcChannels == 2 && dstChannels == 1)
915
float* sp1 = buffer[0];
916
float* sp2 = buffer[1];
919
float* dp = dstBuffer[0];
920
for(unsigned k = 0; k < nframes; ++k)
921
*dp++ += (*sp1++ * vol[0] + *sp2++ * vol[1]);
925
float* dp = dstBuffer[0];
928
for(unsigned k = 0; k < nframes; ++k)
930
float val1 = *sp1++ * vol[0];
931
float val2 = *sp2++ * vol[1];
932
double f1 = fabs(val1);
935
double f2 = fabs(val2);
938
*dp++ += (val1 + val2);
940
//_meter[0] = lrint(meter[0] * 32767.0);
941
_meter[0] = meter[0];
942
if(_meter[0] > _peak[0])
943
_peak[0] = _meter[0];
944
//_meter[1] = lrint(meter[1] * 32767.0);
945
_meter[1] = meter[1];
946
if(_meter[1] > _peak[1])
947
_peak[1] = _meter[1];
433
954
//---------------------------------------------------------