/ source / audiolib / src / driver_winmm.h
driver_winmm.h
 1  /*
 2   Copyright (C) 2009 Jonathon Fowler <jf@jonof.id.au>
 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  #include "osd.h"
22  #include "midifuncs.h"
23  #include "windows_inc.h"
24  
25  #define WINMM_NOTE_OFF         0x80
26  #define WINMM_NOTE_ON          0x90
27  #define WINMM_POLY_AFTER_TCH   0xA0
28  #define WINMM_CONTROL_CHANGE   0xB0
29  #define WINMM_PROGRAM_CHANGE   0xC0
30  #define WINMM_AFTER_TOUCH      0xD0
31  #define WINMM_PITCH_BEND       0xE0
32  
33  enum
34  {
35      WinMMErr_Error = -1,
36      WinMMErr_Ok    = 0,
37      WinMMErr_MIDIStreamOpen,
38      WinMMErr_MIDIStreamRestart,
39      WinMMErr_MIDICreateEvent,
40      WinMMErr_MIDIPlayThread,
41      WinMMErr_MIDICreateMutex
42  };
43  
44  extern UINT WinMM_DeviceID;
45  
46  int WinMMDrv_GetError(void);
47  const char *WinMMDrv_ErrorString( int ErrorNumber );
48  
49  int  WinMMDrv_MIDI_Init(midifuncs *);
50  void WinMMDrv_MIDI_Shutdown(void);
51  int  WinMMDrv_MIDI_StartPlayback(void);
52  void WinMMDrv_MIDI_HaltPlayback(void);
53  void WinMMDrv_MIDI_SetTempo(int tempo, int division);
54  void WinMMDrv_MIDI_Lock(void);
55  void WinMMDrv_MIDI_Unlock(void);
56  void WinMMDrv_MIDI_Service(void);
57  
58  void WinMMDrv_MIDI_PrintDevices(void);
59  int WinMMDrv_MIDI_GetNumDevices(void);
60  
61  int WinMMDrv_MIDI_PrintBufferInfo(osdcmdptr_t);