comparison data/midi/MIDIInput.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
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 std::cerr << "MIDIInput::callback(" << timestamp << ")" << std::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 std::cerr << "Waiting for something to be processed" << std::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