Class LoopTrack
- java.lang.Object
-
- ch.sahits.game.openpatrician.sound.impl.LoopTrack
-
- All Implemented Interfaces:
IPlayableTrack
public class LoopTrack extends java.lang.Object implements IPlayableTrack
LoopTrack represents a track that can be looped.- Author:
- Andi Hotz, (c) Sahits GmbH, 2015 Created on Jun 17, 2015
-
-
Constructor Summary
Constructors Constructor Description LoopTrack(double length, java.lang.String fileUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getLength()
Retrieve the length of the track in secondsvoid
play()
Start playing the track.javafx.beans.property.ReadOnlyBooleanProperty
playingProperty()
Property indicating if the track is playing.void
stop()
Stop playing the track.
-
-
-
Method Detail
-
getLength
public double getLength()
Description copied from interface:IPlayableTrack
Retrieve the length of the track in seconds- Specified by:
getLength
in interfaceIPlayableTrack
- Returns:
- length of the track in seconds
-
play
public void play()
Description copied from interface:IPlayableTrack
Start playing the track.- Specified by:
play
in interfaceIPlayableTrack
-
stop
public void stop()
Description copied from interface:IPlayableTrack
Stop playing the track.- Specified by:
stop
in interfaceIPlayableTrack
-
playingProperty
public javafx.beans.property.ReadOnlyBooleanProperty playingProperty()
Description copied from interface:IPlayableTrack
Property indicating if the track is playing.- Specified by:
playingProperty
in interfaceIPlayableTrack
- Returns:
- boolean property indicating if the track is currently playing.
-
-