Skip to content

Commit f6b6624

Browse files
committed
fixed gates inlet count error on init
1 parent 37a8616 commit f6b6624

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

src/objects/data/VectorGate.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
//--------------------------------------------------------------
3838
VectorGate::VectorGate() : PatchObject("vector gate"){
3939

40-
this->numInlets = 6;
40+
this->numInlets = 7;
4141
this->numOutlets = 1;
4242

4343
_inletParams[0] = new float(); // open
@@ -48,6 +48,7 @@ VectorGate::VectorGate() : PatchObject("vector gate"){
4848
_inletParams[3] = new vector<float>(); // vector3
4949
_inletParams[4] = new vector<float>(); // vector4
5050
_inletParams[5] = new vector<float>(); // vector5
51+
_inletParams[6] = new vector<float>(); // vector6
5152

5253
_outletParams[0] = new vector<float>(); // output
5354

@@ -216,7 +217,7 @@ void VectorGate::removeObjectContent(bool removeFileFromData){
216217
void VectorGate::initInlets(){
217218
dataInlets = this->getCustomVar("NUM_INLETS");
218219

219-
this->numInlets = dataInlets;
220+
this->numInlets = dataInlets+1;
220221

221222
resetInletsSettings();
222223
}
@@ -233,7 +234,7 @@ void VectorGate::resetInletsSettings(){
233234
}
234235
}
235236

236-
this->numInlets = dataInlets+1;
237+
//this->numInlets = dataInlets+1;
237238

238239
_inletParams[0] = new float(); // open
239240
*(float *)&_inletParams[0] = 0.0f;

src/objects/logic/Gate.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
//--------------------------------------------------------------
3838
Gate::Gate() : PatchObject("gate"){
3939

40-
this->numInlets = 6;
40+
this->numInlets = 7;
4141
this->numOutlets = 1;
4242

4343
_inletParams[0] = new float(); // open
@@ -48,11 +48,13 @@ Gate::Gate() : PatchObject("gate"){
4848
_inletParams[3] = new float(); // float3
4949
_inletParams[4] = new float(); // float4
5050
_inletParams[5] = new float(); // float5
51+
_inletParams[6] = new float(); // float5
5152
*(float *)&_inletParams[1] = 0.0f;
5253
*(float *)&_inletParams[2] = 0.0f;
5354
*(float *)&_inletParams[3] = 0.0f;
5455
*(float *)&_inletParams[4] = 0.0f;
5556
*(float *)&_inletParams[5] = 0.0f;
57+
*(float *)&_inletParams[6] = 0.0f;
5658

5759
_outletParams[0] = new float(); // output numeric
5860
*(float *)&_outletParams[0] = 0.0f;
@@ -222,7 +224,7 @@ void Gate::removeObjectContent(bool removeFileFromData){
222224
void Gate::initInlets(){
223225
floatInlets = this->getCustomVar("NUM_INLETS");
224226

225-
this->numInlets = floatInlets;
227+
this->numInlets = floatInlets+1;
226228

227229
resetInletsSettings();
228230
}
@@ -239,7 +241,7 @@ void Gate::resetInletsSettings(){
239241
}
240242
}
241243

242-
this->numInlets = floatInlets+1;
244+
//this->numInlets = floatInlets+1;
243245

244246
_inletParams[0] = new float(); // open
245247
*(float *)&_inletParams[0] = 0.0f;

src/objects/sound/AudioGate.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
//--------------------------------------------------------------
3838
AudioGate::AudioGate() : PatchObject("signal gate"){
3939

40-
this->numInlets = 6;
40+
this->numInlets = 7;
4141
this->numOutlets = 1;
4242

4343
_inletParams[0] = new float(); // open
@@ -48,6 +48,7 @@ AudioGate::AudioGate() : PatchObject("signal gate"){
4848
_inletParams[3] = new ofSoundBuffer(); // sig3
4949
_inletParams[4] = new ofSoundBuffer(); // sig4
5050
_inletParams[5] = new ofSoundBuffer(); // sig5
51+
_inletParams[6] = new ofSoundBuffer(); // sig6
5152

5253
_outletParams[0] = new ofSoundBuffer(); // audio output
5354

@@ -238,7 +239,7 @@ void AudioGate::audioOutObject(ofSoundBuffer &outputBuffer){
238239
void AudioGate::initInlets(){
239240
dataInlets = this->getCustomVar("NUM_INLETS");
240241

241-
this->numInlets = dataInlets;
242+
this->numInlets = dataInlets+1;
242243

243244
resetInletsSettings();
244245
}
@@ -255,7 +256,7 @@ void AudioGate::resetInletsSettings(){
255256
}
256257
}
257258

258-
this->numInlets = dataInlets+1;
259+
//this->numInlets = dataInlets+1;
259260

260261
_inletParams[0] = new float(); // open
261262
*(float *)&_inletParams[0] = 0.0f;

src/objects/video/VideoGate.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
//--------------------------------------------------------------
3838
VideoGate::VideoGate() : PatchObject("texture gate"){
3939

40-
this->numInlets = 6;
40+
this->numInlets = 7;
4141
this->numOutlets = 1;
4242

4343
_inletParams[0] = new float(); // open
@@ -48,6 +48,7 @@ VideoGate::VideoGate() : PatchObject("texture gate"){
4848
_inletParams[3] = new ofTexture(); // tex3
4949
_inletParams[4] = new ofTexture(); // tex4
5050
_inletParams[5] = new ofTexture(); // tex5
51+
_inletParams[6] = new ofTexture(); // tex6
5152

5253
_outletParams[0] = new ofTexture(); // texture output
5354

@@ -227,7 +228,7 @@ void VideoGate::removeObjectContent(bool removeFileFromData){
227228
void VideoGate::initInlets(){
228229
dataInlets = this->getCustomVar("NUM_INLETS");
229230

230-
this->numInlets = dataInlets;
231+
this->numInlets = dataInlets+1;
231232

232233
resetInletsSettings();
233234
}
@@ -244,7 +245,7 @@ void VideoGate::resetInletsSettings(){
244245
}
245246
}
246247

247-
this->numInlets = dataInlets+1;
248+
//this->numInlets = dataInlets+1;
248249

249250
_inletParams[0] = new float(); // open
250251
*(float *)&_inletParams[0] = 0.0f;

0 commit comments

Comments
 (0)