spotify / pedalboard

🎛 🔊 A Python library for audio.
https://spotify.github.io/pedalboard
GNU General Public License v3.0
5.23k stars 262 forks source link

Fix empty sample buffers returned when seeking FLAC files. #173

Closed psobot closed 1 year ago

psobot commented 1 year ago

Fixes #170.

See https://github.com/juce-framework/JUCE/issues/1157 for the root cause. This PR vendors the juce::FlacAudioFormat classes to manually patch out two lines of code that were causing the issue.

A nearby bug was also fixed: if reading a PythonInputStream to its end, all subsequent calls to PythonInputStream::isExhausted would continue to return true, even if that stream had been seeked back to an earlier point.