comparison data/osc/OSCQueue.cpp @ 742:c10cb8782576 coreaudio_tests

Merge from branch "default"
author Chris Cannam
date Sun, 01 Jul 2012 11:53:00 +0100
parents 1424aa29ae95
children e802e550a1f2
comparison
equal deleted inserted replaced
666:4efa7429cd85 742:c10cb8782576
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 SVDEBUG << "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 SVDEBUG << "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 SVDEBUG << "OSCQueue::parseOSCPath: good path \"" << path << "\"" << endl;
223 << "\"" << std::endl;
224 223
225 return true; 224 return true;
226 } 225 }
227 226