From dde1f0d2b102aafb09c3ee893911417c274afacb Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 25 Oct 2015 02:34:41 +0200 Subject: [PATCH] src/ofxAubioBlock.*: add toSend / received() --- src/ofxAubioBlock.cpp | 9 +++++++++ src/ofxAubioBlock.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/src/ofxAubioBlock.cpp b/src/ofxAubioBlock.cpp index 8679e99..adcc3a6 100644 --- a/src/ofxAubioBlock.cpp +++ b/src/ofxAubioBlock.cpp @@ -54,3 +54,12 @@ void ofxAubioBlock::audioIn(float * input, int bufferSize, int nChannels) } } } + +bool ofxAubioBlock::received() +{ + if (toSend) { + toSend = false; + return true; + } + return false; +} diff --git a/src/ofxAubioBlock.h b/src/ofxAubioBlock.h index 2d21ebd..7e13c82 100644 --- a/src/ofxAubioBlock.h +++ b/src/ofxAubioBlock.h @@ -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(); }; -- 2.11.0