Skip to content

Fix work() return value#11

Open
pterix wants to merge 1 commit intorigexpert:mainfrom
pterix:fix-work-return
Open

Fix work() return value#11
pterix wants to merge 1 commit intorigexpert:mainfrom
pterix:fix-work-return

Conversation

@pterix
Copy link

@pterix pterix commented Feb 9, 2026

work method always return noutput_items while streaming. But this is not always correct. The block produces no more samples than are left in the current receive buffer. The number of these samples may be less than noutput_items and when this happens, we see extra random samples in the output stream.

`work` method always return `noutput_items` while streaming. But this is not always correct. The block produces no more samples than are left in the current buffer. The number of these samples is sometimes less than noutput_items.

Return value is changed to the number of samples actually written to the output buffer.
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.

1 participant