Examples of XBWave


Examples of org.xbup.library.audio.wave.XBWave

        return false;
//        return imageArea.isEditable();
    }

    public void loadFromFile() {
        XBWave wave = new XBWave();
        wave.loadFromFile(new File(getFileName()));
        wavePanel.setWave(wave);
        targetFormat = wavePanel.getWave().getAudioFormat();
        targetDataLineInfo = new DataLine.Info(SourceDataLine.class,wavePanel.getWave().getAudioFormat());
        audioInputStream = wavePanel.getWave().getAudioInputStream();
       
View Full Code Here

Examples of org.xbup.library.audio.wave.XBWave

//            textArea.setForeground(dlg.getMyColor());
        }
    }

    public String getCurrentPosition() {
        XBWave wave = wavePanel.getWave();
        if (wave == null) return "0:00.00";
        Point point = getMousePosition();
        if (point == null) point = new Point(scrollPane.getHorizontalScrollBar().getValue(),0);
        float sampleRate = wave.getAudioFormat().getSampleRate();
        float position = point.x / sampleRate;
        String sub = String.valueOf((long) ((position-Math.floor(position))*100));
        if (sub.length()<2) sub = "0" + sub;
        String sec = String.valueOf(((long) position) % 60);
        if (sec.length()<2) sec = "0" + sec;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.