Example usage for javax.sound.midi MidiDevice getMicrosecondPosition

List of usage examples for javax.sound.midi MidiDevice getMicrosecondPosition

Introduction

In this page you can find the example usage for javax.sound.midi MidiDevice getMicrosecondPosition.

Prototype

long getMicrosecondPosition();

Source Link

Document

Obtains the current time-stamp of the device, in microseconds.

Usage

From source file:de.ailis.midi4js.Midi4JS.java

/**
 * Returns the current timestamp of the device.
 *
 * @param deviceHandle/*from  ww  w  .j a  v  a2  s .  c  om*/
 *            The device handle.
 * @return The current timestamp of the device.
 */
public long getMidiDeviceMicrosecondPosition(final int deviceHandle) {
    final MidiDevice device = resolveDeviceHandle(deviceHandle);
    return device.getMicrosecondPosition();
}