From 30d837ec9074fb5f98af9f93d2ff1510e8234f31 Mon Sep 17 00:00:00 2001 From: Giel van Schijndel Date: Mon, 31 Dec 2007 21:55:02 +0000 Subject: [PATCH] * Allow compilation on MSVC again git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3285 4a71c877-e1ca-e34f-864e-861f7616d084 --- lib/sound/openal_track.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/sound/openal_track.c b/lib/sound/openal_track.c index c5a0f5fa6..090dced79 100644 --- a/lib/sound/openal_track.c +++ b/lib/sound/openal_track.c @@ -607,10 +607,12 @@ BOOL sound_Play3DSample( TRACK *psTrack, AUDIO_SAMPLE *psSample ) */ bool sound_PlayStream(PHYSFS_file* fileHandle, float volume, void (*onFinished)(void*), void* user_data) { - static const unsigned int buffer_count = 2; +#define BUF_COUNT 2 // HACK: circumvents MSVC's freakingly bad C support + static const unsigned int buffer_count = BUF_COUNT; AUDIO_STREAM* stream; - ALuint buffers[buffer_count]; + ALuint buffers[BUF_COUNT]; +#undef BUF_COUNT unsigned int i;