MIDIWriter.hxx

Go to the documentation of this file.
00001 #ifndef __MIDIWRITER__
00002 #define __MIDIWRITER__
00003 
00004 #include <stdio.h>
00005 
00006 #define MThd 0x4d546864
00007 #define MTrk 0x4d54726b
00008 
00009 namespace MIDI
00010 {
00011         class Song;
00012         
00013         class Writer
00014         {
00015         public:
00016                 Writer(const char* filename);
00017                 ~Writer();
00018 
00019                 void Write(Song& s);
00020 
00021         private:
00022                 FILE* mFile;
00023                 long  mBytesWritten;
00024                 int   mTracks;
00025                 int   mFormat;
00026                 int   mDivision;
00027                 
00028                 void WriteHeader();
00029                 void WriteVarLen(register unsigned long value);
00030                 void Write32Bit(unsigned long data);
00031                 void Write16Bit(int data);
00032                 void WriteCh(char c);
00033         };
00034 }
00035 
00036 #endif
00037 
Generated by  doxygen 1.6.3