diff --git a/Makefile.common b/Makefile.common index 70a84fb359..9a75be8c24 100644 --- a/Makefile.common +++ b/Makefile.common @@ -369,10 +369,10 @@ ifeq ($(HAVE_NEON),1) DEFINES += -DSINC_LOWER_QUALITY endif -OBJ += audio/audio_utils.o \ +OBJ += libretro-common/conversion/s16_to_float.o \ libretro-common/conversion/float_to_s16.o ifeq ($(HAVE_NEON),1) - OBJ += audio/audio_utils_neon.o \ + OBJ += libretro-common/conversion/s16_to_float_neon.o \ libretro-common/conversion/float_to_s16_neon.o endif diff --git a/Makefile.griffin b/Makefile.griffin index d6c4fac490..9febcfdcb2 100644 --- a/Makefile.griffin +++ b/Makefile.griffin @@ -205,7 +205,8 @@ else ifeq ($(platform), vita) -lSceSysmodule_stub -lSceCtrl_stub -lSceAudio_stub -lUVLoader_stub \ -lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lfreetype -lz -lm -lc -lpng - PLATOBJS += audio/audio_utils_neon.o audio/drivers_resampler/sinc_resampler_neon.o \ + PLATOBJS += libretro-common/conversion/s16_to_float_neon.o \ + audio/drivers_resampler/sinc_resampler_neon.o \ audio/drivers_resampler/cc_resampler_neon.o LIBDIRS += -L. diff --git a/Makefile.openpandora b/Makefile.openpandora index 044d6c046f..a72b835ca6 100644 --- a/Makefile.openpandora +++ b/Makefile.openpandora @@ -10,7 +10,7 @@ TARGET := retroarch-pandora LDDIRS = -L. -L$(PNDSDK)/usr/lib INCDIRS = -I. -I$(PNDSDK)/usr/include -OBJ = griffin/griffin.o audio/resamplers/sinc_resampler_neon.o audio/audio_utils_neon.o libretro-common/conversion/float_to_s16_neon.o +OBJ = griffin/griffin.o audio/resamplers/sinc_resampler_neon.o libretro-common/conversion/s16_to_float_neon.o libretro-common/conversion/float_to_s16_neon.o LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound diff --git a/audio/audio_driver.c b/audio/audio_driver.c index b5f64b613a..bdca7bec3a 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -20,11 +20,11 @@ #include #include +#include #include "audio_driver.h" #include "audio_resampler_driver.h" #include "../record/record_driver.h" -#include "audio_utils.h" #include "audio_thread_wrapper.h" #include "../command.h" diff --git a/audio/audio_utils.c b/libretro-common/conversion/s16_to_float.c similarity index 100% rename from audio/audio_utils.c rename to libretro-common/conversion/s16_to_float.c diff --git a/audio/audio_utils_neon.S b/libretro-common/conversion/s16_to_float_neon.S similarity index 100% rename from audio/audio_utils_neon.S rename to libretro-common/conversion/s16_to_float_neon.S diff --git a/audio/audio_utils.h b/libretro-common/include/conversion/s16_to_float.h similarity index 62% rename from audio/audio_utils.h rename to libretro-common/include/conversion/s16_to_float.h index e5e8c1109b..bd4877b5a3 100644 --- a/audio/audio_utils.h +++ b/libretro-common/include/conversion/s16_to_float.h @@ -1,20 +1,26 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2014 - Hans-Kristian Arntzen +/* Copyright (C) 2010-2016 The RetroArch team * - * RetroArch is free software: you can redistribute it and/or modify it under the terms - * of the GNU General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. + * --------------------------------------------------------------------------------------- + * The following license statement only applies to this file (s16_to_float.h). + * --------------------------------------------------------------------------------------- * - * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. + * 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: * - * You should have received a copy of the GNU General Public License along with RetroArch. - * If not, see . + * 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. */ - -#ifndef AUDIO_UTILS_H -#define AUDIO_UTILS_H +#ifndef __LIBRETRO_SDK_CONVERSION_S16_TO_FLOAT_H__ +#define __LIBRETRO_SDK_CONVERSION_S16_TO_FLOAT_H__ #ifdef __cplusplus extern "C" { @@ -23,9 +29,9 @@ extern "C" { #include #include -#ifdef HAVE_CONFIG_H -#include "../config.h" -#endif +#include + +RETRO_BEGIN_DECLS #if defined(__SSE2__) #define convert_s16_to_float convert_s16_to_float_SSE2 @@ -113,8 +119,6 @@ void convert_s16_to_float_C(float *out, **/ void convert_init_simd(void); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/pkg/android/phoenix/jni/Android.mk b/pkg/android/phoenix/jni/Android.mk index 0285c22075..aa5d7cd524 100644 --- a/pkg/android/phoenix/jni/Android.mk +++ b/pkg/android/phoenix/jni/Android.mk @@ -24,7 +24,7 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) ifeq ($(HAVE_NEON),1) DEFINES += -D__ARM_NEON__ - LOCAL_SRC_FILES += $(RARCH_DIR)/audio/audio_utils_neon.S.neon + LOCAL_SRC_FILES += $(RARCH_DIR)/libretro-common/conversion/s16_to_float_neon.S.neon LOCAL_SRC_FILES += $(RARCH_DIR)/libretro-common/conversion/float_to_s16_neon.S.neon LOCAL_SRC_FILES += $(RARCH_DIR)/audio/drivers_resampler/sinc_resampler_neon.S.neon LOCAL_SRC_FILES += $(RARCH_DIR)/audio/drivers_resampler/cc_resampler_neon.S.neon diff --git a/pkg/android/phoenix/jni/Android2.mk b/pkg/android/phoenix/jni/Android2.mk index 1e6a06953b..50b402d180 100644 --- a/pkg/android/phoenix/jni/Android2.mk +++ b/pkg/android/phoenix/jni/Android2.mk @@ -24,7 +24,7 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) ifeq ($(HAVE_NEON),1) DEFINES += -D__ARM_NEON__ - LOCAL_SRC_FILES += $(RARCH_DIR)/audio/audio_utils_neon.S.neon + LOCAL_SRC_FILES += $(RARCH_DIR)/libretro-common/conversion/s16_to_float_neon.S.neon LOCAL_SRC_FILES += $(RARCH_DIR)/libretro-common/conversion/float_to_s16_neon.S.neon LOCAL_SRC_FILES += $(RARCH_DIR)/audio/drivers_resampler/sinc_resampler_neon.S.neon LOCAL_SRC_FILES += $(RARCH_DIR)/audio/drivers_resampler/cc_resampler_neon.S.neon diff --git a/record/drivers/record_ffmpeg.c b/record/drivers/record_ffmpeg.c index 5d6703185e..2d375bced8 100644 --- a/record/drivers/record_ffmpeg.c +++ b/record/drivers/record_ffmpeg.c @@ -60,8 +60,7 @@ extern "C" { #include #include #include - -#include "../../audio/audio_utils.h" +#include #include "../../general.h" #include "../../verbosity.h"