From db1e02521e5835059117c35abefe971f0861e7c5 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 26 Apr 2024 19:05:38 -0700 Subject: [PATCH] GBA Core: Fix audio sample rate dynamically changing (fixes #3194) --- src/gba/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gba/core.c b/src/gba/core.c index 47da3a0e0..3d874dfe3 100644 --- a/src/gba/core.c +++ b/src/gba/core.c @@ -554,8 +554,8 @@ static void _GBACorePutPixels(struct mCore* core, const void* buffer, size_t str } static unsigned _GBACoreAudioSampleRate(const struct mCore* core) { - UNUSED(core); - return 65536; + struct GBA* gba = core->board; + return GBA_ARM7TDMI_FREQUENCY / gba->audio.sampleInterval; } static struct mAudioBuffer* _GBACoreGetAudioBuffer(struct mCore* core) {