comparison data/midi/MIDIInput.cpp @ 690:1424aa29ae95

Seems to be a bad idea to use plain DEBUG symbol on OS/X (system wants it)
author Chris Cannam
date Tue, 14 Jun 2011 15:26:52 +0100
parents 06f13a3b9e9e
children e802e550a1f2
comparison
equal deleted inserted replaced
689:573d45e9487b 690:1424aa29ae95
48 } 48 }
49 49
50 void 50 void
51 MIDIInput::callback(double timestamp, std::vector<unsigned char> *message) 51 MIDIInput::callback(double timestamp, std::vector<unsigned char> *message)
52 { 52 {
53 DEBUG << "MIDIInput::callback(" << timestamp << ")" << endl; 53 SVDEBUG << "MIDIInput::callback(" << timestamp << ")" << endl;
54 // In my experience so far, the timings passed to this function 54 // In my experience so far, the timings passed to this function
55 // are not reliable enough to use. We request instead an audio 55 // are not reliable enough to use. We request instead an audio
56 // frame time from whatever FrameTimer we have been given, and use 56 // frame time from whatever FrameTimer we have been given, and use
57 // that as the event time. 57 // that as the event time.
58 if (!message || message->empty()) return; 58 if (!message || message->empty()) return;
82 if (count == max) { 82 if (count == max) {
83 std::cerr << "ERROR: MIDIInput::postEvent: MIDI event queue is full and not clearing -- abandoning incoming event" << std::endl; 83 std::cerr << "ERROR: MIDIInput::postEvent: MIDI event queue is full and not clearing -- abandoning incoming event" << std::endl;
84 return; 84 return;
85 } 85 }
86 std::cerr << "WARNING: MIDIInput::postEvent: MIDI event queue (capacity " << m_buffer.getSize() << " is full!" << std::endl; 86 std::cerr << "WARNING: MIDIInput::postEvent: MIDI event queue (capacity " << m_buffer.getSize() << " is full!" << std::endl;
87 DEBUG << "Waiting for something to be processed" << endl; 87 SVDEBUG << "Waiting for something to be processed" << endl;
88 #ifdef _WIN32 88 #ifdef _WIN32
89 Sleep(1); 89 Sleep(1);
90 #else 90 #else
91 sleep(1); 91 sleep(1);
92 #endif 92 #endif