Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lr-atari800: patch sound regression locally #3947

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scriptmodules/libretrocores/lr-atari800.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ rp_module_section="main"

function sources_lr-atari800() {
gitPullOrClone
applyPatch "$md_data/01_fix_audio_volume.diff"
}

function build_lr-atari800() {
Expand Down
35 changes: 35 additions & 0 deletions scriptmodules/libretrocores/lr-atari800/01_fix_audio_volume.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git a/libretro/core-mapper.c b/libretro/core-mapper.c
index 66de339..44a8b0f 100644
--- a/libretro/core-mapper.c
+++ b/libretro/core-mapper.c
@@ -26,7 +26,7 @@ unsigned long Ktime=0 , LastFPSTime=0;
#endif

//SOUND
-unsigned char SNDBUF[1024*2*2];
+short signed int SNDBUF[1024*2];
int snd_sampler_pal = 44100 / 50;
int snd_sampler_ntsc = 44100 / 60;

@@ -155,7 +155,7 @@ void retro_sound_update(void)

if (! UI_is_active)
{
- Sound_Callback(SNDBUF, 1024*2*2);
+ Sound_Callback((UBYTE *)SNDBUF, 1024*2*2);
for(x=0;x<stop*2;x+=2)
retro_audio_cb(SNDBUF[x],SNDBUF[x+2]);

diff --git a/libretro/libretro-core.c b/libretro/libretro-core.c
index aa3fed8..d65f345 100644
--- a/libretro/libretro-core.c
+++ b/libretro/libretro-core.c
@@ -135,7 +135,7 @@ extern int ToggleTV;
extern int CURRENT_TV;

extern int SHIFTON, pauseg, SND;
-extern unsigned char SNDBUF[];
+extern short signed int SNDBUF[1024 * 2];

char RPATH[512];
char RETRO_DIR[512];