@@ -105,6 +105,7 @@ void AudioGate::setupObjectContent(shared_ptr<ofAppGLFWWindow> &mainWindow){
105105
106106// --------------------------------------------------------------
107107void AudioGate::updateObjectContent (map<int ,shared_ptr<PatchObject>> &patchObjects){
108+ unusedArgs (patchObjects);
108109
109110 if (this ->inletsConnected [0 ]){
110111 if (static_cast <int >(floor (*(float *)&_inletParams[0 ])) != openInlet){
@@ -140,6 +141,8 @@ void AudioGate::updateObjectContent(map<int,shared_ptr<PatchObject>> &patchObjec
140141
141142// --------------------------------------------------------------
142143void AudioGate::drawObjectContent (ofTrueTypeFont *font, shared_ptr<ofBaseGLRenderer>& glRenderer){
144+ unusedArgs (font,glRenderer);
145+
143146 ofSetColor (255 );
144147
145148}
@@ -224,15 +227,21 @@ void AudioGate::drawObjectNodeConfig(){
224227
225228// --------------------------------------------------------------
226229void AudioGate::removeObjectContent (bool removeFileFromData){
227-
230+ unusedArgs (removeFileFromData);
228231}
229232
230233// --------------------------------------------------------------
231234void AudioGate::audioOutObject (ofSoundBuffer &outputBuffer){
235+ unusedArgs (outputBuffer);
236+
232237 if (openInlet >= 1 && openInlet < this ->numInlets ){
233- *static_cast <ofSoundBuffer *>(_outletParams[0 ]) = *static_cast <ofSoundBuffer *>(_inletParams[openInlet]);
238+ if (this ->inletsConnected [openInlet]){
239+ *static_cast <ofSoundBuffer *>(_outletParams[0 ]) = *static_cast <ofSoundBuffer *>(_inletParams[openInlet]);
240+ }else {
241+ static_cast <ofSoundBuffer *>(_outletParams[0 ])->set (0 .0f );
242+ }
234243 }else if (openInlet == 0 ){
235- * static_cast <ofSoundBuffer *>(_outletParams[0 ]) *= 0 .0f ;
244+ static_cast <ofSoundBuffer *>(_outletParams[0 ])-> set ( 0 .0f ) ;
236245 }
237246}
238247
@@ -262,7 +271,7 @@ void AudioGate::resetInletsSettings(){
262271 _inletParams[0 ] = new float (); // open
263272 *(float *)&_inletParams[0 ] = 0 .0f ;
264273
265- for (size_t i=1 ;i<this ->numInlets ;i++){
274+ for (int i=1 ;i<this ->numInlets ;i++){
266275 _inletParams[i] = new ofSoundBuffer ();
267276 static_cast <ofSoundBuffer *>(_inletParams[i])->set (0 .0f );
268277 }
@@ -274,7 +283,7 @@ void AudioGate::resetInletsSettings(){
274283
275284 this ->addInlet (VP_LINK_NUMERIC," open" );
276285
277- for (size_t i=1 ;i<this ->numInlets ;i++){
286+ for (int i=1 ;i<this ->numInlets ;i++){
278287 this ->addInlet (VP_LINK_AUDIO," s" +ofToString (i));
279288 }
280289
0 commit comments