Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

24
LINES

< > BotCompany Repo | #1019650 // Send Audio Input To Other Machine

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Libraryless. Click here for Pure Java version (14917L/103K).

!7

module TransmitAudio > DynPrintLog {
  S sendTo;
  bool enabled;
  transient Q q;
  
  start {
    q = dm_startQ();
    dm_addAudioListener(voidfunc(short[] data) {
      if (!enabled || !possibleComputerID(sendTo)) ret;
      final byte[] bytes = byteArrayFromShorts_littleEndian(data);
      q.add(r {
        dm_privateChat_send(sendTo, "audio:" + base64(bytes));
      });
    });
  }
  
  visualize {
    ret centerAndSouthWithMargins(super.visualize(),
      centerAndEast(withLabel("Send to:", dm_fieldTextField('sendTo)),
        dm_fieldCheckBox('enabled)));
  }
}

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: 215 / 339
Version history: 4 change(s)
Referenced in: [show references]