Example usage for javafx.scene.media AudioClip play

List of usage examples for javafx.scene.media AudioClip play

Introduction

In this page you can find the example usage for javafx.scene.media AudioClip play.

Prototype

public void play(double volume, double balance, double rate, double pan, int priority) 

Source Link

Document

Play the AudioClip using the given parameters.

Usage

From source file:Main.java

private EventHandler<ActionEvent> createPlayHandler(final AudioClip clip) {
    return new EventHandler<ActionEvent>() {
        @Override/* w  w  w. j av  a  2  s  .  c  om*/
        public void handle(ActionEvent event) {
            clip.play(volumeSlider.getValue(), balanceSlider.getValue(), rateSlider.getValue(), 0, 0);
        }
    };
}