Mercurial > hg > svcore
comparison data/osc/OSCQueue.cpp @ 689:573d45e9487b
Merge from debug-output branch
author | Chris Cannam |
---|---|
date | Tue, 14 Jun 2011 14:47:59 +0100 |
parents | 06f13a3b9e9e |
children | 1424aa29ae95 |
comparison
equal
deleted
inserted
replaced
688:be43b2fe68e8 | 689:573d45e9487b |
---|---|
165 if (count == max) { | 165 if (count == max) { |
166 std::cerr << "ERROR: OSCQueue::postMessage: OSC message queue is full and not clearing -- abandoning incoming message" << std::endl; | 166 std::cerr << "ERROR: OSCQueue::postMessage: OSC message queue is full and not clearing -- abandoning incoming message" << std::endl; |
167 return; | 167 return; |
168 } | 168 } |
169 std::cerr << "WARNING: OSCQueue::postMessage: OSC message queue (capacity " << m_buffer.getSize() << " is full!" << std::endl; | 169 std::cerr << "WARNING: OSCQueue::postMessage: OSC message queue (capacity " << m_buffer.getSize() << " is full!" << std::endl; |
170 std::cerr << "Waiting for something to be processed" << std::endl; | 170 DEBUG << "Waiting for something to be processed" << endl; |
171 #ifdef _WIN32 | 171 #ifdef _WIN32 |
172 Sleep(1); | 172 Sleep(1); |
173 #else | 173 #else |
174 sleep(1); | 174 sleep(1); |
175 #endif | 175 #endif |
176 count++; | 176 count++; |
177 } | 177 } |
178 | 178 |
179 OSCMessage *mp = new OSCMessage(message); | 179 OSCMessage *mp = new OSCMessage(message); |
180 m_buffer.write(&mp, 1); | 180 m_buffer.write(&mp, 1); |
181 std::cerr << "OSCQueue::postMessage: Posted OSC message: target " | 181 DEBUG << "OSCQueue::postMessage: Posted OSC message: target " |
182 << message.getTarget() << ", target data " << message.getTargetData() | 182 << message.getTarget() << ", target data " << message.getTargetData() |
183 << ", method " << message.getMethod().toStdString() << std::endl; | 183 << ", method " << message.getMethod() << endl; |
184 emit messagesAvailable(); | 184 emit messagesAvailable(); |
185 } | 185 } |
186 | 186 |
187 bool | 187 bool |
188 OSCQueue::parseOSCPath(QString path, int &target, int &targetData, | 188 OSCQueue::parseOSCPath(QString path, int &target, int &targetData, |
211 | 211 |
212 method = path.section('/', i, -1); | 212 method = path.section('/', i, -1); |
213 | 213 |
214 if (method.contains('/')) { | 214 if (method.contains('/')) { |
215 std::cerr << "ERROR: OSCQueue::parseOSCPath: malformed path \"" | 215 std::cerr << "ERROR: OSCQueue::parseOSCPath: malformed path \"" |
216 << path.toStdString() << "\" (should be target/data/method or " | 216 << path << "\" (should be target/data/method or " |
217 << "target/method or method, where target and data " | 217 << "target/method or method, where target and data " |
218 << "are numeric)" << std::endl; | 218 << "are numeric)" << std::endl; |
219 return false; | 219 return false; |
220 } | 220 } |
221 | 221 |
222 std::cerr << "OSCQueue::parseOSCPath: good path \"" << path.toStdString() | 222 DEBUG << "OSCQueue::parseOSCPath: good path \"" << path << "\"" << endl; |
223 << "\"" << std::endl; | |
224 | 223 |
225 return true; | 224 return true; |
226 } | 225 } |
227 | 226 |