|
@@ -2057,7 +2057,7 @@ cmRC_t cmXfaderExec( cmXfader* p, unsigned procSmpCnt, const bool* chGateV,
|
2057
|
2057
|
if( cp->gateFl )
|
2058
|
2058
|
{
|
2059
|
2059
|
cp->gain = cmMin(cp->gain + i_dgain,1.0);
|
2060
|
|
- cp->ep_gain = sqrt(0.5 + 0.5 * cos(3.14159*cp->gain));
|
|
2060
|
+ cp->ep_gain = sqrt(0.5 - 0.5 * cos(3.14159*cp->gain));
|
2061
|
2061
|
}
|
2062
|
2062
|
else
|
2063
|
2063
|
{
|
|
@@ -2133,6 +2133,22 @@ void cmXfaderAllOff( cmXfader* p )
|
2133
|
2133
|
p->chArray[i].gateFl = false;
|
2134
|
2134
|
}
|
2135
|
2135
|
|
|
2136
|
+void cmXfaderJumpToDestinationGain( cmXfader* p )
|
|
2137
|
+{
|
|
2138
|
+ unsigned i = 0;
|
|
2139
|
+ for(i=0; i<p->chCnt; ++i)
|
|
2140
|
+ {
|
|
2141
|
+ if( p->chArray[i].gateFl )
|
|
2142
|
+ p->chArray[i].gain = 1.0;
|
|
2143
|
+ else
|
|
2144
|
+ p->chArray[i].gain = 0.0;
|
|
2145
|
+
|
|
2146
|
+ p->chArray[i].onFl = false;
|
|
2147
|
+ p->chArray[i].offFl = false;
|
|
2148
|
+ p->chArray[i].ep_gain = p->chArray[i].gain;
|
|
2149
|
+ }
|
|
2150
|
+}
|
|
2151
|
+
|
2136
|
2152
|
//==========================================================================================================================================
|
2137
|
2153
|
cmFader* cmFaderAlloc( cmCtx*c, cmFader* p, cmReal_t srate, cmReal_t fadeTimeMs )
|
2138
|
2154
|
{
|