comparison src/audio/windx5/SDL_dx5audio.c @ 1330:450721ad5436

It's now possible to build SDL without any C runtime at all on Windows, using Visual C++ 2005
author Sam Lantinga <slouken@libsdl.org>
date Mon, 06 Feb 2006 08:28:51 +0000
parents c9b51268668f
children 3692456e7b0f
comparison
equal deleted inserted replaced
1329:bc67bbf87818 1330:450721ad5436
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22 22
23 /* Allow access to a raw mixing buffer */ 23 /* Allow access to a raw mixing buffer */
24 24
25 #include <stdio.h>
26
27 #include "SDL_types.h" 25 #include "SDL_types.h"
28 #include "SDL_error.h" 26 #include "SDL_error.h"
29 #include "SDL_timer.h" 27 #include "SDL_timer.h"
30 #include "SDL_audio.h" 28 #include "SDL_audio.h"
29 #include "SDL_stdlib.h"
30 #include "SDL_string.h"
31 #include "SDL_audio_c.h" 31 #include "SDL_audio_c.h"
32 #include "SDL_dx5audio.h" 32 #include "SDL_dx5audio.h"
33 33
34 /* Define this if you want to use DirectX 6 DirectSoundNotify interface */ 34 /* Define this if you want to use DirectX 6 DirectSoundNotify interface */
35 //#define USE_POSITION_NOTIFY 35 //#define USE_POSITION_NOTIFY
221 break; 221 break;
222 case DSERR_UNSUPPORTED: 222 case DSERR_UNSUPPORTED:
223 error = "Function not supported"; 223 error = "Function not supported";
224 break; 224 break;
225 default: 225 default:
226 sprintf(errbuf, "%s: Unknown DirectSound error: 0x%x", 226 snprintf(errbuf, SDL_arraysize(errbuf),
227 "%s: Unknown DirectSound error: 0x%x",
227 function, code); 228 function, code);
228 break; 229 break;
229 } 230 }
230 if ( ! errbuf[0] ) { 231 if ( ! errbuf[0] ) {
231 sprintf(errbuf, "%s: %s", function, error); 232 snprintf(errbuf, SDL_arraysize(errbuf), "%s: %s", function, error);
232 } 233 }
233 SDL_SetError("%s", errbuf); 234 SDL_SetError("%s", errbuf);
234 return; 235 return;
235 } 236 }
236 237