Skip to content

Commit bd8ac24

Browse files
committed
Minor updates, final 0.4.0 support
1 parent 59b48f3 commit bd8ac24

File tree

6 files changed

+30
-7
lines changed

6 files changed

+30
-7
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
(Note the release folder is in the mdsHack.zip Windows Only at the moment)
44

55
# Updates
6+
- 21 Nov 17:
7+
-Fix a few minor issues.
8+
-Now that Rack 0.5.0 is out I will concentrate on updating my current plugins for that.
9+
-Updates for 0.4.0 plugins will now cease.
610
- 20 Nov 17:
711
- Added 6 x 32 step sequencer with 3 levels, independant clocks and swing.
812
- 18 Nov 17:

src/Compressor.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ struct Compressor : Module
5252
COMP_ON
5353
};
5454

55+
bool m_bInitialized = false;
5556
CLog lg;
5657

5758
LEDMeterWidget *m_pLEDMeterIn[ 2 ] = {0};
@@ -170,6 +171,8 @@ Compressor_Widget::Compressor_Widget()
170171

171172
//for( int i = 0; i < 15; i++ )
172173
//module->lg.f("level %d = %.3f\n", i, module->m_pLEDMeterThreshold->flevels[ i ] );
174+
175+
module->m_bInitialized = true;
173176
}
174177

175178
//-----------------------------------------------------
@@ -358,6 +361,9 @@ void Compressor::step()
358361
{
359362
float outL, outR, diffL, diffR, orgL, orgR;
360363

364+
if( !m_bInitialized )
365+
return;
366+
361367
outL = clampf( inputs[ IN_AUDIOL ].normalize( 0.0 ) / AUDIO_MAX, -1.0, 1.0 );
362368
outR = clampf( inputs[ IN_AUDIOR ].normalize( 0.0 ) / AUDIO_MAX, -1.0, 1.0 );
363369

@@ -412,5 +418,4 @@ void Compressor::step()
412418

413419
outputs[ OUT_AUDIOL ].value = clampf( outL * AUDIO_MAX, -AUDIO_MAX, AUDIO_MAX );
414420
outputs[ OUT_AUDIOR ].value = clampf( outR * AUDIO_MAX, -AUDIO_MAX, AUDIO_MAX );
415-
416421
}

src/Mixer_1x4_Stereo.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ struct Mix_1x4_Stereo : Module
7070
nOUTPUTS = OUT_AUXR + nAUX
7171
};
7272

73+
bool m_bInitialized = false;
7374
CLog lg;
7475

7576
// mute buttons
@@ -536,6 +537,7 @@ Mix_1x4_Stereo_Widget::Mix_1x4_Stereo_Widget()
536537
+ (fx5 * 0.0083333333333333333333333333333333)
537538
- (fx7 * 0.0001984126984126984126984126984127));
538539

540+
module->m_bInitialized = true;
539541
module->initialize();
540542
}
541543

@@ -940,6 +942,9 @@ void Mix_1x4_Stereo::step()
940942
float auxL[ nAUX ] = {}, auxR[ nAUX ] = {};
941943
bool bGroupActive[ GROUPS ] = {0};
942944

945+
if( !m_bInitialized )
946+
return;
947+
943948
memset( m_fSubMix, 0, sizeof(m_fSubMix) );
944949

945950
// channel mixers

src/Mixer_2x4_Stereo.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ struct Mix_2x4_Stereo : Module
7171
nOUTPUTS = OUT_AUXR + nAUX
7272
};
7373

74+
bool m_bInitialized = false;
7475
CLog lg;
7576

7677
// mute buttons
@@ -563,6 +564,7 @@ Mix_2x4_Stereo_Widget::Mix_2x4_Stereo_Widget()
563564
+ (fx5 * 0.0083333333333333333333333333333333)
564565
- (fx7 * 0.0001984126984126984126984126984127));
565566

567+
module->m_bInitialized = true;
566568
module->initialize();
567569
}
568570

@@ -1092,6 +1094,9 @@ void Mix_2x4_Stereo::step()
10921094
float auxL[ nAUX ] = {}, auxR[ nAUX ] = {};
10931095
bool bGroupActive[ GROUPS ] = {0};
10941096

1097+
if( !m_bInitialized )
1098+
return;
1099+
10951100
memset( m_fSubMix, 0, sizeof(m_fSubMix) );
10961101

10971102
// channel mixers

src/Mixer_4x4_Stereo.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ struct Mix_4x4_Stereo : Module
7171
nOUTPUTS = OUT_AUXR + nAUX
7272
};
7373

74+
bool m_bInitialized = false;
7475
CLog lg;
7576

7677
// mute buttons
@@ -566,6 +567,7 @@ Mix_4x4_Stereo_Widget::Mix_4x4_Stereo_Widget()
566567
+ (fx5 * 0.0083333333333333333333333333333333)
567568
- (fx7 * 0.0001984126984126984126984126984127));
568569

570+
module->m_bInitialized = true;
569571
module->initialize();
570572
}
571573

@@ -1095,6 +1097,9 @@ void Mix_4x4_Stereo::step()
10951097
float auxL[ nAUX ] = {}, auxR[ nAUX ] = {};
10961098
bool bGroupActive[ GROUPS ] = {0};
10971099

1100+
if( !m_bInitialized )
1101+
return;
1102+
10981103
memset( m_fSubMix, 0, sizeof(m_fSubMix) );
10991104

11001105
// channel mixers

src/mscHack_Controls.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ struct SinglePatternClocked32 : OpaqueWidget, FramebufferWidget
348348
m_pCallback( m_pClass, m_Id, i, m_PatSelLevel[ i ], m_MaxPat );
349349

350350
dirty = true;
351-
return NULL;
351+
return this;
352352
}
353353

354354
}
@@ -554,7 +554,7 @@ struct PatternSelectStrip : OpaqueWidget, FramebufferWidget
554554
m_pCallback( m_pClass, m_Id, m_PatSel, m_MaxPat );
555555

556556
dirty = true;
557-
return NULL;
557+
return this;
558558
}
559559

560560
else if( isPoint( &m_RectsPatSel[ i ], (int)pos.x, (int)pos.y ) )
@@ -565,7 +565,7 @@ struct PatternSelectStrip : OpaqueWidget, FramebufferWidget
565565
m_pCallback( m_pClass, m_Id, m_PatSel, m_MaxPat );
566566

567567
dirty = true;
568-
return NULL;
568+
return this;
569569
}
570570
}
571571

@@ -1026,7 +1026,7 @@ KEY_VECT_STRUCT OctaveKeyHighC [ 1 ]=
10261026
pNoteChangeCallback( m_pClass, m_nKb, i );
10271027
m_KeyOn = i;
10281028
dirty = true;
1029-
goto done;
1029+
return this;
10301030
}
10311031
}
10321032

@@ -1042,11 +1042,10 @@ KEY_VECT_STRUCT OctaveKeyHighC [ 1 ]=
10421042
pNoteChangeCallback( m_pClass, m_nKb, i );
10431043
m_KeyOn = i;
10441044
dirty = true;
1045-
break;
1045+
return this;
10461046
}
10471047
}
10481048

1049-
done:;
10501049
return NULL;
10511050
}
10521051

0 commit comments

Comments
 (0)