From: Paul Cercueil Date: Sun, 9 Jul 2023 12:38:25 +0000 (+0200) Subject: git subrepo clone https://github.com/libretro/libretro-common.git deps/libretro-common X-Git-Tag: r24l~290^2~5 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3719602cbe883fb394a71353e20a10a4a306e814;p=pcsx_rearmed.git git subrepo clone https://github.com/libretro/libretro-common.git deps/libretro-common subrepo: subdir: "deps/libretro-common" merged: "86d5e4128c" upstream: origin: "https://github.com/libretro/libretro-common.git" branch: "master" commit: "86d5e4128c" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" --- diff --git a/deps/libretro-common/.gitignore b/deps/libretro-common/.gitignore new file mode 100644 index 00000000..4e88cc39 --- /dev/null +++ b/deps/libretro-common/.gitignore @@ -0,0 +1,6 @@ +glsm/ +*.[od] +*.dll +*.so +*.dylib +*.exe diff --git a/deps/libretro-common/.gitrepo b/deps/libretro-common/.gitrepo new file mode 100644 index 00000000..a853644f --- /dev/null +++ b/deps/libretro-common/.gitrepo @@ -0,0 +1,12 @@ +; DO NOT EDIT (unless you know what you are doing) +; +; This subdirectory is a git "subrepo", and this file is maintained by the +; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme +; +[subrepo] + remote = https://github.com/libretro/libretro-common.git + branch = master + commit = 86d5e4128c072255c123d535cae97789023ee54b + parent = 95bc7ce4ee8d7d3c9de934d61d3200ec4d99390d + method = merge + cmdver = 0.4.3 diff --git a/deps/libretro-common/Makefile.test b/deps/libretro-common/Makefile.test new file mode 100644 index 00000000..4e1deede --- /dev/null +++ b/deps/libretro-common/Makefile.test @@ -0,0 +1,58 @@ + +OBJDIR = ../obj-unix + +TEST_UNIT_CFLAGS = $(CFLAGS) -Iinclude $(LDFLAGS) -lcheck $(LIBCHECK_CFLAGS) -Werror -Wdeclaration-after-statement -fsanitize=address -fsanitize=undefined -ftest-coverage -fprofile-arcs -ggdb + +TEST_GENERIC_QUEUE = test/queues/test_generic_queue +TEST_GENERIC_QUEUE_SRC = test/queues/test_generic_queue.c queues/generic_queue.c + +TEST_LINKED_LIST = test/lists/test_linked_list +TEST_LINKED_LIST_SRC = test/lists/test_linked_list.c lists/linked_list.c + +TEST_STDSTRING = test/string/test_stdstring +TEST_STDSTRING_SRC = test/string/test_stdstring.c string/stdstring.c encodings/encoding_utf.c \ + compat/compat_strl.c + +TEST_UTILS = test/utils/test_utils +TEST_UTILS_SRC = test/utils/test_utils.c utils/md5.c encodings/encoding_crc32.c \ + streams/file_stream.c vfs/vfs_implementation.c file/file_path.c \ + compat/compat_strl.c time/rtime.c string/stdstring.c encodings/encoding_utf.c + +TEST_HASH = test/hash/test_hash +TEST_HASH_SRC = test/hash/test_hash.c hash/lrc_hash.c \ + streams/file_stream.c vfs/vfs_implementation.c file/file_path.c \ + compat/compat_strl.c time/rtime.c string/stdstring.c encodings/encoding_utf.c + +all: + # Build and execute tests in order, to avoid coverage file collision + # string + $(CC) $(TEST_UNIT_CFLAGS) $(TEST_STDSTRING_SRC) -o $(TEST_STDSTRING) + $(TEST_STDSTRING) + lcov -c -d . -o `dirname $(TEST_STDSTRING)`/coverage.info + # utils + $(CC) $(TEST_UNIT_CFLAGS) $(TEST_UTILS_SRC) -o $(TEST_UTILS) + $(TEST_UTILS) + lcov -c -d . -o `dirname $(TEST_UTILS)`/coverage.info + # utils + $(CC) $(TEST_UNIT_CFLAGS) $(TEST_HASH_SRC) -o $(TEST_HASH) + $(TEST_HASH) + lcov -c -d . -o `dirname $(TEST_HASH)`/coverage.info + # list + $(CC) $(TEST_UNIT_CFLAGS) $(TEST_LINKED_LIST_SRC) -o $(TEST_LINKED_LIST) + $(TEST_LINKED_LIST) + lcov -c -d . -o `dirname $(TEST_LINKED_LIST)`/coverage.info + # queue + $(CC) $(TEST_UNIT_CFLAGS) $(TEST_GENERIC_QUEUE_SRC) -o $(TEST_GENERIC_QUEUE) + $(TEST_GENERIC_QUEUE) + lcov -c -d . -o `dirname $(TEST_GENERIC_QUEUE)`/coverage.info + + lcov -o test/coverage.info \ + -a test/utils/coverage.info \ + -a test/string/coverage.info \ + -a test/lists/coverage.info \ + -a test/queues/coverage.info + genhtml -o test/coverage/ test/coverage.info + +clean: + rm -f *.gcda *.gcno + diff --git a/deps/libretro-common/audio/audio_mix.c b/deps/libretro-common/audio/audio_mix.c new file mode 100644 index 00000000..eb138edd --- /dev/null +++ b/deps/libretro-common/audio/audio_mix.c @@ -0,0 +1,377 @@ +/* Copyright (C) 2010-2020 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 +#include +#include + +#include + +#if defined(__SSE2__) +#include +#elif defined(__ALTIVEC__) +#include +#endif + +#include +#include