Libretro audio device: Fix frame count

This commit is contained in:
wheremyfoodat
2025-02-09 14:31:19 +02:00
committed by GitHub
parent 042ab6de03
commit a376bb5c9b

View File

@@ -28,7 +28,8 @@ class LibretroAudioDevice : public AudioDeviceInterface {
void renderBatch(RenderBatchCallback callback) override { void renderBatch(RenderBatchCallback callback) override {
if (running) { 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 constexpr usize channelCount = 2;
static s16 audioBuffer[frameCount * channelCount]; static s16 audioBuffer[frameCount * channelCount];
@@ -57,4 +58,4 @@ class LibretroAudioDevice : public AudioDeviceInterface {
} }
bool isInitialized() const { return initialized; } bool isInitialized() const { return initialized; }
}; };