diff --git a/Makefile b/Makefile index f72c17c173..3121f2c2b7 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,10 @@ ifeq ($(BUILD_ROAR), 1) OBJ += roar.o LIBS += -lroar endif +ifeq ($(BUILD_AL), 1) + OBJ += openal.o + LIBS += -lopenal +endif ifeq ($(BUILD_OPENGL), 1) OBJ += gl.o diff --git a/config.h b/config.h index 14e50760c4..dc2a16aa8d 100644 --- a/config.h +++ b/config.h @@ -36,11 +36,12 @@ #define AUDIO_OSS 2 #define AUDIO_ALSA 3 #define AUDIO_ROAR 4 +#define AUDIO_AL 5 //////////////////////// // Chooses which video and audio subsystem to use. Remember to update config.mk if you change these. #define VIDEO_DRIVER VIDEO_GL -#define AUDIO_DRIVER AUDIO_ALSA +#define AUDIO_DRIVER AUDIO_AL //////////////// diff --git a/config.mk b/config.mk index fbce73ec6a..f0dd8700ee 100644 --- a/config.mk +++ b/config.mk @@ -4,8 +4,9 @@ BUILD_FILTER = 0 BUILD_RSOUND = 0 BUILD_OSS = 0 -BUILD_ALSA = 1 +BUILD_ALSA = 0 BUILD_ROAR = 0 +BUILD_AL = 1 PREFIX = /usr/local diff --git a/openal.c b/openal.c index 8432084c18..05582dd2f0 100644 --- a/openal.c +++ b/openal.c @@ -19,6 +19,7 @@ #include "driver.h" #include #include +#include #define BUFSIZE 128 diff --git a/ssnes.c b/ssnes.c index a7d02ca3fa..1e9e840b71 100644 --- a/ssnes.c +++ b/ssnes.c @@ -57,6 +57,8 @@ static driver_t driver = { .audio = &audio_alsa, #elif AUDIO_DRIVER == AUDIO_ROAR .audio = &audio_roar, +#elif AUDIO_DRIVER == AUDIO_AL + .audio = &audio_openal, #else #error "Define a valid audio driver in config.h" #endif