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

Method getProgramNames

plugins/vst_base/RemoteVstPlugin.cpp:1186–1218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1184
1185
1186void RemoteVstPlugin::getProgramNames()
1187{
1188 char presName[1024+256*30];
1189 char curProgName[30];
1190 if (isInitialized() == false) return;
1191 bool progNameIndexed = ( pluginDispatch( 29, 0, -1, curProgName ) == 1 );
1192
1193 if (m_plugin->numPrograms > 1) {
1194 if (progNameIndexed) {
1195 for (int i = 0; i< (m_plugin->numPrograms >= 256?256:m_plugin->numPrograms); i++)
1196 {
1197 pluginDispatch( 29, i, -1, curProgName );
1198 if (i == 0) sprintf( presName, "%s", curProgName );
1199 else sprintf( presName + strlen(presName), "|%s", curProgName );
1200 }
1201 }
1202 else
1203 {
1204 int currProgram = pluginDispatch( effGetProgram );
1205 for (int i = 0; i< (m_plugin->numPrograms >= 256?256:m_plugin->numPrograms); i++)
1206 {
1207 pluginDispatch( effSetProgram, 0, i );
1208 if (i == 0) sprintf( presName, "%s", programName() );
1209 else sprintf( presName + strlen(presName), "|%s", programName() );
1210 }
1211 pluginDispatch( effSetProgram, 0, currProgram );
1212 }
1213 } else sprintf( presName, "%s", programName() );
1214
1215 presName[sizeof(presName)-1] = 0;
1216
1217 sendMessage( message( IdVstProgramNames ).addString( presName ) );
1218}
1219
1220
1221

Callers

nothing calls this directly

Calls 2

addStringMethod · 0.80
messageFunction · 0.50

Tested by

no test coverage detected