@@ -46,14 +46,17 @@ String BinaryRecording::getEngineID() const
4646
4747String BinaryRecording::getProcessorString (const InfoObjectCommon* channelInfo)
4848{
49- String fName = (channelInfo->getCurrentNodeName ().replaceCharacter (' ' , ' _' ) + " -" + String (channelInfo->getCurrentNodeID ()));
50- if (channelInfo->getCurrentNodeID () == channelInfo->getSourceNodeID ()) // it is the channel source
49+ String fName = (channelInfo->getCurrentNodeName ().replaceCharacter (' ' , ' _' ) + " -" +
50+ String (channelInfo->getCurrentNodeID ()));
51+ if (channelInfo->getCurrentNodeID () == channelInfo->getSourceNodeID ())
52+ // found the channel source
5153 {
5254 fName += " ." + String (channelInfo->getSubProcessorIdx ());
5355 }
5456 else
5557 {
56- fName += " _" + String (channelInfo->getSourceNodeID ()) + " ." + String (channelInfo->getSubProcessorIdx ());
58+ fName += " _" + String (channelInfo->getSourceNodeID ()) + " ." +
59+ String (channelInfo->getSubProcessorIdx ());
5760 }
5861 fName += File::separatorString;
5962 return fName ;
@@ -469,9 +472,11 @@ void BinaryRecording::resetChannels()
469472 m_startTS.clear ();
470473}
471474
472- void BinaryRecording::writeData (int writeChannel, int realChannel, const float * buffer, int size)
475+ void BinaryRecording::writeData (int writeChannel, int realChannel, const float * buffer,
476+ int size)
473477{
474- if (size > m_bufferSize) // Shouldn't happen, and if it happens it'll be slow, but better this than crashing. Will be reset on file close and reset.
478+ if (size > m_bufferSize)
479+ // shouldn't happen, and if it does it'll be slow, but better this than crashing
475480 {
476481 std::cerr << " Write buffer overrun, resizing to" << size << std::endl;
477482 m_bufferSize = size;
@@ -480,10 +485,14 @@ void BinaryRecording::writeData(int writeChannel, int realChannel, const float*
480485 m_tsBuffer.malloc (size);
481486 }
482487 double multFactor = 1 / (float (0x7fff ) * getDataChannel (realChannel)->getBitVolts ());
483- FloatVectorOperations::copyWithMultiply (m_scaledBuffer.getData (), buffer, multFactor, size);
484- AudioDataConverters::convertFloatToInt16LE (m_scaledBuffer.getData (), m_intBuffer.getData (), size);
488+ FloatVectorOperations::copyWithMultiply (m_scaledBuffer.getData (), buffer, multFactor,
489+ size);
490+ AudioDataConverters::convertFloatToInt16LE (m_scaledBuffer.getData (), m_intBuffer.getData (),
491+ size);
485492 int fileIndex = m_fileIndexes[writeChannel];
486- m_DataFiles[fileIndex]->writeChannel (getTimestamp (writeChannel) - m_startTS[writeChannel], m_channelIndexes[writeChannel], m_intBuffer.getData (), size);
493+ m_DataFiles[fileIndex]->writeChannel (getTimestamp (writeChannel) - m_startTS[writeChannel],
494+ m_channelIndexes[writeChannel],
495+ m_intBuffer.getData (), size);
487496
488497 if (m_channelIndexes[writeChannel] == 0 )
489498 {
@@ -543,7 +552,8 @@ void BinaryRecording::writeEvent(int eventIndex, const MidiMessage& event)
543552 increaseEventCounts (rec);
544553}
545554
546- void BinaryRecording::writeTimestampSyncText (uint16 sourceID, uint16 sourceIdx, int64 timestamp, float , String text)
555+ void BinaryRecording::writeTimestampSyncText (uint16 sourceID, uint16 sourceIdx,
556+ int64 timestamp, float , String text)
547557{
548558 if (!m_syncTextFile)
549559 return ;
@@ -596,11 +606,11 @@ void BinaryRecording::increaseEventCounts(EventRecording* rec)
596606
597607RecordEngineManager* BinaryRecording::getEngineManager ()
598608{
599- RecordEngineManager* man = new RecordEngineManager (" RAWBINARY" , " Binary" , &(engineFactory<BinaryRecording>));
609+ RecordEngineManager* man = new RecordEngineManager (" BUSSELABRAWBINARY" , " Binary" ,
610+ &(engineFactory<BinaryRecording>));
600611 EngineParameter* param;
601612 param = new EngineParameter (EngineParameter::BOOL, 0 , " Record TTL full words" , true );
602613 man->addParameter (param);
603-
604614 return man;
605615}
606616
0 commit comments