mirror of
https://github.com/thestk/stk
synced 2026-01-13 13:01:52 +00:00
Version 4.3.0
This commit is contained in:
committed by
Stephen Sinclair
parent
2cbce2d8bd
commit
27d9b79dc7
11
src/ADSR.cpp
11
src/ADSR.cpp
@@ -11,7 +11,7 @@
|
||||
envelope value reaches 0.0 in the
|
||||
ADSR::RELEASE state.
|
||||
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2005.
|
||||
by Perry R. Cook and Gary P. Scavone, 1995 - 2007.
|
||||
*/
|
||||
/***************************************************/
|
||||
|
||||
@@ -32,6 +32,15 @@ ADSR :: ~ADSR()
|
||||
{
|
||||
}
|
||||
|
||||
void ADSR :: sampleRateChanged( StkFloat newRate, StkFloat oldRate )
|
||||
{
|
||||
if ( !ignoreSampleRateChange_ ) {
|
||||
attackRate_ = oldRate * attackRate_ / newRate;
|
||||
decayRate_ = oldRate * decayRate_ / newRate;
|
||||
releaseRate_ = oldRate * releaseRate_ / newRate;
|
||||
}
|
||||
}
|
||||
|
||||
void ADSR :: keyOn()
|
||||
{
|
||||
target_ = 1.0;
|
||||
|
||||
Reference in New Issue
Block a user