Check libsamplerate as critical and use HAVE_SRC

This commit is contained in:
Themaister 2011-01-07 11:09:56 +01:00
parent 064ab9e7bd
commit 270292db2c
5 changed files with 19 additions and 5 deletions

View File

@ -4,13 +4,19 @@ TARGET = ssnes
OBJ = ssnes.o file.o driver.o conf/config_file.o settings.o dynamic.o
LIBS = -lsamplerate
LIBS =
DEFINES =
ifeq ($(HAVE_SRC), 1)
LIBS += $(SRC_LIBS)
DEFINES += $(SRC_CFLAGS)
endif
ifeq ($(HAVE_RSOUND), 1)
OBJ += audio/rsound.o
LIBS += -lrsound
endif
ifeq ($(HAVE_OSS), 1)
OBJ += audio/oss.o
endif

View File

@ -27,7 +27,10 @@
#include "libsnes.hpp"
#include "driver.h"
#include "config.h"
#ifdef HAVE_SRC
#include <samplerate.h>
#endif
///////////////// Drivers

View File

@ -20,11 +20,13 @@
#define __SSNES_GENERAL_H
#include <stdbool.h>
#include <samplerate.h>
#include "driver.h"
#include <stdio.h>
#include "record/ffemu.h"
#include "config.h"
#ifdef HAVE_SRC
#include <samplerate.h>
#endif
#define MAX_PLAYERS 2

View File

@ -32,12 +32,13 @@ if [ $HAVE_FFMPEG != no ]; then
( [ $HAVE_FFMPEG = auto ] && ( [ $HAVE_AVCODEC = no ] || [ $HAVE_AVFORMAT = no ] || [ $HAVE_AVCORE = no ] || [ $HAVE_AVUTIL = no ] || [ $HAVE_SWSCALE = no ] ) && HAVE_FFMPEG=no ) || HAVE_FFMPEG=yes
fi
check_lib SRC -lsamplerate src_callback_new
check_pkgconf SRC samplerate
check_critical SRC "Cannot find libsamplerate."
check_lib DYNAMIC -ldl dlopen
# Creates config.mk and config.h.
VARS="ALSA OSS AL RSOUND ROAR JACK SDL FILTER CG XML DYNAMIC FFMPEG AVCODEC AVFORMAT AVCORE AVUTIL SWSCALE"
VARS="ALSA OSS AL RSOUND ROAR JACK SDL FILTER CG XML DYNAMIC FFMPEG AVCODEC AVFORMAT AVCORE AVUTIL SWSCALE SRC"
create_config_make config.mk $VARS
create_config_header config.h $VARS

View File

@ -17,7 +17,6 @@
#include <stdbool.h>
#include <samplerate.h>
#include <libsnes.hpp>
#include <stdio.h>
#include <stdlib.h>
@ -30,6 +29,9 @@
#include "dynamic.h"
#include "record/ffemu.h"
#include <assert.h>
#ifdef HAVE_SRC
#include <samplerate.h>
#endif
struct global g_extern = {
.video_active = true,