drivers.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 19 */ 20 21 #ifndef DRIVERS_H 22 #define DRIVERS_H 23 24 #include "sndcards.h" 25 #include "midifuncs.h" 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 int SoundDriver_IsPCMSupported(int driver); 32 int SoundDriver_IsMIDISupported(int driver); 33 34 const char *SoundDriver_GetName(int driver); 35 36 int SoundDriver_PCM_GetError(void); 37 const char *SoundDriver_PCM_ErrorString(int ErrorNumber); 38 int SoundDriver_MIDI_GetError(void); 39 const char *SoundDriver_MIDI_ErrorString(int ErrorNumber); 40 41 int SoundDriver_PCM_Init(int *mixrate, int *numchannels, void *initdata); 42 void SoundDriver_PCM_Shutdown(void); 43 int SoundDriver_PCM_BeginPlayback(char *BufferStart, int BufferSize, int NumDivisions, void (*CallBackFunc)(void)); 44 void SoundDriver_PCM_StopPlayback(void); 45 void SoundDriver_PCM_Lock(void); 46 void SoundDriver_PCM_Unlock(void); 47 48 int SoundDriver_MIDI_Init(midifuncs *); 49 void SoundDriver_MIDI_Shutdown(void); 50 int SoundDriver_MIDI_StartPlayback(void); 51 void SoundDriver_MIDI_HaltPlayback(void); 52 void SoundDriver_MIDI_SetTempo(int tempo, int division); 53 void SoundDriver_MIDI_Lock(void); 54 void SoundDriver_MIDI_Unlock(void); 55 int SoundDriver_MIDI_GetCardType(void); 56 57 #ifdef __cplusplus 58 } 59 #endif 60 61 #endif