javax.sound.sampled.Control.Type Java Examples

The following examples show how to use javax.sound.sampled.Control.Type. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SoftMixingDataLine.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
 
Example #2
Source File: SoftMixingDataLine.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
 
Example #3
Source File: SoftMixingDataLine.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
 
Example #4
Source File: SoftMixingDataLine.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
@Override
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
 
Example #5
Source File: SoftMixingDataLine.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
 
Example #6
Source File: SoftMixingDataLine.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
 
Example #7
Source File: SoftMixingDataLine.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
 
Example #8
Source File: SoftMixingDataLine.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
 
Example #9
Source File: SoftMixingDataLine.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
 
Example #10
Source File: SoftMixingDataLine.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public final Control getControl(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return controls[i];
            }
        }
    }
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
 
Example #11
Source File: SoftMixingDataLine.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public final boolean isControlSupported(Type control) {
    if (control != null) {
        for (int i = 0; i < controls.length; i++) {
            if (controls[i].getType() == control) {
                return true;
            }
        }
    }
    return false;
}
 
Example #12
Source File: DummySourceDataLine.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Control getControl(Type control) {
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
 
Example #13
Source File: DummySourceDataLine.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public boolean isControlSupported(Type control) {
    return false;
}
 
Example #14
Source File: SoftMixingMixer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public void close() {
    if (!isOpen())
        return;

    sendEvent(new LineEvent(this, LineEvent.Type.CLOSE,
            AudioSystem.NOT_SPECIFIED));

    SoftAudioPusher pusher_to_be_closed = null;
    AudioInputStream pusher_stream_to_be_closed = null;
    synchronized (control_mutex) {
        if (pusher != null) {
            pusher_to_be_closed = pusher;
            pusher_stream_to_be_closed = pusher_stream;
            pusher = null;
            pusher_stream = null;
        }
    }

    if (pusher_to_be_closed != null) {
        // Pusher must not be closed synchronized against control_mutex
        // this may result in synchronized conflict between pusher and
        // current thread.
        pusher_to_be_closed.stop();

        try {
            pusher_stream_to_be_closed.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    synchronized (control_mutex) {

        if (mainmixer != null)
            mainmixer.close();
        open = false;

        if (sourceDataLine != null) {
            sourceDataLine.drain();
            sourceDataLine.close();
            sourceDataLine = null;
        }

    }

}
 
Example #15
Source File: SoftMixingMixer.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public boolean isControlSupported(Type control) {
    return false;
}
 
Example #16
Source File: SoftMixingMixer.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Control getControl(Type control) {
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
 
Example #17
Source File: DummySourceDataLine.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Control getControl(Type control) {
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
 
Example #18
Source File: SoftMixingMixer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Control getControl(Type control) {
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
 
Example #19
Source File: DummySourceDataLine.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Control getControl(Type control) {
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
 
Example #20
Source File: SoftMixingMixer.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isControlSupported(Type control) {
    return false;
}
 
Example #21
Source File: SoftMixingDataLine.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
private Gain() {

            super(FloatControl.Type.MASTER_GAIN, -80f, 6.0206f, 80f / 128.0f,
                    -1, 0.0f, "dB", "Minimum", "", "Maximum");
        }
 
Example #22
Source File: SoftMixingDataLine.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private Pan() {
    super(FloatControl.Type.PAN, -1.0f, 1.0f, (1.0f / 128.0f), -1,
            0.0f, "", "Left", "Center", "Right");
}
 
Example #23
Source File: SoftMixingDataLine.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private Pan() {
    super(FloatControl.Type.PAN, -1.0f, 1.0f, (1.0f / 128.0f), -1,
            0.0f, "", "Left", "Center", "Right");
}
 
Example #24
Source File: SoftMixingDataLine.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private ApplyReverb() {
    super(BooleanControl.Type.APPLY_REVERB, false, "True", "False");
}
 
Example #25
Source File: SoftMixingDataLine.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private Mute() {
    super(BooleanControl.Type.MUTE, false, "True", "False");
}
 
Example #26
Source File: SoftMixingDataLine.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private Gain() {

            super(FloatControl.Type.MASTER_GAIN, -80f, 6.0206f, 80f / 128.0f,
                    -1, 0.0f, "dB", "Minimum", "", "Maximum");
        }
 
Example #27
Source File: DummySourceDataLine.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public boolean isControlSupported(Type control) {
    return false;
}
 
Example #28
Source File: DummySourceDataLine.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Control getControl(Type control) {
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}
 
Example #29
Source File: DummySourceDataLine.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public boolean isControlSupported(Type control) {
    return false;
}
 
Example #30
Source File: DummySourceDataLine.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Control getControl(Type control) {
    throw new IllegalArgumentException("Unsupported control type : "
            + control);
}