Code example for SourceDataLine

Methods: drain

0
        return b;
    } 
 
    protected void flushImpl() { 
        if (source != null) {
            source.drain();
        } 
    } 
 
    public int getPosition() { 
        int pos = 0;
        if (source != null) {
            pos = (int) (source.getMicrosecondPosition() / 1000);
        } 
        return pos;
    } 
 
    public void setLineGain(float gain) {
        if (source != null) {
            if (source.isControlSupported(FloatControl.Type.MASTER_GAIN)) {
Experience pair programming with AI  Get Codota for Java