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:
  • $isLoopingbool
isLooping()
Returns:bool
setVolume($volume)
Parameters:
  • $volumedouble
getVolume()
Returns:double
setPan($pan, $volume)

Sets the panning and volume of this music stream.

Parameters:
  • $pandouble - panning in the range -1 (full left) to 1 (full right). 0 is center position.
  • $volumedouble
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:
  • $listenercallable - (Music $music)