Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

reduce CPU load? #4

Open
hayguen opened this issue May 3, 2020 · 3 comments
Open

reduce CPU load? #4

hayguen opened this issue May 3, 2020 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@hayguen
Copy link
Contributor

hayguen commented May 3, 2020

CPU load on Raspberry Pi 3B+ and 4B is around 70% or a bit below.
a friend reported CPU load of 1 core just below 80% on Raspberry Pi 3B - without the "+".

i noticed fractional interpolations factor for both 44.1 kHz and 48.0 kHz input.
is it possible to reduce the CPU load? - probably by using non-fractional interpolations somwhow?

@Anthony96922
Copy link
Owner

Due to RDS encoder's design, this runs internally at a sample rate of 228 kHz. I don't know how this would be rewritten to run at 192 kHz.

@Anthony96922 Anthony96922 added the help wanted Extra attention is needed label Jul 18, 2020
@Anthony96922
Copy link
Owner

The high CPU load is because both interpolations run on a single thread. Maybe someone can implement threading.

@Anthony96922 Anthony96922 added the enhancement New feature or request label Aug 23, 2020
@Anthony96922
Copy link
Owner

I've rewritten much of the code so it uses threading. I've also implemented a resampler for the RDS encoder so the MPX signal path runs at 192 kHz. This means integer interpolation is used for 48 kHz audio. The new code isn't finished yet, but should hopefully speed things up and reduce CPU usage. Please see the pthread branch for the changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants