Download Jar. Libraryless. Click here for Pure Java version (7088L/50K).
1 | !7 |
2 | |
3 | import javax.sound.sampled.*; |
4 | |
5 | p-exp { |
6 | for (Mixer.Info thisMixerInfo : AudioSystem.getMixerInfo()) { |
7 | print("Mixer: "+thisMixerInfo.getDescription() + " ["+thisMixerInfo.getName()+"]"); |
8 | Mixer thisMixer = AudioSystem.getMixer(thisMixerInfo); |
9 | for (Line.Info thisLineInfo:thisMixer.getSourceLineInfo()) { |
10 | if (thisLineInfo.getLineClass().getName().equals("javax.sound.sampled.Port")) { |
11 | Line thisLine = thisMixer.getLine(thisLineInfo); |
12 | thisLine.open(); |
13 | print(" Line type: " + thisLine); |
14 | print(" Source Port: " + thisLineInfo); |
15 | for (Control thisControl : thisLine.getControls()) |
16 | print("Have control: " + thisControl); |
17 | thisLine.close(); |
18 | } |
19 | } |
20 | |
21 | for (Line.Info thisLineInfo:thisMixer.getTargetLineInfo()) { |
22 | if (thisLineInfo.getLineClass().getName().equals("javax.sound.sampled.Port")) { |
23 | Line thisLine = thisMixer.getLine(thisLineInfo); |
24 | thisLine.open(); |
25 | print(" Target Port: " + thisLineInfo); |
26 | for (Control thisControl : thisLine.getControls()) |
27 | print("Have control: " + thisControl); |
28 | thisLine.close(); |
29 | } |
30 | } |
31 | } |
32 | } |
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, snaazhdonpnp, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1027000 |
Snippet name: | JavaSound: List lines |
Eternal ID of this version: | #1027000/8 |
Text MD5: | 4d2ecc8c4d55ed0d045175da69348135 |
Transpilation MD5: | 889f2e779338e7e379bfd89a3db6fe63 |
Author: | stefan |
Category: | javax / audio |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-02-06 14:28:37 |
Source code size: | 1198 bytes / 32 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 381 / 1136 |
Version history: | 7 change(s) |
Referenced in: | [show references] |