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

20
LINES

< > BotCompany Repo | #1006995 // List Audio Devices [dev.]

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

Libraryless. Click here for Pure Java version (526L/4K/13K).

!7

import javax.sound.sampled.*;

p {
  Mixer.Info[] mixerInfo = AudioSystem.getMixerInfo();
 
  for (int i = 0; i < mixerInfo.length; i++) {
    print("Found device: " + quote(mixerInfo[i].getName()));
    Mixer mixer = AudioSystem.getMixer(mixerInfo[i]);
    for (Line.Info thisLineInfo : mixer.getSourceLineInfo()) {
      print("  Source line: " + thisLineInfo);
      print("  Line class: " + thisLineInfo.getLineClass());
    }
    for (Line.Info thisLineInfo : mixer.getTargetLineInfo()) {
      print("  Target line: " + thisLineInfo);
      print("  Line class: " + thisLineInfo.getLineClass());
    }
  }
}

Author comment

Began life as a copy of #1003204

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1006995
Snippet name: List Audio Devices [dev.]
Eternal ID of this version: #1006995/4
Text MD5: 5a6c649c48f058501c4bc4636817d2d3
Transpilation MD5: aed61d335e63ac65a807a9c5787a147a
Author: stefan
Category: javax / audio
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-02-24 17:10:14
Source code size: 636 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 392 / 451
Version history: 3 change(s)
Referenced in: [show references]