librespot-org / librespot

Open Source Spotify client library
MIT License
4.7k stars 573 forks source link

Add Resampling Support #1180

Open JasonLG1979 opened 1 year ago

JasonLG1979 commented 1 year ago

This PR adds resampling to 48kHz, 88.2kHz, and 96kHz with Windowed Sinc Interpolation.

It also moves everything except decoding out of player and a few other misc improvements like improving thread creation in player, using #[default] in the player config enums where we can, and includes the sample pipeline latency in calculating an accurate position.