diff options
author | Hunter Sezen <orbea@riseup.net> | 2019-07-20 09:23:39 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-07-20 09:23:39 +0700 |
commit | 3557fcd162c6ce29c0b9e6e8c21b007b63a7d9d2 (patch) | |
tree | 3df019da10736df376600da1c0e0a875e4b93489 /games/SameBoy | |
parent | d633714ebf888442ff2a0fe5b0a8c66d404d22f7 (diff) | |
download | slackbuilds-3557fcd162c6ce29c0b9e6e8c21b007b63a7d9d2.tar.gz |
games/SameBoy: Updated for version 0.12.1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/SameBoy')
-rw-r--r-- | games/SameBoy/README | 11 | ||||
-rw-r--r-- | games/SameBoy/SameBoy.SlackBuild | 65 | ||||
-rw-r--r-- | games/SameBoy/SameBoy.info | 10 | ||||
-rw-r--r-- | games/SameBoy/datadir.patch | 175 | ||||
-rw-r--r-- | games/SameBoy/joypad.patch | 66 | ||||
-rw-r--r-- | games/SameBoy/libretro.patch | 55 | ||||
-rw-r--r-- | games/SameBoy/sdl.patch | 62 | ||||
-rw-r--r-- | games/SameBoy/sound.patch | 26 |
8 files changed, 102 insertions, 368 deletions
diff --git a/games/SameBoy/README b/games/SameBoy/README index 0219f866b2..0c57d7f735 100644 --- a/games/SameBoy/README +++ b/games/SameBoy/README @@ -7,5 +7,14 @@ SDL2 is an optional dependency required to build the SDL frontend. At least one optional dependency is required to use SameBoy. +To disable the SDL2 build use: + + SDL=no ./SameBoy.SlackBuild + +To disable the libretro build use: + + LIBRETRO=no ./SameBoy.SlackBuild + To build the debugging symbols use: - DEBUG=1 ./SameBoy.SlackBuild + + DEBUG=yes ./SameBoy.SlackBuild diff --git a/games/SameBoy/SameBoy.SlackBuild b/games/SameBoy/SameBoy.SlackBuild index eacc94ccaf..fe99e2ded3 100644 --- a/games/SameBoy/SameBoy.SlackBuild +++ b/games/SameBoy/SameBoy.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for SameBoy -# Copyright 2017-2018 Hunter Sezen California, USA +# Copyright 2017-2019 Hunter Sezen California, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,8 +25,8 @@ PRGNAM=SameBoy LIBNAM=$(printf %s $PRGNAM | tr 'A-Z' 'a-z')_libretro SRCNAM=${LIBNAM%%_*} -VERSION=${VERSION:-0.11.2} -RGBVERS=${RGBVERS:-0.3.7} +VERSION=${VERSION:-0.12.1} +RGBVERS=${RGBVERS:-0.3.8} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -48,6 +48,19 @@ LIBDIRSUFFIX= set -eu +LIBRETRO="${LIBRETRO:-yes}" + +if pkg-config --exists sdl2; then + SDL="${SDL:-yes}" +else + SDL=no +fi + +if [ "$LIBRETRO" != yes ] && [ "$SDL" != yes ]; then + printf %s\\n 'ERROR: Both the SDL2 and Libretro builds are disabled.' >&2 + exit 1 +fi + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -69,26 +82,10 @@ else CONF=release fi -# Add a build-time option to change the resources directory. -# https://github.com/LIJI32/SameBoy/commit/91904df5e8cc7370776c37bdb46467a81887a6b4 -# https://github.com/LIJI32/SameBoy/pull/129 -# https://github.com/LIJI32/SameBoy/issues/39 -patch -p1 < $CWD/datadir.patch - -# Reconnect the joypad when SameBoy starts directly to a ROM -# https://github.com/LIJI32/SameBoy/commit/7ffed9c43cd533c4ab16ab9d8b0879a39a00a02b -# https://github.com/LIJI32/SameBoy/issues/131 -patch -p1 < $CWD/joypad.patch - -# Apply the SDL 2.0.6 audio workaround to everything except Windows -# https://github.com/LIJI32/SameBoy/commit/453673a2a653a45d8ee378ba5335f98df5e22efa -# https://github.com/LIJI32/SameBoy/issues/130 -patch -p1 < $CWD/sdl.patch - -# Adjust DAC attributes to fix LADX’s crackling audio -# https://github.com/LIJI32/SameBoy/commit/94136f5741b7484189af048830126c4bad04ac11 -# https://github.com/LIJI32/SameBoy/issues/125 -patch -p1 < $CWD/sound.patch +# Fix audio issues with some RetroArch audio drivers. Fixes #189 +# https://github.com/LIJI32/SameBoy/commit/597dc72e460f3e95caad40b8c557fb01f53f18ee +# https://github.com/LIJI32/SameBoy/issues/189 +patch -p1 < $CWD/libretro.patch PATH="$TMP/$PRGNAM-$VERSION/rgbds-$RGBVERS/bin:$PATH" @@ -97,7 +94,7 @@ make -C rgbds-$RGBVERS install Q= \ PREFIX=. \ DESTDIR=./ -if pkg-config --exists sdl2; then +if [ "$SDL" = yes ]; then make CONF=$CONF DATA_DIR=/usr/share/games/$SRCNAM/ mkdir -p $PKG/usr/games $PKG/usr/share/games cp -av build/bin/SDL $PKG/usr/share/games/$SRCNAM @@ -106,19 +103,21 @@ else make bootroms fi -make -C libretro DEBUG=$DEBUG GIT_VERSION="${VERSION#*_}" +if [ "$LIBRETRO" = yes ]; then + make -C libretro DEBUG=$DEBUG GIT_VERSION="${VERSION#*_}" -install -Dm0644 build/bin/$LIBNAM.so \ - $PKG/usr/lib${LIBDIRSUFFIX}/libretro/$LIBNAM.so + install -Dm0644 build/bin/$LIBNAM.so \ + $PKG/usr/lib${LIBDIRSUFFIX}/libretro/$LIBNAM.so -# sameboy_libretro.info from: -# https://raw.githubusercontent.com/libretro/libretro-super/88176482b14e22b744b129bee84f27cb196936a9/dist/info/sameboy_libretro.info -install -Dm0644 $CWD/$LIBNAM-info \ - $PKG/usr/lib${LIBDIRSUFFIX}/libretro/info/$LIBNAM.info + # sameboy_libretro.info from: + # https://raw.githubusercontent.com/libretro/libretro-super/88176482b14e22b744b129bee84f27cb196936a9/dist/info/sameboy_libretro.info + install -Dm0644 $CWD/$LIBNAM-info \ + $PKG/usr/lib${LIBDIRSUFFIX}/libretro/info/$LIBNAM.info +fi if [ $DEBUG = 0 ]; then - find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | + grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true fi mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/games/SameBoy/SameBoy.info b/games/SameBoy/SameBoy.info index a7055585b3..57c5780452 100644 --- a/games/SameBoy/SameBoy.info +++ b/games/SameBoy/SameBoy.info @@ -1,10 +1,10 @@ PRGNAM="SameBoy" -VERSION="0.11.2" +VERSION="0.12.1" HOMEPAGE="https://sameboy.github.io/" -DOWNLOAD="https://github.com/LIJI32/SameBoy/archive/v0.11.2/SameBoy-0.11.2.tar.gz \ - https://github.com/rednex/rgbds/releases/download/v0.3.7/rgbds-0.3.7.tar.gz" -MD5SUM="ce83f1981c3298174d45c28004a22fdc \ - 2e11f14dfcedc0b5db6f8b2781efb9c9" +DOWNLOAD="https://github.com/LIJI32/SameBoy/archive/v0.12.1/SameBoy-0.12.1.tar.gz \ + https://github.com/rednex/rgbds/releases/download/v0.3.8/rgbds-0.3.8.tar.gz" +MD5SUM="6d12cbeaf0ffc98de39ea41ac5573acc \ + b1eac91f5e46f39150a8af0fe67cebeb" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/games/SameBoy/datadir.patch b/games/SameBoy/datadir.patch deleted file mode 100644 index 7d721cf46d..0000000000 --- a/games/SameBoy/datadir.patch +++ /dev/null @@ -1,175 +0,0 @@ -From 91904df5e8cc7370776c37bdb46467a81887a6b4 Mon Sep 17 00:00:00 2001 -From: NieDzejkob <niedzejkob@gmail.com> -Date: Fri, 9 Nov 2018 23:20:57 +0100 -Subject: [PATCH] Add a build-time option to change the resources directory. - -Normally, SameBoy would use executable-relative paths for any -resource files, which posed problems for packaging the software -by distributions, which usually prefer FHS-compliant file locations. - -This commit makes it possible to specify an alternative base -directory with a compile-time environment variable. ---- - Makefile | 4 ++++ - README.md | 4 +++- - SDL/gui.c | 2 +- - SDL/main.c | 4 ++-- - SDL/shader.c | 4 ++-- - SDL/utils.c | 16 ++++++++++------ - SDL/utils.h | 4 ++-- - 7 files changed, 24 insertions(+), 14 deletions(-) - -diff --git a/Makefile b/Makefile -index 330f2c81..7038ee98 100755 ---- a/Makefile -+++ b/Makefile -@@ -33,6 +33,10 @@ BIN := build/bin - OBJ := build/obj - BOOTROMS_DIR ?= $(BIN)/BootROMs - -+ifdef DATA_DIR -+CFLAGS += -DDATA_DIR="\"$(DATA_DIR)\"" -+endif -+ - # Set tools - - # Use clang if it's available. -diff --git a/README.md b/README.md -index b1a2011d..91e0bf6c 100644 ---- a/README.md -+++ b/README.md -@@ -46,6 +46,8 @@ On Windows, SameBoy also requires: - * [GnuWin](http://gnuwin32.sourceforge.net/) - * Running vcvars32 before running make. Make sure all required tools and libraries are in %PATH% and %lib%, respectively. - --To compile, simply run `make`. The targets are cocoa (Default for macOS), sdl (Default for everything else), libretro, bootroms and tester. You may also specify CONF=debug (default), CONF=release or CONF=native_release to control optimization and symbols. native_release is faster than release, but is optimized to the host's CPU and therefore is not portable. You may set BOOTROMS_DIR=... to a directory containing precompiled dmg_boot.bin and cgb_boot.bin files, otherwise the build system will compile and use SameBoy's own boot ROMs. -+To compile, simply run `make`. The targets are `cocoa` (Default for macOS), `sdl` (Default for everything else), `libretro`, `bootroms` and `tester`. You may also specify `CONF=debug` (default), `CONF=release` or `CONF=native_release` to control optimization and symbols. `native_release` is faster than `release`, but is optimized to the host's CPU and therefore is not portable. You may set `BOOTROMS_DIR=...` to a directory containing precompiled `dmg_boot.bin` and `cgb_boot.bin` files, otherwise the build system will compile and use SameBoy's own boot ROMs. -+ -+By default, the SDL port will look for resource files with a path relative to executable. If you are packaging SameBoy, you may wish to override this by setting the `DATA_DIR` variable during compilation to the target path of the directory containing all files (apart from the executable, that's not necessary) from the `build/bin/SDL` directory in the source tree. Make sure the variable ends with a `/` character. - - SameBoy was compiled and tested on macOS, Ubuntu and 32-bit Windows 7. -diff --git a/SDL/gui.c b/SDL/gui.c -index d43d939a..c32eec4d 100644 ---- a/SDL/gui.c -+++ b/SDL/gui.c -@@ -746,7 +746,7 @@ void run_gui(bool is_running) - /* Draw the background screen */ - static SDL_Surface *converted_background = NULL; - if (!converted_background) { -- SDL_Surface *background = SDL_LoadBMP(executable_relative_path("background.bmp")); -+ SDL_Surface *background = SDL_LoadBMP(resource_path("background.bmp")); - SDL_SetPaletteColors(background->format->palette, gui_palette, 0, 4); - converted_background = SDL_ConvertSurface(background, pixel_format, 0); - SDL_LockSurface(converted_background); -diff --git a/SDL/main.c b/SDL/main.c -index 0cf1c79d..34e2f80d 100755 ---- a/SDL/main.c -+++ b/SDL/main.c -@@ -426,7 +426,7 @@ static void run(void) - bool error = false; - start_capturing_logs(); - const char * const boot_roms[] = {"dmg_boot.bin", "cgb_boot.bin", "agb_boot.bin"}; -- error = GB_load_boot_rom(&gb, executable_relative_path(boot_roms[configuration.model])); -+ error = GB_load_boot_rom(&gb, resource_path(boot_roms[configuration.model])); - end_capturing_logs(true, error); - - start_capturing_logs(); -@@ -442,7 +442,7 @@ static void run(void) - GB_load_battery(&gb, battery_save_path); - - /* Configure symbols */ -- GB_debugger_load_symbol_file(&gb, executable_relative_path("registers.sym")); -+ GB_debugger_load_symbol_file(&gb, resource_path("registers.sym")); - - char symbols_path[path_length + 5]; - replace_extension(filename, path_length, symbols_path, ".sym"); -diff --git a/SDL/shader.c b/SDL/shader.c -index 5b41b2a8..ed45c42f 100644 ---- a/SDL/shader.c -+++ b/SDL/shader.c -@@ -78,7 +78,7 @@ bool init_shader_with_name(shader_t *shader, const char *name) - static signed long filter_token_location = 0; - - if (!master_shader_code[0]) { -- FILE *master_shader_f = fopen(executable_relative_path("Shaders/MasterShader.fsh"), "r"); -+ FILE *master_shader_f = fopen(resource_path("Shaders/MasterShader.fsh"), "r"); - if (!master_shader_f) return false; - fread(master_shader_code, 1, sizeof(master_shader_code) - 1, master_shader_f); - fclose(master_shader_f); -@@ -92,7 +92,7 @@ bool init_shader_with_name(shader_t *shader, const char *name) - char shader_path[1024]; - sprintf(shader_path, "Shaders/%s.fsh", name); - -- FILE *shader_f = fopen(executable_relative_path(shader_path), "r"); -+ FILE *shader_f = fopen(resource_path(shader_path), "r"); - if (!shader_f) return false; - memset(shader_code, 0, sizeof(shader_code)); - fread(shader_code, 1, sizeof(shader_code) - 1, shader_f); -diff --git a/SDL/utils.c b/SDL/utils.c -index 539e3518..eee6ce65 100644 ---- a/SDL/utils.c -+++ b/SDL/utils.c -@@ -3,8 +3,11 @@ - #include <string.h> - #include "utils.h" - --const char *executable_folder(void) -+const char *resource_folder(void) - { -+#ifdef DATA_DIR -+ return DATA_DIR; -+#else - static const char *ret = NULL; - if (!ret) { - ret = SDL_GetBasePath(); -@@ -13,21 +16,22 @@ const char *executable_folder(void) - } - } - return ret; -+#endif - } - --char *executable_relative_path(const char *filename) -+char *resource_path(const char *filename) - { - static char path[1024]; -- snprintf(path, sizeof(path), "%s%s", executable_folder(), filename); -+ snprintf(path, sizeof(path), "%s%s", resource_folder(), filename); - return path; - } - -- -+ - void replace_extension(const char *src, size_t length, char *dest, const char *ext) - { - memcpy(dest, src, length); - dest[length] = 0; -- -+ - /* Remove extension */ - for (size_t i = length; i--;) { - if (dest[i] == '/') break; -@@ -36,7 +40,7 @@ void replace_extension(const char *src, size_t length, char *dest, const char *e - break; - } - } -- -+ - /* Add new extension */ - strcat(dest, ext); - } -diff --git a/SDL/utils.h b/SDL/utils.h -index 7995da90..216e723e 100644 ---- a/SDL/utils.h -+++ b/SDL/utils.h -@@ -2,8 +2,8 @@ - #define utils_h - #include <stddef.h> - --const char *executable_folder(void); --char *executable_relative_path(const char *filename); -+const char *resource_folder(void); -+char *resource_path(const char *filename); - void replace_extension(const char *src, size_t length, char *dest, const char *ext); - - #endif /* utils_h */ diff --git a/games/SameBoy/joypad.patch b/games/SameBoy/joypad.patch deleted file mode 100644 index fc089e4223..0000000000 --- a/games/SameBoy/joypad.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 7ffed9c43cd533c4ab16ab9d8b0879a39a00a02b Mon Sep 17 00:00:00 2001 -From: Lior Halphon <LIJI32@gmail.com> -Date: Sat, 10 Nov 2018 19:39:57 +0200 -Subject: [PATCH] Reconnect the joypad when SameBoy starts directly to a ROM - (fixes #131) - ---- - SDL/gui.c | 10 ++++++++-- - SDL/gui.h | 1 + - SDL/main.c | 3 +++ - 3 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/SDL/gui.c b/SDL/gui.c -index c32eec4d..ed9f3573 100644 ---- a/SDL/gui.c -+++ b/SDL/gui.c -@@ -721,8 +721,7 @@ joypad_axis_t get_joypad_axis(uint8_t physical_axis) - } - - --extern void set_filename(const char *new_filename, bool new_should_free); --void run_gui(bool is_running) -+void connect_joypad(void) - { - if (joystick && !SDL_NumJoysticks()) { - if (controller) { -@@ -743,6 +742,13 @@ void run_gui(bool is_running) - joystick = SDL_JoystickOpen(0); - } - } -+} -+ -+extern void set_filename(const char *new_filename, bool new_should_free); -+void run_gui(bool is_running) -+{ -+ connect_joypad(); -+ - /* Draw the background screen */ - static SDL_Surface *converted_background = NULL; - if (!converted_background) { -diff --git a/SDL/gui.h b/SDL/gui.h -index 9893eb61..4d106143 100644 ---- a/SDL/gui.h -+++ b/SDL/gui.h -@@ -92,6 +92,7 @@ extern configuration_t configuration; - void update_viewport(void); - void run_gui(bool is_running); - void render_texture(void *pixels, void *previous); -+void connect_joypad(void); - - joypad_button_t get_joypad_button(uint8_t physical_button); - joypad_axis_t get_joypad_axis(uint8_t physical_axis); -diff --git a/SDL/main.c b/SDL/main.c -index 7db59be4..99facf8d 100755 ---- a/SDL/main.c -+++ b/SDL/main.c -@@ -616,6 +616,9 @@ int main(int argc, char **argv) - if (filename == NULL) { - run_gui(false); - } -+ else { -+ connect_joypad(); -+ } - SDL_PauseAudioDevice(device_id, 0); - run(); // Never returns - return 0; diff --git a/games/SameBoy/libretro.patch b/games/SameBoy/libretro.patch new file mode 100644 index 0000000000..4159114ebd --- /dev/null +++ b/games/SameBoy/libretro.patch @@ -0,0 +1,55 @@ +From 597dc72e460f3e95caad40b8c557fb01f53f18ee Mon Sep 17 00:00:00 2001 +From: Lior Halphon <LIJI32@gmail.com> +Date: Thu, 18 Jul 2019 00:13:41 +0300 +Subject: [PATCH] Fix audio issues with some RetroArch audio drivers. Fixes + #189 + +--- + libretro/libretro.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/libretro/libretro.c b/libretro/libretro.c +index 1dd411c1..bd93e97a 100644 +--- a/libretro/libretro.c ++++ b/libretro/libretro.c +@@ -84,7 +84,7 @@ static struct retro_log_callback logging; + static retro_log_printf_t log_cb; + + static retro_video_refresh_t video_cb; +-static retro_audio_sample_batch_t audio_batch_cb; ++static retro_audio_sample_t audio_sample_cb; + static retro_input_poll_t input_poll_cb; + static retro_input_state_t input_state_cb; + +@@ -152,7 +152,7 @@ static void audio_callback(GB_gameboy_t *gb, GB_sample_t *sample) + { + if ((audio_out == GB_1 && gb == &gameboy[0]) || + (audio_out == GB_2 && gb == &gameboy[1])) { +- audio_batch_cb((void*)sample, 1); ++ audio_sample_cb(sample->left, sample->right); + } + } + +@@ -772,11 +772,11 @@ void retro_set_environment(retro_environment_t cb) + + void retro_set_audio_sample(retro_audio_sample_t cb) + { ++ audio_sample_cb = cb; + } + + void retro_set_audio_sample_batch(retro_audio_sample_batch_t cb) + { +- audio_batch_cb = cb; + } + + void retro_set_input_poll(retro_input_poll_t cb) +@@ -850,8 +850,7 @@ void retro_run(void) + } + else + { +- int x = GB_run_frame(&gameboy[0]); +- log_cb(RETRO_LOG_DEBUG, "%d\n", x); ++ GB_run_frame(&gameboy[0]); + } + + if (emulated_devices == 2) diff --git a/games/SameBoy/sdl.patch b/games/SameBoy/sdl.patch deleted file mode 100644 index 053a2a3747..0000000000 --- a/games/SameBoy/sdl.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 453673a2a653a45d8ee378ba5335f98df5e22efa Mon Sep 17 00:00:00 2001 -From: Lior Halphon <LIJI32@gmail.com> -Date: Sat, 10 Nov 2018 18:58:22 +0200 -Subject: [PATCH] Apply the SDL 2.0.6 audio workaround to everything except - Windows, check the linked version instead of the headers version. Fixes #130 - ---- - SDL/main.c | 38 ++++++++++++++++++++++---------------- - 1 file changed, 22 insertions(+), 16 deletions(-) - -diff --git a/SDL/main.c b/SDL/main.c -index c21a96f9..7db59be4 100755 ---- a/SDL/main.c -+++ b/SDL/main.c -@@ -559,25 +559,31 @@ int main(int argc, char **argv) - want_aspec.freq = AUDIO_FREQUENCY; - want_aspec.format = AUDIO_S16SYS; - want_aspec.channels = 2; --#if SDL_COMPILEDVERSION >= 2005 && defined(__APPLE__) -- /* SDL 2.0.5 on macOS introduced a bug where certain combinations of buffer lengths and frequencies -+ want_aspec.samples = 512; -+ -+ SDL_version _sdl_version; -+ SDL_GetVersion(&_sdl_version); -+ unsigned sdl_version = _sdl_version.major * 1000 + _sdl_version.minor * 100 + _sdl_version.patch; -+ -+#ifndef _WIN32 -+ /* SDL 2.0.5 on macOS and Linux introduced a bug where certain combinations of buffer lengths and frequencies - fail to produce audio correctly. */ -- want_aspec.samples = 2048; -+ if (sdl_version >= 2005) { -+ want_aspec.samples = 2048; -+ } - #else -- want_aspec.samples = 512; --#endif -- --#if SDL_COMPILEDVERSION >= 2006 && defined(_WIN32) -- /* SDL 2.0.6 offers WASAPI support which allows for much lower audio buffer lengths which at least -- theoretically reduces lagging. */ -- want_aspec.samples = 32; --#endif -- --#if SDL_COMPILEDVERSION <= 2005 && defined(_WIN32) -- /* Since WASAPI audio was introduced in SDL 2.0.6, we have to lower the audio frequency -- to 44100 because otherwise we would get garbled audio output.*/ -- want_aspec.freq = 44100; -+ if (sdl_version >= 2006) { -+ /* SDL 2.0.6 offers WASAPI support which allows for much lower audio buffer lengths which at least -+ theoretically reduces lagging. */ -+ want_aspec.samples = 32; -+ } -+ else { -+ /* Since WASAPI audio was introduced in SDL 2.0.6, we have to lower the audio frequency -+ to 44100 because otherwise we would get garbled audio output.*/ -+ want_aspec.freq = 44100; -+ } - #endif -+ - - want_aspec.callback = audio_callback; - want_aspec.userdata = &gb; diff --git a/games/SameBoy/sound.patch b/games/SameBoy/sound.patch deleted file mode 100644 index ce1a52a703..0000000000 --- a/games/SameBoy/sound.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 94136f5741b7484189af048830126c4bad04ac11 Mon Sep 17 00:00:00 2001 -From: Lior Halphon <LIJI32@gmail.com> -Date: Sat, 10 Nov 2018 19:14:18 +0200 -Subject: [PATCH] =?UTF-8?q?Adjust=20DAC=20attributes=20to=20fix=20LADX?= - =?UTF-8?q?=E2=80=99s=20crackling=20audio=20(Fixes=20#125)=20while=20keepi?= - =?UTF-8?q?ng=20Cannon=20Fodder=E2=80=99s=20buzzing=20reasonable=20(Proper?= - =?UTF-8?q?=20audio=20measurements=20still=20required)?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - ---- - Core/apu.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Core/apu.h b/Core/apu.h -index 01ca1321..ab42055b 100644 ---- a/Core/apu.h -+++ b/Core/apu.h -@@ -12,7 +12,7 @@ - They are known to be incorrect (Some analog test ROM sound different), - but are good enough approximations to fix Cannon Fodder's terrible audio. - It also varies by model. */ --#define DAC_DECAY_SPEED (1000000) -+#define DAC_DECAY_SPEED 50000 - #define DAC_ATTACK_SPEED 1000 |