| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements com. Needs to be called when the Music is no longer needed. |
| public float | getPosition()
Implements com. Returns the playback position in seconds. |
| public float | |
| public boolean | |
| public boolean | |
| public void | |
| public void | |
| public void | setLooping(boolean isLooping)
Implements com. Sets whether the music stream is looping. |
| public void | setOnCompletionListener(Music.
Implements com. Register a callback to be invoked when the end of a music stream has been reached during playback. |
| public void | setPan(float pan, float volume)
Implements com. Sets the panning and volume of this music stream. |
| public void | setPosition(float position)
Implements com. Set the playback position in seconds. |
| public void | setVolume(float volume)
Implements com. Sets the volume of this music stream. |
| public void |
| MockMusic | back to summary |
|---|---|
| public MockMusic() | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements com. Doc from com. Needs to be called when the Music is no longer needed.
| |
| getPosition | back to summary |
|---|---|
| public float getPosition() Implements com. Doc from com. Returns the playback position in seconds.
| |
| getVolume | back to summary |
|---|---|
| public float getVolume() Implements com.
| |
| isLooping | back to summary |
|---|---|
| public boolean isLooping() Implements com.
| |
| isPlaying | back to summary |
|---|---|
| public boolean isPlaying() Implements com.
| |
| pause | back to summary |
|---|---|
| public void pause() Implements com. Doc from com. Pauses the play back. If the music stream has not been started yet or has finished playing a call to this method will be ignored.
| |
| play | back to summary |
|---|---|
| public void play() Implements com. Doc from com. Starts the play back of the music stream. In case the stream was paused this will resume the play back. In case the music stream is finished playing this will restart the play back.
| |
| setLooping | back to summary |
|---|---|
| public void setLooping(boolean isLooping) Implements com. Doc from com. Sets whether the music stream is looping. This can be called at any time, whether the stream is playing.
| |
| setOnCompletionListener | back to summary |
|---|---|
| public void setOnCompletionListener(Music. Implements com. Doc from com. Register a callback to be invoked when the end of a music stream has been reached during playback.
| |
| setPan | back to summary |
|---|---|
| public void setPan(float pan, float volume) Implements com. Doc from com. Sets the panning and volume of this music stream.
| |
| setPosition | back to summary |
|---|---|
| public void setPosition(float position) Implements com. Doc from com. Set the playback position in seconds.
| |
| setVolume | back to summary |
|---|---|
| public void setVolume(float volume) Implements com. Doc from com. Sets the volume of this music stream. The volume must be given in the range [0,1] with 0 being silent and 1 being the maximum volume.
| |
| stop | back to summary |
|---|---|
| public void stop() Implements com. Doc from com. Stops a playing or paused Music instance. Next time play() is invoked the Music will start from the beginning.
| |