| 1318 | |
| 1319 | |
| 1320 | bool RemotePluginClient::processMessage( const message & _m ) |
| 1321 | { |
| 1322 | message reply_message( _m.id ); |
| 1323 | bool reply = false; |
| 1324 | switch( _m.id ) |
| 1325 | { |
| 1326 | case IdUndefined: |
| 1327 | return false; |
| 1328 | |
| 1329 | case IdSampleRateInformation: |
| 1330 | m_sampleRate = _m.getInt(); |
| 1331 | updateSampleRate(); |
| 1332 | reply_message.id = IdInformationUpdated; |
| 1333 | reply = true; |
| 1334 | break; |
| 1335 | |
| 1336 | case IdBufferSizeInformation: |
| 1337 | // Should LMMS gain the ability to change buffer size |
| 1338 | // without a restart, it must wait for this message to |
| 1339 | // complete processing or else risk VST crashes |
| 1340 | m_bufferSize = _m.getInt(); |
| 1341 | updateBufferSize(); |
| 1342 | break; |
| 1343 | |
| 1344 | case IdQuit: |
| 1345 | return false; |
| 1346 | |
| 1347 | case IdMidiEvent: |
| 1348 | processMidiEvent( |
| 1349 | MidiEvent( static_cast<MidiEventTypes>( |
| 1350 | _m.getInt( 0 ) ), |
| 1351 | _m.getInt( 1 ), |
| 1352 | _m.getInt( 2 ), |
| 1353 | _m.getInt( 3 ) ), |
| 1354 | _m.getInt( 4 ) ); |
| 1355 | break; |
| 1356 | |
| 1357 | case IdStartProcessing: |
| 1358 | doProcessing(); |
| 1359 | reply_message.id = IdProcessingDone; |
| 1360 | reply = true; |
| 1361 | break; |
| 1362 | |
| 1363 | case IdChangeSharedMemoryKey: |
| 1364 | setShmKey( _m.getInt( 0 ), _m.getInt( 1 ) ); |
| 1365 | break; |
| 1366 | |
| 1367 | case IdInitDone: |
| 1368 | break; |
| 1369 | |
| 1370 | default: |
| 1371 | { |
| 1372 | char buf[64]; |
| 1373 | sprintf( buf, "undefined message: %d\n", (int) _m.id ); |
| 1374 | debugMessage( buf ); |
| 1375 | break; |
| 1376 | } |
| 1377 | } |
nothing calls this directly
no test coverage detected