driver_directsound.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 #include <inttypes.h> 22 23 enum 24 { 25 DSErr_Error = -1, 26 DSErr_Ok = 0, 27 DSErr_Uninitialised, 28 DSErr_DirectSoundCreate, 29 DSErr_SetCooperativeLevel, 30 DSErr_CreateSoundBuffer, 31 DSErr_CreateSoundBufferSecondary, 32 DSErr_SetFormat, 33 DSErr_SetFormatSecondary, 34 DSErr_Notify, 35 DSErr_NotifyEvents, 36 DSErr_SetNotificationPositions, 37 DSErr_Play, 38 DSErr_PlaySecondary, 39 DSErr_CreateThread, 40 }; 41 42 int DirectSoundDrv_GetError(void); 43 const char *DirectSoundDrv_ErrorString(int ErrorNumber); 44 45 int DirectSoundDrv_PCM_Init(int *mixrate, int *numchannels, void *initdata); 46 void DirectSoundDrv_PCM_Shutdown(void); 47 int DirectSoundDrv_PCM_BeginPlayback(char *BufferStart, int BufferSize, int NumDivisions, void (*CallBackFunc)(void)); 48 void DirectSoundDrv_PCM_StopPlayback(void); 49 void DirectSoundDrv_PCM_Lock(void); 50 void DirectSoundDrv_PCM_Unlock(void);