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

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

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

AELoop::AELoop()
{
    int   c;

    classType = AL_LOOP_CLASS;
    start = 0;
    end = 0;
    count = 0;
    
    for(c = 0; c < ADPCMFSIZE ; c++)
        state[c] = 0;
    
    assert(theU64Dev->AllocHdwr(this,AL_LOOP_CLASS) == 0);
}

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

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

void AELoop::SetStart(int s)
{
    start = s;
}

void AELoop::SetEnd(int e)
{
    end = e;
}

void AELoop::SetCount(int c)
{
    count = c;
}

void AELoop::SetState(short *st)
{
    int   c;

    for(c = 0; c < ADPCMFSIZE; c++)
        state[c] = st[c];
}

int AELoop::GetStart(void)
{
    return start;
}

int AELoop::GetEnd(void)
{
    return end;
}

int AELoop::GetCount(void)
{
    return count;
}

void AELoop::GetState(short *st)
{
    int     c;

    for(c = 0; c < ADPCMFSIZE; c++)
        st[c] = state[c];
}