From 1a7365826c7cbf6b2119804390480cabdb79b58e Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 24 Oct 2008 01:33:53 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@1113 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/Makefile | 9 +++++++-- polymer/eduke32/build/Makefile.shared | 10 ++++++++-- polymer/eduke32/source/jaudiolib/dsl.c | 10 +--------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/polymer/eduke32/Makefile b/polymer/eduke32/Makefile index da54ea72e..b6fcf8d6e 100644 --- a/polymer/eduke32/Makefile +++ b/polymer/eduke32/Makefile @@ -11,9 +11,14 @@ PRETTY_OUTPUT = 1 DXROOT=../sdk/dx ALROOT = AL -SDLROOT = /usr/local + SDLCONFIG = /usr/local/bin/sdl-config -# SDLCONFIG = sdl-config + +ifeq ($(wildcard $(SDLCONFIG)),$(SDLCONFIG)) + SDLROOT = /usr/local +else + SDLCONFIG = sdl-config +endif # Engine options SUPERBUILD = 1 diff --git a/polymer/eduke32/build/Makefile.shared b/polymer/eduke32/build/Makefile.shared index 183310176..ef18888eb 100644 --- a/polymer/eduke32/build/Makefile.shared +++ b/polymer/eduke32/build/Makefile.shared @@ -3,8 +3,14 @@ ENGINELIB=libengine.a EDITORLIB=libbuild.a -SDLCONFIG=/usr/local/bin/sdl-config -# SDLCONFIG=sdl-config +SDLCONFIG = /usr/local/bin/sdl-config + +ifeq ($(wildcard $(SDLCONFIG)),$(SDLCONFIG)) + SDLROOT = /usr/local +else + SDLCONFIG = sdl-config +endif + SDL_FRAMEWORK = 0 # Overridden for OSes that don't have the cutdown stdc++ that is supc++ diff --git a/polymer/eduke32/source/jaudiolib/dsl.c b/polymer/eduke32/source/jaudiolib/dsl.c index 719b2652a..cbb7353aa 100644 --- a/polymer/eduke32/source/jaudiolib/dsl.c +++ b/polymer/eduke32/source/jaudiolib/dsl.c @@ -40,7 +40,6 @@ static int interrupts_disabled = 0; static int(*_DSL_CallBackFunc)(int); static volatile char *_DSL_BufferStart; static int _DSL_BufferSize; -static int _DSL_NumDivisions; static int _DSL_SampleRate; static int _DSL_remainder; static Uint16 _DSL_format; @@ -184,8 +183,7 @@ int DSL_BeginBufferedPlayback(char *BufferStart, int(*CallBackFunc)(int), int Bu _DSL_CallBackFunc = CallBackFunc; _DSL_BufferStart = BufferStart; _DSL_BufferSize = (BufferSize / NumDivisions); - _DSL_NumDivisions = NumDivisions; - + _DSL_remainder = 0; /* @@ -198,12 +196,6 @@ int DSL_BeginBufferedPlayback(char *BufferStart, int(*CallBackFunc)(int), int Bu if (_DSL_SampleRate >= 16000) chunksize *= 2; if (_DSL_SampleRate >= 32000) chunksize *= 2; - /* - // SDL mixer does this already - if (MixMode & SIXTEEN_BIT) chunksize *= 2; - if (MixMode & STEREO) chunksize *= 2; - */ - if (Mix_OpenAudio(_DSL_SampleRate, _DSL_format, _DSL_channels, chunksize) < 0) { DSL_SetErrorCode(DSL_MixerInitFailure);