GBA Core: Fix audio sample rate dynamically changing (fixes #3194)

This commit is contained in:
Vicki Pfau 2024-04-26 19:05:38 -07:00
parent aae9c502f0
commit db1e02521e
1 changed files with 2 additions and 2 deletions

View File

@ -554,8 +554,8 @@ static void _GBACorePutPixels(struct mCore* core, const void* buffer, size_t str
} }
static unsigned _GBACoreAudioSampleRate(const struct mCore* core) { static unsigned _GBACoreAudioSampleRate(const struct mCore* core) {
UNUSED(core); struct GBA* gba = core->board;
return 65536; return GBA_ARM7TDMI_FREQUENCY / gba->audio.sampleInterval;
} }
static struct mAudioBuffer* _GBACoreGetAudioBuffer(struct mCore* core) { static struct mAudioBuffer* _GBACoreGetAudioBuffer(struct mCore* core) {