src/ofxAubioBlock.*: add toSend / received()
authorPaul Brossier <piem@piem.org>
Sun, 25 Oct 2015 00:34:41 +0000 (02:34 +0200)
committerPaul Brossier <piem@piem.org>
Sun, 25 Oct 2015 00:34:41 +0000 (02:34 +0200)
src/ofxAubioBlock.cpp
src/ofxAubioBlock.h

index 8679e99..adcc3a6 100644 (file)
@@ -54,3 +54,12 @@ void ofxAubioBlock::audioIn(float * input, int bufferSize, int nChannels)
         }
     }
 }
+
+bool ofxAubioBlock::received()
+{
+    if (toSend) {
+        toSend = false;
+        return true;
+    }
+    return false;
+}
index 2d21ebd..7e13c82 100644 (file)
@@ -34,6 +34,9 @@ class ofxAubioBlock {
         void cleanup();
         virtual void blockAudioIn() {};
 
+        bool toSend = false;
+
     public:
         void audioIn(float *input, int bufferSize, int nChannels);
+        bool received();
 };