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) 

Source Link

Document

Play the AudioClip using all the default parameters except volume.

Usage

From source file:org.sociotech.unui.javafx.engine2d.AbstractWorld.java

public void playAudioClip(String audioClipName, double volume) {
    // Play Audio
    ResourceManager<AudioClip> audioResourceManager = getAudioResourceManager();
    AudioClip audioClip = audioResourceManager.get(audioClipName);
    if (audioClip != null) {
        audioClip.play(volume);
    }/* w w  w  .j ava  2  s  . co m*/
}