Example usage for javax.sound.sampled Clip getMicrosecondPosition

List of usage examples for javax.sound.sampled Clip getMicrosecondPosition

Introduction

In this page you can find the example usage for javax.sound.sampled Clip getMicrosecondPosition.

Prototype

long getMicrosecondPosition();

Source Link

Document

Obtains the current position in the audio data, in microseconds.

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {

    DataLine.Info info = null;/*from  w w w.  j  ava  2  s . c om*/
    Clip clip = (Clip) AudioSystem.getLine(info);
    double timeInSeconds = clip.getMicrosecondPosition() / 1000000.0d;
}