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

17
LINES

< > BotCompany Repo | #1009758 // Audio Recorder [dev.]

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

Download Jar. Libraryless. Click here for Pure Java version (453L/4K).

1  
!7
2  
3  
static int bufferSize = 40960;
4  
static new Flag stopFlag;
5  
6  
p {
7  
  TargetDataLine line = javaSound_recordLine(javaSound_cdQuality°, bufferSize);
8  
  
9  
  byte[] buf = new byte[bufferSize];
10  
  line.start();
11  
  
12  
  while (licensed() && !stopFlag.isUp()) {
13  
    int n = line.read(buf, 0, bufferSize);
14  
    print("Got " + n + " bytes");
15  
    if (n == 0) break;
16  
  }
17  
}

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: #1009758
Snippet name: Audio Recorder [dev.]
Eternal ID of this version: #1009758/4
Text MD5: a45baeff09f623c9f05b928a6a964a6f
Transpilation MD5: 957c5c38ced8e1bc1fb02ca7f1ffefd5
Author: stefan
Category: javax / sound
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-16 03:05:20
Source code size: 370 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 479 / 887
Version history: 3 change(s)
Referenced in: [show references]