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

Method sendMessage

include/RemotePlugin.h:1057–1085  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1055
1056
1057int RemotePluginBase::sendMessage( const message & _m )
1058{
1059#ifdef SYNC_WITH_SHM_FIFO
1060 m_out->lock();
1061 m_out->writeInt( _m.id );
1062 m_out->writeInt( _m.data.size() );
1063 int j = 8;
1064 for( unsigned int i = 0; i < _m.data.size(); ++i )
1065 {
1066 m_out->writeString( _m.data[i] );
1067 j += 4 + _m.data[i].size();
1068 }
1069 m_out->unlock();
1070 m_out->messageSent();
1071#else
1072 pthread_mutex_lock( &m_sendMutex );
1073 writeInt( _m.id );
1074 writeInt( _m.data.size() );
1075 int j = 8;
1076 for( unsigned int i = 0; i < _m.data.size(); ++i )
1077 {
1078 writeString( _m.data[i] );
1079 j += 4 + _m.data[i].size();
1080 }
1081 pthread_mutex_unlock( &m_sendMutex );
1082#endif
1083
1084 return j;
1085}
1086
1087
1088

Callers 6

hostCallbackMethod · 0.80
saveSettingsMethod · 0.80
loadSettingsMethod · 0.80
loadFileMethod · 0.80
updatePitchRangeMethod · 0.80
initPluginMethod · 0.80

Calls 8

writeIntFunction · 0.85
writeStringFunction · 0.85
writeIntMethod · 0.80
writeStringMethod · 0.80
messageSentMethod · 0.80
lockMethod · 0.45
sizeMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected