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

infinite loop on Android / Termux #4

Open
voepiter opened this issue Jan 2, 2025 · 0 comments
Open

infinite loop on Android / Termux #4

voepiter opened this issue Jan 2, 2025 · 0 comments

Comments

@voepiter
Copy link
Contributor

voepiter commented Jan 2, 2025

running CBAE on Android \ Termux results in an infinite loop after showing number of tracks to encode

after some debugging I found out this happens because
encoding task running with 0 number of threads defined by DEF_THREADS.
os.cpus() function not working properly on Android.
more details here : nodejs/node#19022

it can be fixed by changing cbae.js line 40 to
const DEF_THREADS = (Math.ceil(cpus().length * 0.75)) || 1;

alternative workaround is running cbae with -p option, but it's not very obvious and i only found it after debugging.

created pull request (merged #5)

anyway, it's a great tool , thanks to the author.

my system
Samsung Galaxy Tab S9
Android 14 / Termux 0.118.1
node.js v23.5.0

voepiter added a commit to voepiter/cbae that referenced this issue Jan 3, 2025
caused by number of encoding threads DEF_THREADS=0
because node.js os.cpus().length not returning number
of cpu cores on Android / Termux
Issue john32b#4
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

No branches or pull requests

1 participant