#include "Track.h"

Track::Track(int samplerate, const char *path) : AdvancedAudioPlayer(samplerate, 0) {
  leftVolume = rightVolume = 1.0f;
  open(path);
}

bool Track::processStereo(float *buffer, bool mix, unsigned int numberOfFrames, bool right) {
  return AdvancedAudioPlayer::processStereo(
    buffer, mix, numberOfFrames, right ? rightVolume : leftVolume
  );
}

void Track::setVolume(float left, float right) {
  leftVolume = left;
  rightVolume = right;
}
