midi.h
1 /* 2 Copyright (C) 1994-1995 Apogee Software, Ltd. 3 4 This program is free software; you can redistribute it and/or 5 modify it under the terms of the GNU General Public License 6 as published by the Free Software Foundation; either version 2 7 of the License, or (at your option) any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 13 See the GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 19 */ 20 /********************************************************************** 21 module: MIDI.H 22 23 author: James R. Dose 24 date: May 25, 1994 25 26 Public header for MIDI.C. Midi song file playback routines. 27 28 (c) Copyright 1994 James R. Dose. All Rights Reserved. 29 **********************************************************************/ 30 31 #ifndef __MIDI_H 32 #define __MIDI_H 33 34 #include "compat.h" 35 #include "midifuncs.h" 36 #include "music.h" 37 38 enum MIDI_Errors 39 { 40 MIDI_Warning = -2, 41 MIDI_Error = -1, 42 MIDI_Ok = 0, 43 MIDI_NullMidiModule, 44 MIDI_InvalidMidiFile, 45 MIDI_UnknownMidiFormat, 46 MIDI_NoTracks, 47 MIDI_InvalidTrack, 48 MIDI_NoMemory, 49 MIDI_DriverError 50 }; 51 52 53 #define MIDI_MaxVolume 255 54 55 int MIDI_AllNotesOff(void); 56 int MIDI_Reset(void); 57 int MIDI_SetVolume(int volume); 58 int MIDI_GetVolume(void); 59 void MIDI_SetMidiFuncs(midifuncs *funcs); 60 void MIDI_SetLoopFlag(int loopflag); 61 void MIDI_ContinueSong(void); 62 void MIDI_PauseSong(void); 63 void MIDI_StopSong(void); 64 int MIDI_PlaySong(char *song, int loopflag); 65 void MIDI_SetTempo(int tempo); 66 void MIDI_Restart(void); 67 void MIDI_ServiceRoutine(void); 68 void MIDI_SetSongPosition(int measure, int beat, int tick); 69 void MIDI_GetSongPosition(songposition *pos); 70 71 #endif