Source: midimountain/mcPlayback.h


Annotated List
Files
Globals
Hierarchy
Index
//=============================================================================
//  TMidiPlayback class definition
//=============================================================================
// Author  : Adrian Meyer
// Version : 0.2.0
// Log     :
//=============================================================================
// 05.03.2001 building class
//=============================================================================
// to do:
//=============================================================================

#ifndef __MCPLAYBACK__
#define __MCPLAYBACK__

#include <mcSequence.h>
#include <mcTrack.h>
#include <mcEvent.h>
#include <mcIO.h>

const long cMMPlaybackStart           = cMCPlayback << 16 | 0x0001;
const long cMMPlaybackStop            = cMCPlayback << 16 | 0x0002;

class TMidiPlayback: public TMidiBase
  {
    private:
      TMidiSequence* fSequence;                       // sequence to play
      TMidiIO* fIO;                                   // IO to use
      TMidiEvent** fEventList;                        // list with playable events
      sTempoList* fTempoList;                         // list with tempos to follow

      long fPlayTimerID;                              // id for playback timer
      long fGuiTimerID;                               // id for gui refresh timer

      long fPlayPosition;                             // position in playback
      long fEndPosition;                              // end position of playback
      double fPlayRest;                               // rest of tick from last timer

      void PlayEvent( TMidiEvent* aEvent );           // play midi event
      int i, fTrackCount;                             // counter

    public:
      TMidiPlayback( TMidiSequence* aSequence, TMidiIO* aIO ); // constructor
      ~TMidiPlayback( void );                         // destructor

      void PlayTimer( void );                         // playback timer
      void GuiTimer( void );                          // gui timer to update TMidiSequence position
      void Start( void );                             // start playback
      void Stop( void );                              // stop playback
  };

#endif

Generated by: root@castle on Fri Jul 20 00:33:17 2001, using kdoc 2.0a36.