AEEnvlp.c++ 1.63 KB
/*****************************************************************************
 *  File:  AEEnvlp.c++ 
 *
 *  AEEnvlp Class Implementations
 *
 ****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

#include "Assets.h"
#include "Mgrs.h"

/*****************************************************************************
 *
 *   Initialization Routines
 * 
 ****************************************************************************/

AEEnvlp::AEEnvlp()
{
    classType = AL_ENVLP_CLASS;
    attackTime = 10000;  // pick some nice defaults
    attackLevel = 127;
    decayTime = 100000;
    decayLevel = 100;
    releaseTime = 20000;
    assert(theU64Dev->AllocHdwr(this,AL_ENVLP_CLASS) == 0);
}

AEEnvlp::~AEEnvlp()
{
    theU64Dev->DeallocHdwr(this);  
}

/*****************************************************************************
 *
 *    Asset's Methods
 *
 ****************************************************************************/

void AEEnvlp::SetAttackTime(int time)
{
    attackTime = time;
}

void AEEnvlp::SetAttackLevel(int level)
{
    attackLevel = level;
}

void AEEnvlp::SetDecayTime(int time)
{
    decayTime = time;
}

void AEEnvlp::SetDecayLevel(int level)
{
    decayLevel = level;
}

void AEEnvlp::SetReleaseTime(int time)
{
    releaseTime = time;
}

int AEEnvlp::GetAttackTime(void)
{
    return attackTime;
}

int AEEnvlp::GetAttackLevel(void)
{
    return attackLevel;
}

int AEEnvlp::GetDecayTime(void)
{
    return decayTime;
}

int AEEnvlp::GetDecayLevel(void)
{
    return decayLevel;
}

int AEEnvlp::GetReleaseTime(void)
{
    return releaseTime;
}