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

Apply low-pass filter when down-sampling to avoid aliasing #155

Open
angerhang opened this issue May 6, 2021 · 1 comment
Open

Apply low-pass filter when down-sampling to avoid aliasing #155

angerhang opened this issue May 6, 2021 · 1 comment

Comments

@angerhang
Copy link
Member

No description provided.

@chanshing
Copy link
Member

chanshing commented May 6, 2021

Just to add a bit more clarification: As Dan said, the current resampling implementation is really not intended for resampling to arbitrary rates, but just to correct the configured sampling rate of the device (so if configured at 100Hz, use 100Hz). The resampling is doing simple linear/nearest interpolation, which is not great when say downsampling by a factor of 2 and beyond without antialiasing filters.
Because we ask users to supply the sample rate, it is misleading because gives the impression that we support arbitrary downsampling/upsampling. Looking at the code, I think there's nothing preventing us to just grab the configured sampling rate from the device metadata/headers instead of asking the user (or we can support actual downsampling/upsampling with proper filtering).

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

No branches or pull requests

2 participants