Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void displayMixerInfo() {
- Mixer.Info[] mixersInfo = AudioSystem.getMixerInfo();
- for (Mixer.Info mixerInfo : mixersInfo) {
- System.out.println("Mixer: " + mixerInfo.getName());
- Mixer mixer = AudioSystem.getMixer(mixerInfo);
- Line.Info[] sourceLineInfo = mixer.getSourceLineInfo();
- for (Line.Info info : sourceLineInfo)
- showLineInfo(info);
- Line.Info[] targetLineInfo = mixer.getTargetLineInfo();
- for (Line.Info info : targetLineInfo)
- showLineInfo(info);
- }
- }
- private static void showLineInfo(final Line.Info lineInfo) {
- System.out.println(" " + lineInfo.toString());
- if (lineInfo instanceof DataLine.Info) {
- DataLine.Info dataLineInfo = (DataLine.Info) lineInfo;
- AudioFormat[] formats = dataLineInfo.getFormats();
- for (final AudioFormat format : formats)
- System.out.println(" " + format.toString());
- }
- }
- displayMixerInfo();
- //Displays:
- // Mixer: Primary Sound Driver
- // interface SourceDataLine supporting 8 audio formats, and buffers of at least 32 bytes
- // PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
- // PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
- // interface Clip supporting 8 audio formats, and buffers of at least 32 bytes
- // PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
- // PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
- // Mixer: Speakers (High Definition Audio Device)
- // interface SourceDataLine supporting 8 audio formats, and buffers of at least 32 bytes
- // PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
- // PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
- // interface Clip supporting 8 audio formats, and buffers of at least 32 bytes
- // PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
- // PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
- // Mixer: Digital Audio (S/PDIF) (High Definition Audio Device)
- // interface SourceDataLine supporting 8 audio formats, and buffers of at least 32 bytes
- // PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
- // PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
- // interface Clip supporting 8 audio formats, and buffers of at least 32 bytes
- // PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
- // PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
- // Mixer: Digital Audio (S/PDIF) (High Definition Audio Device)
- // interface SourceDataLine supporting 8 audio formats, and buffers of at least 32 bytes
- // PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
- // PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
- // interface Clip supporting 8 audio formats, and buffers of at least 32 bytes
- // PCM_UNSIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, mono, 1 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, mono, 2 bytes/frame, big-endian
- // PCM_UNSIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 8 bit, stereo, 2 bytes/frame,
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, little-endian
- // PCM_SIGNED unknown sample rate, 16 bit, stereo, 4 bytes/frame, big-endian
- // Mixer: Port Speakers (High Definition Audio
- // SPEAKER target port
- // Mixer: Port Digital Audio (S/PDIF) (High De
- // Master Volume target port
- // Mixer: Port Digital Audio (S/PDIF) (High De
- // Master Volume target port
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement