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

blocks/wavfile_source: fix case where we'll loop producing zero forever #7108

Closed

Conversation

marcusmueller
Copy link
Member

This required checking for actual return amount in-loop; also, do not assume that length of a file fits in an int; there's files longer than 2³¹.

Be clear about ignored sndfile errors.

Signed-off-by: Marcus Müller mmueller@gnuradio.org

Description

Related Issue

Fixes #6435

Which blocks/areas does this affect?

wavfile source

Testing Done

tests continue to pass, and the supplied example ogg that used to fail now finishes

Checklist

@drmpeg
Copy link
Member

drmpeg commented Feb 1, 2024

You have to update the pybind11 bindings for wavfile.h.

Also, since you're in here, maybe address #5971 ?

@willcode
Copy link
Member

willcode commented Feb 2, 2024

PyBind11 hash needs updating.

Looks good. The name s_items_size confused me for a minute, but that's not your code.

@marcusmueller
Copy link
Member Author

True, but I can still rename that if it's conductive to readability, while I'm at it

@marcusmueller marcusmueller marked this pull request as draft February 2, 2024 21:50
@marcusmueller
Copy link
Member Author

huh unit test failures I didn't see. wat.

This required checking for actual return amount in-loop; also, do not assume that length of a file fits in an int; there's files longer than 2³¹.

Be clear about ignored sndfile errors.

Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
Copy link
Member

@drmpeg drmpeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely broken. Plays for a second with garbled audio, then silence.

Test flow graph is just the wavfile source connected to the audio sink.

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

Successfully merging this pull request may close these issues.

Wav file source with libsndfile does not always terminate when done
4 participants