make pulse audio and option when building sdl2

This commit is contained in:
tmaul 2020-01-28 13:22:37 +00:00
parent 2875c5b9f7
commit 04d8dda505
2 changed files with 24 additions and 2 deletions

View File

@ -73,6 +73,12 @@ depobj += neocdlist.o \
cd_sdl2.o config.o main.o run.o stringset.o bzip.o drv.o media.o sdl2_gui_ingame.o sdl2_gui_common.o \
inpdipsw.o vid_sdl2opengl.o vid_sdl2.o dynhuff.o replay.o sdl2_gui.o sdl2_inprint.o input_sdl2.o stated.o
ifdef FORCE_PULSE_AUDIO
alldir += intf/audio/linux
depobj += aud_pulse_simple.o
endif
ifdef INCLUDE_7Z_SUPPORT
depobj += un7z.o \
\
@ -192,6 +198,10 @@ ASFLAGS = -O1 -f coff -w-orphan-labels
# FIXME
DEF := -DBUILD_SDL2 -DUSE_SPEEDHACKS -DFILENAME=$(NAME) -DUSE_FILE32API
ifdef FORCE_PULSE_AUDIO
DEF := $(DEF) -DFORCE_PULSE_AUDIO
endif
ifdef WINDOWS
DEF := $(DEF) -DSDL_WINDOWS
endif

View File

@ -21,8 +21,14 @@ static UINT32 nAudActive = 0;
extern struct AudOut AudOutXAudio2;
#elif defined (BUILD_MACOS)
extern struct AudOut AudOutMacOS;
#elif defined (BUILD_SDL) || defined (BUILD_SDL2)
#elif defined (BUILD_SDL)
extern struct AudOut AudOutSDL;
#elif defined (BUILD_SDL2)
#if defined (FORCE_PULSE_AUDIO)
extern struct AudOut AudOutPulseSimple;
#else
extern struct AudOut AudOutSDL;
#endif
#elif defined (_XBOX)
extern struct AudOut AudOutXAudio2;
#elif defined (BUILD_QT)
@ -39,8 +45,14 @@ static struct AudOut *pAudOut[]=
&AudOutXAudio2,
#elif defined (BUILD_MACOS)
&AudOutMacOS,
#elif defined (BUILD_SDL) || defined (BUILD_SDL2)
#elif defined (BUILD_SDL)
&AudOutSDL,
#elif defined (BUILD_SDL2)
#if defined (FORCE_PULSE_AUDIO)
&AudOutPulseSimple,
#else
&AudOutSDL,
#endif
#elif defined (_XBOX)
&AudOutXAudio2,
#elif defined (BUILD_QT)