Libraryless. Click here for Pure Java version (1976L/13K).
static int linux_rawHeadphonesCount() { int n = 0; for (File dir : listDirsStartingWith("/proc/asound", "card")) n += l(startingWithAfterLtrim(linesFromFile(newFile(dir, "codec#0")), "Pin-ctls: 0x00")); ret n; }
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020333 |
Snippet name: | linux_rawHeadphonesCount - may be off by a constant |
Eternal ID of this version: | #1020333/3 |
Text MD5: | 856a1b6dd8a405e7798a0d3b742eb1ec |
Transpilation MD5: | 970a3284af19fd363347604af15e7b9e |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-14 18:05:34 |
Source code size: | 226 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 287 / 382 |
Version history: | 2 change(s) |
Referenced in: | [show references] |