From 669599cfd7c2d316e9086d31e1ccaab5b5964adb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 24 Jan 2017 00:29:40 +0100 Subject: [PATCH] Add audio_mix to libretro-common --- Makefile.common | 3 +- griffin/griffin.c | 1 + libretro-common/audio/audio_mix.c | 68 +++++++++++++++++++++++ libretro-common/include/audio/audio_mix.h | 46 +++++++++++++++ 4 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 libretro-common/audio/audio_mix.c create mode 100644 libretro-common/include/audio/audio_mix.h diff --git a/Makefile.common b/Makefile.common index f9247a28bb..691851b525 100644 --- a/Makefile.common +++ b/Makefile.common @@ -453,7 +453,8 @@ ifeq ($(HAVE_NEON),1) endif OBJ += $(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float.o \ - $(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16.o + $(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16.o \ + $(LIBRETRO_COMM_DIR)/audio/audio_mix.o ifeq ($(HAVE_NEON),1) OBJ += $(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float_neon.o \ diff --git a/griffin/griffin.c b/griffin/griffin.c index da7724432d..c2f8b31a49 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -1112,6 +1112,7 @@ XML ============================================================ */ #include "../libretro-common/audio/conversion/s16_to_float.c" #include "../libretro-common/audio/conversion/float_to_s16.c" +#include "../libretro-common/audio/audio_mix.c" /*============================================================ LIBRETRODB diff --git a/libretro-common/audio/audio_mix.c b/libretro-common/audio/audio_mix.c new file mode 100644 index 0000000000..ef7066c6cd --- /dev/null +++ b/libretro-common/audio/audio_mix.c @@ -0,0 +1,68 @@ +/* Copyright (C) 2010-2017 The RetroArch team + * + * --------------------------------------------------------------------------------------- + * The following license statement only applies to this file (audio_mix.c). + * --------------------------------------------------------------------------------------- + * + * Permission is hereby granted, free of charge, + * to any person obtaining a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include