summaryrefslogtreecommitdiff
path: root/muse2/muse/plugin.cpp
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2011-02-09 22:37:27 +0000
committerTim E. Real <termtech@rogers.com>2011-02-09 22:37:27 +0000
commitd7f4820023196bfc7d40ef5fa134bc46a6e55849 (patch)
treefa00ee04c060c2ece1122f9d3fee382b0d5f043c /muse2/muse/plugin.cpp
parente11f572d97bb761d848fad41991d0ed747bad111 (diff)
Mini MIDI overhaul. Please see ChangeLog.
Diffstat (limited to 'muse2/muse/plugin.cpp')
-rw-r--r--muse2/muse/plugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/muse2/muse/plugin.cpp b/muse2/muse/plugin.cpp
index 5bacf092..179708ea 100644
--- a/muse2/muse/plugin.cpp
+++ b/muse2/muse/plugin.cpp
@@ -2454,6 +2454,10 @@ int PluginI::oscControl(unsigned long port, float value)
OscControlValue cv;
//cv.idx = cport;
cv.value = value;
+ // Time-stamp the event. Looks like no choice but to use the (possibly slow) call to gettimeofday via timestamp(),
+ // because these are asynchronous events arriving from OSC. timestamp() is more or less an estimate of the
+ // current frame. (This is exactly how ALSA events are treated when they arrive in our ALSA driver.) p4.0.15 Tim.
+ cv.frame = audio->timestamp();
if(cfifo->put(cv))
{
fprintf(stderr, "PluginI::oscControl: fifo overflow: in control number:%ld\n", cport);