Skip to content

Conversation

ANogin
Copy link

@ANogin ANogin commented Aug 8, 2025

Currently, the data_samples are always of the requested length, regardless of the number of samples actually recorded. If recording is stopped early (e.g if the user callback returns false early), then the returned data_samples will have extra junk (0s?) at the beginning. This change makes sure to only keep the actual length of samples.

@ANogin
Copy link
Author

ANogin commented Aug 8, 2025

Not 100% sure this is the best, but it probably is. Also as this (by necessity) resets self._total_samples to 0, should it be doing the same to self._lost_samples and self._corrupted_samples?

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