@@ -448,7 +448,7 @@ float RecordNode::getFreeSpace() const
448448
449449void RecordNode::handleEvent (const EventChannel* eventInfo, const MidiMessage& event, int samplePosition)
450450{
451- if (isRecording )
451+ if (true )
452452 {
453453
454454 if ((*(event.getRawData ()+0 ) & 0x80 ) == 0 ) // saving flag > 0 (i.e., event has not already been processed)
@@ -476,8 +476,6 @@ void RecordNode::process(AudioSampleBuffer& buffer)
476476 // FIRST: cycle through events -- extract the TTLs and the timestamps
477477 checkForEvents ();
478478
479- bool noEmptyBuffers = true ;
480-
481479 if (isRecording)
482480 {
483481 // SECOND: write channel data
@@ -486,33 +484,20 @@ void RecordNode::process(AudioSampleBuffer& buffer)
486484 {
487485 int realChan = channelMap[chan];
488486 int nSamples = getNumSamples (realChan);
489-
490- if (nSamples == 0 )
491- noEmptyBuffers = false ;
487+ int timestamp = getTimestamp (realChan);
488+ m_dataQueue->writeChannel (buffer, chan, realChan, nSamples, timestamp);
492489 }
493490
494- if (noEmptyBuffers || setFirstBlock)
491+ // std::cout << nSamples << " " << samplesWritten << " " << blockIndex << std::endl;
492+ if (!setFirstBlock)
495493 {
496- for (int chan = 0 ; chan < recordChans; ++chan)
497- {
498- int realChan = channelMap[chan];
499- int nSamples = getNumSamples (realChan);
500- int timestamp = getTimestamp (realChan);
501- m_dataQueue->writeChannel (buffer, chan, realChan, nSamples, timestamp);
502- }
503- if (!setFirstBlock)
504- {
505-
506- m_recordThread->setFirstBlockFlag (true );
507- setFirstBlock = true ;
508- }
494+ m_recordThread->setFirstBlockFlag (true );
495+ setFirstBlock = true ;
509496 }
510-
511- // std::cout << nSamples << " " << samplesWritten << " " << blockIndex << std::endl;
512-
513497
514498 }
515499
500+
516501}
517502
518503void RecordNode::registerProcessor (const GenericProcessor* sourceNode)
0 commit comments