Libraryless. Click here for Pure Java version (14917L/103K).
1 | !7 |
2 | |
3 | module TransmitAudio > DynPrintLog { |
4 | S sendTo; |
5 | bool enabled; |
6 | transient Q q; |
7 | |
8 | start { |
9 | q = dm_startQ(); |
10 | dm_addAudioListener(voidfunc(short[] data) { |
11 | if (!enabled || !possibleComputerID(sendTo)) ret; |
12 | final byte[] bytes = byteArrayFromShorts_littleEndian(data); |
13 | q.add(r { |
14 | dm_privateChat_send(sendTo, "audio:" + base64(bytes)); |
15 | }); |
16 | }); |
17 | } |
18 | |
19 | visualize { |
20 | ret centerAndSouthWithMargins(super.visualize(), |
21 | centerAndEast(withLabel("Send to:", dm_fieldTextField('sendTo)), |
22 | dm_fieldCheckBox('enabled))); |
23 | } |
24 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019650 |
Snippet name: | Send Audio Input To Other Machine |
Eternal ID of this version: | #1019650/5 |
Text MD5: | d9505c005d4c528141c00b78680ff300 |
Transpilation MD5: | 89cbb2f5448cb3ace47b483f50f29dfe |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-11-16 03:23:07 |
Source code size: | 600 bytes / 24 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 318 / 446 |
Version history: | 4 change(s) |
Referenced in: | [show references] |