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

27
LINES

< > BotCompany Repo | #1009287 // Echo! [shortened]

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (345L/3K/10K).

1  
!7
2  
3  
// Original source: AudioLoop from jsresources.org
4  
5  
static int DEFAULT_INTERNAL_BUFSIZ = 40960, DEFAULT_EXTERNAL_BUFSIZ = 40960;
6  
static S mixerName;
7  
8  
p {
9  
  new AudioLoop(javaSound_cdQuality°, DEFAULT_INTERNAL_BUFSIZ, DEFAULT_EXTERNAL_BUFSIZ, mixerName).start°;
10  
}
11  
12  
sclass AudioLoop extends Thread {
13  
  TargetDataLine in;
14  
  SourceDataLine out;
15  
  new Flag stopFlag;
16  
  int externalBufferSize;
17  
  
18  
  *(AudioFormat format, int internalBufferSize, int *externalBufferSize, S mixerName) {
19  
    Pair<TargetDataLine, SourceDataLine> p = javaSound_bothLines(mixerName, format, internalBufferSize);
20  
    in = p.a; out = p.b;
21  
  }
22  
  
23  
  public void start { in.start°; out.start°; super.start°; }
24  
  void stopRecording { in.stop°; out.close°; stopFlag.raise°; } // "stop()" was taken
25  
26  
  public void run° { javaSound_streamFromLineToLine(in, out, externalBufferSize, stopFlag); }
27  
}

Author comment

Began life as a copy of #1009283

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1009287
Snippet name: Echo! [shortened]
Eternal ID of this version: #1009287/24
Text MD5: 2a5747b94e30caa0a3af8b053c3d0d9e
Transpilation MD5: 96bf78e912b34f4db97dc59278b6532b
Author: stefan
Category: javax / sound
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-07-21 05:42:24
Source code size: 898 bytes / 27 lines
Pitched / IR pitched: No / No
Views / Downloads: 440 / 574
Version history: 23 change(s)
Referenced in: [show references]