raylib-libretro icon indicating copy to clipboard operation
raylib-libretro copied to clipboard

Attempt to smooth out the audio...

Open RobLoach opened this issue 5 years ago • 2 comments

@raysan5 Here's a video of what the updated audio buffer code sounds like....

https://files.robloach.net/s/iafD95PLonBgJpL/download

RobLoach avatar Jul 11 '20 00:07 RobLoach

@RobLoach I see, I had this same issue before... could you try increasing bufferSize instead of 60? I think samples are consumed before the next frame is called for refilling, so the choppy sound... but probably you should provide more audio frames for refilling, like twice the provided ones

raysan5 avatar Jul 11 '20 11:07 raysan5

Didn't help, unfortunately. Played around with a bunch of different sizes for the buffer, and it still resulted in choppy sounds.... I think the best would be an internal buffer, along with a way to make Raylib queue from the internal buffer. Not quite sure how to accomplish that though...

In SDL, it's SDL_QueueAudio().

RobLoach avatar Jul 12 '20 20:07 RobLoach