Exemplo n.º 1
0
void ADSREnv::setDecayRate( FLOAT time, INT16 voice )
{
    FLOAT rate = calcRate( time*0.089f );

	if( voice > -1 ) {
        decayRate_[voice] = rate;
    }
    else for( UINT16 i=0; i<numVoices_; i++ ) {	
        decayRate_[i] = rate;
	}
}
Exemplo n.º 2
0
Arquivo: lab03.c Projeto: 0lumide/cs
int main()

{
  // LOCAL DECLARATION

  int income; //the original income recieved from main
  float taxRate; //the taxrate recieved from main

  // EXECUTABLE STATEMENTS
  income = getIncome(); // calls the getIncome function
  taxRate = calcRate(income); //calls the calcRate function
  displayResults(income,taxRate);
  return(0);
}
Exemplo n.º 3
0
void ADSREnv::setAttackRate( FLOAT time, INT16 voice )
{
    FLOAT rate = calcRate( time*0.71f );

	if( voice > -1 ) {
        attackRate_[voice] = rate;
    }
    else for( UINT16 i=0; i<numVoices_; i++ ) {	
        attackRate_[i] = rate;

        if( target_[i] == 2 ) {
			delta_[i] = attackRate_[i];
		}
	}
}
Exemplo n.º 4
0
void ADSREnv::setReleaseRate( FLOAT time, INT16 voice )
{
    FLOAT rate = calcRate( time*0.106f );

	if( voice > -1 ) {
        releaseRate_[voice] = rate;
    }
	else for( UINT16 i=0; i<numVoices_; i++ ) {	
        releaseRate_[i] = rate;

		if( target_[i] == 0 ) {
			delta_[i] = releaseRate_[i];
		}
	}
}