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

[Linux] RMS ring buffer producing non-silent values when only silence has been inserted. #53

Open
mitchmindtree opened this issue Feb 16, 2018 · 0 comments
Labels

Comments

@mitchmindtree
Copy link
Member

It looks like this might only be happening while testing on linux due to ALSA's need for exclusive access to the current audio output device, however writing this up just for the record.

Was able to confirm using assert!ions at the beginning of sample::Rms::next, so the issue is definitely not due to non-silent values sneaking into the buffer some how. Current theory is that some kind of undefined behaviour within the cpal ALSA backend is either 1. corrupting the stack somehow and causing the EnvDetector's RMS window pointer to point to something else or 2. causing some pointer to write over the RMS window's region of memory.

If that's not the case, then there must be some bug in the sample::ring_buffer implementation, however even when removing all unsafe code from the ring_buffer implementation this bug still occurs.

@mitchmindtree mitchmindtree changed the title RMS ring buffer producing non-silent values when only silence has been inserted [Linux] RMS ring buffer producing non-silent values when only silence has been inserted. Mar 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant