Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support reading more than 2^31 frames of audio at a time. #188

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

psobot
Copy link
Member

@psobot psobot commented Jan 10, 2023

When reading audio via pedalboard.io.AudioFile, reads of over 231 frames (2,147,483,648, or about 13 hours at 44.1kHz) cause cryptic errors due to integer overflow.

This PR fixes the issue by using long long, allowing for up to 263 frames to be read at once; enough to read 6.6 million years' worth of audio in a single read call. That ought to be enough for everyone.

@psobot psobot added the bug Something isn't working label Jan 10, 2023
@psobot psobot merged commit 8ef40be into master Jan 10, 2023
@psobot psobot deleted the psobot/support-massive-files branch January 10, 2023 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant