From a376bb5c9bcb22bbfaf765ba78c9e46fd13e257a Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Sun, 9 Feb 2025 14:31:19 +0200 Subject: [PATCH] Libretro audio device: Fix frame count --- include/audio/libretro_audio_device.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/audio/libretro_audio_device.hpp b/include/audio/libretro_audio_device.hpp index 047427ce..5b3a70c1 100644 --- a/include/audio/libretro_audio_device.hpp +++ b/include/audio/libretro_audio_device.hpp @@ -28,7 +28,8 @@ class LibretroAudioDevice : public AudioDeviceInterface { void renderBatch(RenderBatchCallback callback) override { if (running) { - static constexpr usize frameCount = 774; + static constexpr usize sampleRate = 32768; // 3DS samples per second + static constexpr usize frameCount = sampleRate / 60; // 3DS samples per video frame static constexpr usize channelCount = 2; static s16 audioBuffer[frameCount * channelCount]; @@ -57,4 +58,4 @@ class LibretroAudioDevice : public AudioDeviceInterface { } bool isInitialized() const { return initialized; } -}; \ No newline at end of file +};