Hi,
I’ve successfully built VC++ 2010 and am sharing the small fix that was necessary. I use Mercurial myself but not over email. I hope this works.
The fix was to change file `sdl_audio.c’ with C+±style variable declarations into C format. The project settings required it to be C, probably for good reason.
I also have suggested adjustments to the build (not included here) to aid those targetting Visual C++ in a debuggable configuration. If there’s interest.
Cheers,
Kevin
HG changeset patch
User kkassil
Date 1301616501 14400
Node ID b34c130032526c17c24748d34f29c48bfe43c83f
Parent e427bb6266a4a419f16313348f52631c991dc02e
Fix compile error for C-not-C++ compilation.
diff -r e427bb6266a4 -r b34c13003252 src/audio/SDL_audio.c
— a/src/audio/SDL_audio.c Tue Mar 29 03:05:26 2011 -0700
+++ b/src/audio/SDL_audio.c Thu Mar 31 20:08:21 2011 -0400
@@ -324,6 +324,9 @@
SDL_AudioDevice *device = (SDL_AudioDevice *) devicep;
Uint8 *stream;
int stream_len;
- /* For streaming when the buffer sizes don’t match up */
- Uint8 *istream;
- int istream_len = 0;
void *udata;
void (SDLCALL * fill) (void userdata, Uint8 * stream, int len);
int silence;
@@ -332,10 +335,6 @@
/ The audio mixing is always a high priority thread */
SDL_SetThreadPriority(SDL_THREAD_PRIORITY_HIGH);
- /* For streaming when the buffer sizes don’t match up */
- Uint8 *istream;
- int istream_len = 0;-
/* Perform any thread setup */
device->threadid = SDL_ThreadID();
current_audio.impl.ThreadInit(device);