/***************************************************************************
 * tabtimesplayer.h: implementation of TabTimesPlayer class
 *
 * This file is part of KTabEdit, a KDE tabulature editor
 *
 * copyright (C) 2003-2006 the KTabEdit development team <mrgwen@gmail.com>
 ***************************************************************************/

/***************************************************************************
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * See the file COPYING for more information.
 ***************************************************************************/

#ifndef TABTIMESPLAYER_H
#define TABTIMESPLAYER_H

#include <QThread>

#include <tse3/MidiScheduler.h>

class TabTrack;
class TabTime;

class TabTimesPlayer : public QThread
{
public:
	TabTimesPlayer(const TabTime* time, uint tempo);
	virtual ~TabTimesPlayer();
	
	void drum();
	void setScheduler(TSE3::MidiScheduler* midiScheduler);
	void setTrack(const TabTrack* currentTrack);
	
	void stopPlaying();
	
	virtual void run();
	
private:
	TabTime* mTabTime;
	TSE3::MidiScheduler* scheduler;
	const TabTrack* track;
	bool stop;
	uint channel;
	uint tempo;
};

#endif
