Music¶
-
php\gdx\audio\Music
Class Music
Methods
__construct
()¶private
play
()¶
pause
()¶
stop
()¶
isPlaying
()¶
Returns: bool whether this music stream is playing
setLooping
($isLooping)¶
Parameters:
- $isLooping – bool
isLooping
()¶
Returns: bool
setVolume
($volume)¶
Parameters:
- $volume – double
getVolume
()¶
Returns: double
setPan
($pan, $volume)¶Sets the panning and volume of this music stream.
Parameters:
- $pan – double - panning in the range -1 (full left) to 1 (full right). 0 is center position.
- $volume – double
getPosition
()¶Returns the playback position in milliseconds.
Returns: double
dispose
()¶
setOnCompletionListener
($listener)¶Register a callback to be invoked when the end of a music stream has been reached during playback.
Parameters:
- $listener – callable - (Music $music)