hinto-janai / festival

Music player
https://festival.pm
MIT License
279 stars 7 forks source link

resampler: resize output buf instead of interleaved sample buf #77

Closed hinto-janai closed 1 year ago

hinto-janai commented 1 year ago

Sometimes, the interleaved sample buffer after resampling ends up being a few samples longer than channel_count * samples_in_channel for... reasons unknown.

Before, the fix to make sure indexing panics didn't happen was to shorten the interleaved buffer so it wouldn't overflow.

Now, the output buffer is extended such that it can fit these mysterious extra samples.