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

12
LINES

< > BotCompany Repo | #1017155 // dm_addAudioListener

JavaX fragment (include)

import static x30_pkg.x30_util.VF1;

sbool dm_addAudioListener(VF1<short[]> audioListener) {
  fO mod = dm_audioInputModule();
  if (mod == null) ret false with print("Audio Input module not found");
  call(dm_getModule(mod), 'addAudioListener, audioListener);
  final WeakReference<VF1<short[]>> ref = weakRef(audioListener);
  dm_opt_ownTimer(audioListener, voidfunc(VF1<short[]> audioListener) {
    dm_removeAudioListener(ref!)
  });
  true;
}

Author comment

Began life as a copy of #1016709

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1017155
Snippet name: dm_addAudioListener
Eternal ID of this version: #1017155/5
Text MD5: 0930e8a6bd0cc648f88af79ca2cec1e3
Author: stefan
Category: javax / audio
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-31 19:26:44
Source code size: 458 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 452 / 510
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1019321 - dm_recordSingleAudioChunk
#1019323 - dm_removeAudioListener