More audio device

This commit is contained in:
wheremyfoodat 2025-02-09 04:40:12 +02:00
parent 98c1653b24
commit 2d85e79d12
2 changed files with 4 additions and 2 deletions

View file

@ -7,7 +7,9 @@
class AudioDeviceInterface {
protected:
using Samples = Common::RingBuffer<s16, 0x2000 * 2>;
static constexpr usize maxFrameCount = 0x2000;
using Samples = Common::RingBuffer<s16, maxFrameCount * 2>;
using RenderBatchCallback = usize (*)(const s16*, usize);
Samples* samples = nullptr;

View file

@ -28,7 +28,7 @@ class LibretroAudioDevice : public AudioDeviceInterface {
void renderBatch(RenderBatchCallback callback) override {
if (running) {
static constexpr int frameCount = 547;
static constexpr int frameCount = maxFrameCount;
static constexpr int channelCount = 2;
static s16 audioBuffer[frameCount * channelCount];