Skip to content

creating blocksize length output array in blocks reading if fill_value is set regardless of frames in file - #457

Merged
bastibe merged 1 commit into
bastibe:masterfrom
illesguy:fix-fill-value-ignored-when-blocksize-longer-than-file
Jan 19, 2025
Merged

bastibe merged 1 commit into
bastibe:masterfrom
illesguy:fix-fill-value-ignored-when-blocksize-longer-than-file

Conversation

@illesguy

@illesguy illesguy commented Jan 15, 2025 •

Copy link
Copy Markdown
Contributor

In a previous PR fixing blocks reading for files shorter than the specified blocksize, a regression was introduced resulting that even if the fill_value was specified, at most as many frames were read as the file had instead of the blocksize with the padding used. In this PR we add a fix so that if the fill_value is specified (and the output array is not), we will create an output array of blocksize regardless if the file doesn't have as many frames. Also added more unit tests to cover all these cases.

The regression mentioned above is part of version 0.13.0 of soundfile. Suggestion is to create a new version 0.13.1 with this fix included.

@bastibe

bastibe commented Jan 19, 2025

Copy link
Copy Markdown
Owner

Thank you very much for promptly fixing this regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants