MCPcopy Create free account
hub / github.com/LMMS/lmms / processMessage

Method processMessage

src/core/RemotePlugin.cpp:477–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

475
476
477bool RemotePlugin::processMessage( const message & _m )
478{
479 lock();
480 message reply_message( _m.id );
481 bool reply = false;
482 switch( _m.id )
483 {
484 case IdUndefined:
485 unlock();
486 return false;
487
488 case IdInitDone:
489 reply = true;
490 break;
491
492 case IdSampleRateInformation:
493 reply = true;
494 reply_message.addInt( Engine::mixer()->processingSampleRate() );
495 break;
496
497 case IdBufferSizeInformation:
498 reply = true;
499 reply_message.addInt( Engine::mixer()->framesPerPeriod() );
500 break;
501
502 case IdChangeInputCount:
503 m_inputCount = _m.getInt( 0 );
504 resizeSharedProcessingMemory();
505 break;
506
507 case IdChangeOutputCount:
508 m_outputCount = _m.getInt( 0 );
509 resizeSharedProcessingMemory();
510 break;
511
512 case IdChangeInputOutputCount:
513 m_inputCount = _m.getInt( 0 );
514 m_outputCount = _m.getInt( 1 );
515 resizeSharedProcessingMemory();
516 break;
517
518 case IdDebugMessage:
519 fprintf( stderr, "RemotePlugin::DebugMessage: %s",
520 _m.getString( 0 ).c_str() );
521 break;
522
523 case IdProcessingDone:
524 case IdQuit:
525 default:
526 break;
527 }
528 if( reply )
529 {
530 sendMessage( reply_message );
531 }
532 unlock();
533
534 return true;

Callers

nothing calls this directly

Calls 6

mixerFunction · 0.85
processingSampleRateMethod · 0.80
getIntMethod · 0.80
getStringMethod · 0.80
lockFunction · 0.50
unlockFunction · 0.50

Tested by

no test coverage detected