History

Merge pull request #1336 from birarda/master

some NodeList cleanup

ZappoMan committed 12 years ago

Commit ba83fa42 parents 349b7b4 992a4189 files · +928 −967Browse files

Showing the changes to interface/src/Application.cpp (1 of 9 files). Show all

Unified · Split

interface/src/Application.cpp+10−9
@@ -150,7 +150,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 149 unmodified lines
150 listenPort = atoi(portStr);150 listenPort = atoi(portStr);
151 }151 }
152 152
153 NodeList::createInstance(NODE_TYPE_AGENT, listenPort);153 NodeList* nodeList = NodeList::createInstance(NODE_TYPE_AGENT, listenPort);
154 154
155 // put the audio processing on a separate thread155 // put the audio processing on a separate thread
156 QThread* audioThread = new QThread(this);156 QThread* audioThread = new QThread(this);
@@ -160,10 +160,10 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 3 unmodified lines
160 160
161 audioThread->start();161 audioThread->start();
162 162
163 NodeList::getInstance()->addHook(&_voxels);163 nodeList->addHook(&_voxels);
164 NodeList::getInstance()->addHook(this);164 nodeList->addHook(this);
165 NodeList::getInstance()->addDomainListener(this);165 nodeList->addDomainListener(this);
166 NodeList::getInstance()->addDomainListener(&_voxels);166 nodeList->addDomainListener(&_voxels);
167 167
168 // network receive thread and voxel parsing thread are both controlled by the --nonblocking command line168 // network receive thread and voxel parsing thread are both controlled by the --nonblocking command line
169 _enableProcessVoxelsThread = _enableNetworkThread = !cmdOptionExists(argc, constArgv, "--nonblocking");169 _enableProcessVoxelsThread = _enableNetworkThread = !cmdOptionExists(argc, constArgv, "--nonblocking");
@@ -196,7 +196,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 26 unmodified lines
196 _voxelsFilename = getCmdOption(argc, constArgv, "-i");196 _voxelsFilename = getCmdOption(argc, constArgv, "-i");
197 197
198 // the callback for our instance of NodeList is attachNewHeadToNode198 // the callback for our instance of NodeList is attachNewHeadToNode
199 NodeList::getInstance()->linkedDataCreateCallback = &attachNewHeadToNode;199 nodeList->linkedDataCreateCallback = &attachNewHeadToNode;
200 200
201 #ifdef _WIN32201 #ifdef _WIN32
202 WSADATA WsaData;202 WSADATA WsaData;
@@ -205,10 +205,11 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 2 unmodified lines
205 205
206 // tell the NodeList instance who to tell the domain server we care about206 // tell the NodeList instance who to tell the domain server we care about
207 const char nodeTypesOfInterest[] = {NODE_TYPE_AUDIO_MIXER, NODE_TYPE_AVATAR_MIXER, NODE_TYPE_VOXEL_SERVER};207 const char nodeTypesOfInterest[] = {NODE_TYPE_AUDIO_MIXER, NODE_TYPE_AVATAR_MIXER, NODE_TYPE_VOXEL_SERVER};
208 NodeList::getInstance()->setNodeTypesOfInterest(nodeTypesOfInterest, sizeof(nodeTypesOfInterest));208 nodeList->setNodeTypesOfInterest(nodeTypesOfInterest, sizeof(nodeTypesOfInterest));
209 209
210 // start the nodeList threads210 QTimer* silentNodeTimer = new QTimer(this);
211 NodeList::getInstance()->startSilentNodeRemovalThread();211 connect(silentNodeTimer, SIGNAL(timeout()), nodeList, SLOT(removeSilentNodes()));
212 silentNodeTimer->start(NODE_SILENCE_THRESHOLD_USECS / 1000);
212 213
213 _networkAccessManager = new QNetworkAccessManager(this);214 _networkAccessManager = new QNetworkAccessManager(this);
214 QNetworkDiskCache* cache = new QNetworkDiskCache(_networkAccessManager);215 QNetworkDiskCache* cache = new QNetworkDiskCache(_networkAccessManager);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t