Skurdt / SK.Libretro

Libretro wrapper written in C# with support for the Unity game engine
MIT License
28 stars 13 forks source link

attempt to improve crackling in audio #18

Closed XenuIsWatching closed 2 months ago

XenuIsWatching commented 1 year ago

the issue here was that the destination buffer was using the same length as the source buffer and the destination buffer needs to be longer or shorter based on ratio between the input and output sample rates. This is still not a perfect solution and needs to be revisited for further improvement. [Draft PR for now]

Fixes #6

Skurdt commented 6 months ago

I reworked some of the audio processing. The job used before did do the resampling, or at least tried... Audio stuff is not really something I understand fully. The current state of the unity AudioProcessor do seem to work alright now. I used a unity provided container instead of a custom CircularBuffer class, but also removed/skipped the existing NativeArray used for the samples processing (avoiding copies I guess...).