| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 | 
							- #pragma once
 
- #include <mutex>
 
- #include "Output.h"
 
- #include "BeatSequence.h"
 
- #include "CallbackClock.h"
 
- namespace midi {
 
- class BeatSequencePlayer
 
- {
 
- public:
 
-     typedef BeatSequence::BeatIndex BeatIndex;
 
-     typedef CallbackClock::bpm_type Bpm;
 
- private:
 
-     bool looping;
 
-     std::mutex looping_mutex;
 
-     BeatIndex nextBeat;
 
-     std::mutex nextBeat_mutex;
 
-     CallbackClock clock;
 
-     Output* output;
 
- public:
 
-     const BeatSequence* sequence;
 
-     BeatSequencePlayer();
 
-     BeatSequencePlayer(Output* output);
 
-     BeatSequencePlayer(Output* output, const BeatSequence* sequence);
 
-     Bpm getBpm();
 
-     void setBpm(Bpm bpm);
 
-     bool getLooping();
 
-     void setLooping(bool looping);
 
-     BeatIndex getNextBeat();
 
-     void setNextBeat(BeatIndex nextBeat);
 
-     void play();
 
-     void loop();
 
-     void start();
 
-     void stop();
 
-     bool isPlaying();
 
- protected:
 
-     virtual void beforeBeat(BeatIndex beat);
 
-     virtual void afterBeat(BeatIndex beat);
 
- private:
 
-     static void beat(void* data);
 
- };
 
- } // namespace
 
 
  |