Uses 911K of libraries. Click here for Pure Java version (4884L/27K).
1 | !7 |
2 | |
3 | srecord RecordingProgram( |
4 | S processID, |
5 | S applicationName, |
6 | S sourceName, |
7 | int sourceIndex, |
8 | int index |
9 | ) {} |
10 | |
11 | cmodule ListRecordingPrograms > DynObjectTable<RecordingProgram> { |
12 | start { |
13 | set fieldsInOrder; |
14 | dontPersist(); |
15 | doEvery(0.0, 10.0, r updateList); |
16 | } |
17 | |
18 | void updateList enter { |
19 | LS parts = withoutEmptyAfterTrims(splitByZeroIndent(backtick("pactl list source-outputs"))); |
20 | new L<RecordingProgram> list; |
21 | |
22 | for (S part : parts) { |
23 | int idx = parseFirstInt(part); |
24 | SS properties1 = parseColonProperties(part); |
25 | SS properties2 = parseEqualsProperties(part); |
26 | int sourceIndex = parseIntOrMinus1(properties1.get("Source")); |
27 | S sourceName = cast dm_findAndCallModule("#1020375/ListAudioSources", 'getSourceName, sourceIndex); |
28 | list.add(nu(RecordingProgram, |
29 | index := idx, |
30 | applicationName := unquote(properties2.get("application.name")), |
31 | processID := unquote(properties2.get("application.process.id")), |
32 | +sourceIndex, +sourceName)); |
33 | } |
34 | setData(list); |
35 | } |
36 | |
37 | visualize { |
38 | JComponent c = super.visualize(); |
39 | ret centerAndEastWithMargins(c, vstackWithSpacing(jlabel("Buttons go here"))); |
40 | } |
41 | } |
Began life as a copy of #1020375
download show line numbers debug dex old transpilations
Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1020410 |
Snippet name: | List Recording Programs [Linux, Pulse Audio, dev.] |
Eternal ID of this version: | #1020410/14 |
Text MD5: | d987b9aca2adf82d317d0ff989ac4e39 |
Transpilation MD5: | 6140e96b0c9f0800b615eaaa96cd2057 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-02-17 13:27:06 |
Source code size: | 1240 bytes / 41 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 362 / 12983 |
Version history: | 13 change(s) |
Referenced in: | [show references] |