mac_midi.h

Go to the documentation of this file.
00001 /*
00002  *  mac_midi.h - QuickTime based midi player for MacOS.
00003  *
00004  *  Copyright (C) 2001  Max Horn
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00019  */
00020 
00021 #ifndef _MIDI_driver_macos_midi_h_
00022 #define _MIDI_driver_macos_midi_h_
00023 
00024 #if defined(MACOS) || defined(MACOSX)
00025 
00026 #ifdef MACOS
00027 #include <QuickTimeMusic.h>
00028 #else
00029 // Work around a conflict between exult's Palette class
00030 // and the Carbon headers
00031 typedef struct ComponentInstanceRecord *       TunePlayer;
00032 #endif
00033 
00034 #include "Midi.h"
00035 #include "exceptions.h"
00036 
00037 
00038 class Mac_QT_midi : virtual public MidiAbstract
00039 {
00040 public:
00041   // Do we accept events, YES!
00042   virtual bool  accepts_events(void) { return true; }
00043 
00044   // Event based methods
00045   virtual void  start_track(XMIDIEventList *, bool repeat);
00046   virtual void  stop_track(void);
00047   virtual bool  is_playing(void);
00048   virtual const char *copyright(void);
00049 
00050   Mac_QT_midi();
00051   virtual ~Mac_QT_midi();
00052 
00053 private:
00054   UNREPLICATABLE_CLASS(Mac_QT_midi);
00055   
00056   TunePlayer  mTunePlayer;
00057   uint32    *mTuneSequence;
00058   uint32    *mTuneHeader;
00059 };
00060 
00061 #endif
00062 
00063 #endif

Generated on Mon Jul 9 14:42:41 2007 for ExultEngine by  doxygen 1.5.1