MCPcopy Create free account
hub / github.com/apohl79/audiogridder / runServer

Method runServer

Server/Source/Server.cpp:1089–1350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1087}
1088
1089void Server::runServer() {
1090 traceScope();
1091
1092 getApp()->setSplashInfo("Loading plugins cache...");
1093
1094 if ((m_scanForPlugins || getOpt("ScanForPlugins", false)) && !getOpt("NoScanForPlugins", false)) {
1095 scanForPlugins();
1096 } else {
1097 loadKnownPluginList();
1098 m_pluginList.sort(KnownPluginList::sortAlphabetically, true);
1099 }
1100 saveConfig();
1101 saveKnownPluginList();
1102
1103 getApp()->setSplashInfo("Loading plugin layouts...");
1104 if (!parsePluginLayouts()) {
1105 return;
1106 }
1107
1108 if (m_crashReporting) {
1109 Sentry::initialize();
1110 }
1111
1112 for (auto& type : m_pluginList.getTypes()) {
1113 if ((type.pluginFormatName == "AudioUnit" && !m_enableAU) ||
1114 (type.pluginFormatName == "VST" && !m_enableVST2) || (type.pluginFormatName == "VST3" && !m_enableVST3)) {
1115 m_pluginList.removeType(type);
1116 }
1117 }
1118
1119 getApp()->hideSplashWindow(1000);
1120
1121#ifndef JUCE_WINDOWS
1122 setsockopt(m_masterSocket.getRawSocketHandle(), SOL_SOCKET, SO_NOSIGPIPE, nullptr, 0);
1123#endif
1124
1125 setNonBlocking(m_masterSocket.getRawSocketHandle());
1126
1127 ServiceResponder::initialize(m_port + getId(), getId(), m_name, m_uuid, getScreenLocalMode());
1128
1129 if (m_name.isEmpty()) {
1130 m_name = ServiceResponder::getHostName();
1131 saveConfig();
1132 }
1133
1134 logln("available plugins:");
1135 for (auto& desc : m_pluginList.getTypes()) {
1136 logln(" " << desc.name << " [" << Processor::createPluginID(desc) << ", "
1137 << Processor::createPluginIDDepricated(desc) << "]"
1138 << " version=" << desc.version << " format=" << desc.pluginFormatName
1139 << " ins=" << desc.numInputChannels << " outs=" << desc.numOutputChannels
1140 << " instrument=" << (int)desc.isInstrument);
1141 }
1142
1143 // some time could have passed by until we reach that point, lets check if the user decided to quit
1144 if (threadShouldExit()) {
1145 return;
1146 }

Callers

nothing calls this directly

Calls 15

setNonBlockingFunction · 0.85
getSocketPathFunction · 0.85
SandboxMessageClass · 0.85
setSplashInfoMethod · 0.80
hideSplashWindowMethod · 0.80
getHostNameMethod · 0.80
setNumChannelsMethod · 0.80
isInputRangeActiveMethod · 0.80
getActiveChannelsMethod · 0.80
isOutputRangeActiveMethod · 0.80
containsMethod · 0.80

Tested by

no test coverage detected