#include "AudioTransformation.h"
#include "SDL_mixer.h"

AudioTransformation::AudioTransformation ()
{
  clear ();
}

AudioTransformation::~AudioTransformation ()
{
}

uint8_t AudioTransformation::getTransformFlag ()
{
  return transformFlag;
}

void AudioTransformation::setTransformFlag (uint8_t flag)
{
  transformFlag = flag;
}

void AudioTransformation::operator=(const AudioTransformation &other) {
  transformFlag=other.transformFlag;
  leftPan=other.leftPan;
  rightPan=other.rightPan;
  loops=other.loops;
  fadeInTime=other.fadeInTime;
  fadeOutTime=other.fadeOutTime;
  volume=other.volume;
  starttime=other.starttime;
}

void AudioTransformation::clear()
{
  transformFlag = AUDIO_TRANSFORMATION_NONE;
  leftPan=255;
  rightPan=255;
  loops=0;
  fadeInTime=0;
  fadeOutTime=0;
  volume=MIX_MAX_VOLUME;
  starttime=0.0;
}

uint8_t AudioTransformation::getLeftPanning()
{
  return leftPan;
}

uint8_t AudioTransformation::getRightPanning()
{
  return rightPan;
}

void AudioTransformation::setPanning(uint8_t lef, uint8_t rig)
{
  leftPan=lef;
  rightPan=rig;
}


int AudioTransformation::getNumberOfLoops()
{
  return loops;
}

void AudioTransformation::setNumberOfLoops(int lps)
{
  loops=lps;
}


int AudioTransformation::getFadeInTime ()
{
  return fadeInTime;
}

void AudioTransformation::setFadeInTime (int tim)
{
  fadeInTime=tim;
}


int AudioTransformation::getFadeOutTime ()
{
  return fadeOutTime;
}

void AudioTransformation::setFadeOutTime (int tim)
{
  fadeOutTime=tim;
}

uint8_t AudioTransformation::getVolume()
{
  return volume;
}

void AudioTransformation::setVolume(uint8_t v)
{
  volume=v;
}

double AudioTransformation::getStartTime()
{
  return starttime;
}

void AudioTransformation::setStartTime(double tim)
{
  starttime=tim;
}
