Add HAVE_NEAREST_RESAMPLER ifdef

This commit is contained in:
twinaphex 2020-06-30 21:45:05 +02:00
parent 395fd7fea7
commit 69756ebd93
4 changed files with 13 additions and 2 deletions

View File

@ -279,8 +279,14 @@ OBJ += \
gfx/video_filter.o \ gfx/video_filter.o \
$(LIBRETRO_COMM_DIR)/audio/resampler/audio_resampler.o \ $(LIBRETRO_COMM_DIR)/audio/resampler/audio_resampler.o \
$(LIBRETRO_COMM_DIR)/audio/dsp_filter.o \ $(LIBRETRO_COMM_DIR)/audio/dsp_filter.o \
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler.o \ $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler.o
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/nearest_resampler.o \
ifeq ($(HAVE_NEAREST_RESAMPLER), 1)
DEFINES += -DHAVE_NEAREST_RESAMPLER
OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/nearest_resampler.o
endif
OBJ += \
$(LIBRETRO_COMM_DIR)/utils/md5.o \ $(LIBRETRO_COMM_DIR)/utils/md5.o \
playlist.o \ playlist.o \
$(LIBRETRO_COMM_DIR)/features/features_cpu.o \ $(LIBRETRO_COMM_DIR)/features/features_cpu.o \

View File

@ -797,7 +797,9 @@ AUDIO RESAMPLER
============================================================ */ ============================================================ */
#include "../libretro-common/audio/resampler/audio_resampler.c" #include "../libretro-common/audio/resampler/audio_resampler.c"
#include "../libretro-common/audio/resampler/drivers/sinc_resampler.c" #include "../libretro-common/audio/resampler/drivers/sinc_resampler.c"
#ifdef HAVE_NEAREST_RESAMPLER
#include "../libretro-common/audio/resampler/drivers/nearest_resampler.c" #include "../libretro-common/audio/resampler/drivers/nearest_resampler.c"
#endif
#ifdef HAVE_CC_RESAMPLER #ifdef HAVE_CC_RESAMPLER
#include "../audio/drivers_resampler/cc_resampler.c" #include "../audio/drivers_resampler/cc_resampler.c"
#endif #endif

View File

@ -47,7 +47,9 @@ static const retro_resampler_t *resampler_drivers[] = {
#ifdef HAVE_CC_RESAMPLER #ifdef HAVE_CC_RESAMPLER
&CC_resampler, &CC_resampler,
#endif #endif
#ifdef HAVE_NEAREST_RESAMPLER
&nearest_resampler, &nearest_resampler,
#endif
&null_resampler, &null_resampler,
NULL, NULL,
}; };

View File

@ -25,6 +25,7 @@ HAVE_DSOUND=auto # DirectSound support
HAVE_XAUDIO=auto # XAudio support HAVE_XAUDIO=auto # XAudio support
HAVE_WASAPI=auto # WASAPI support HAVE_WASAPI=auto # WASAPI support
HAVE_WINMM=auto # WinMM support HAVE_WINMM=auto # WinMM support
HAVE_NEAREST_RESAMPLER=yes # Nearest resampler
HAVE_CC_RESAMPLER=yes # CC Resampler HAVE_CC_RESAMPLER=yes # CC Resampler
HAVE_SSL=auto # SSL/mbedtls support HAVE_SSL=auto # SSL/mbedtls support
C89_SSL=no C89_SSL=no