package com.example.j9.triqshot;

import android.content.Context;
import android.media.MediaPlayer;

public class AudioManager extends Thread {
//Management Variables
private boolean running;
long waitTime = 1000;

//Audio Clip
public MediaPlayer BGMusic;

//App Audio Management Reference
private Context context;

//AudioManager Constructor
public AudioManager(Context context, int Song) {
   this.context = context;
   BGMusic = MediaPlayer.create(context, Song);
   BGMusic.start();
   BGMusic.setLooping(true);
  }

@Override
public void run() {
   //MusicLoop
  }//DEFAULT METHOD

//Set running
public void setRunning(boolean isRunning) {
   running = isRunning;
  }

//Play new song
public void setSong(int Song){
   BGMusic.stop();
   BGMusic = MediaPlayer.create(context, Song);
   BGMusic.start();
   BGMusic.setLooping(true);
  }

//Pause Audio
public void pauseSong(){
   BGMusic.pause();
  }

//Resume Audio
public void resumeSong(){
   BGMusic.start();
  }

}