Music playback. More...
Public Member Functions | |
| void | Play (integer music, integer loopPoint, decimal panning=0.0, decimal speed=1.0, decimal volume=1.0, decimal startPoint=0.0, decimal fadeInAfterFinished=0.0) |
| Places the music onto the music stack and plays it. | |
| void | Stop (integer music) |
| Removes the music from the music stack, stopping it if currently playing. | |
| void | StopWithFadeOut (decimal seconds) |
| Removes the music at the top of the music stack, fading it out over a time period. | |
| void | Pause () |
| Pauses the music at the top of the music stack. | |
| void | Resume () |
| Resumes the music at the top of the music stack. | |
| void | Clear () |
| Completely clears the music stack, stopping all music. | |
| boolean | IsPlaying (integer music) |
| Checks to see if the specified music is currently playing. | |
| decimal | GetPosition (integer music) |
| Gets the position of the current track playing. | |
| void | Alter (decimal panning, decimal speed, decimal volume) |
| Alters the playback conditions of the current track playing. | |
| integer | GetLoopPoint (integer music) |
| Gets the loop point of a music index, if it has one. | |
| void | SetLoopPoint (integer music, integer loopPoint) |
| Sets the loop point of a music index. | |
Music playback.
| void Music.Alter | ( | decimal | panning, |
| decimal | speed, | ||
| decimal | volume ) |
Alters the playback conditions of the current track playing.
| panning | Control the panning of the audio. -1.0 makes it sound in left ear only, 1.0 makes it sound in right ear, and closer to 0.0 centers it. |
| speed | Control the speed of the audio. Higher than 1.0 makes it faster, lesser than 1.0 is slower, 1.0 is normal speed. |
| volume | Controls the volume of the audio. 0.0 is muted, 1.0 is normal volume. |
| integer Music.GetLoopPoint | ( | integer | music | ) |
Gets the loop point of a music index, if it has one.
| music | The music index to get the loop point. |
| decimal Music.GetPosition | ( | integer | music | ) |
Gets the position of the current track playing.
| music | The music index to get the current position (in seconds) of. |
| boolean Music.IsPlaying | ( | integer | music | ) |
Checks to see if the specified music is currently playing.
| music | The music index to play. |
| void Music.Play | ( | integer | music, |
| integer | loopPoint, | ||
| decimal | panning = 0.0, | ||
| decimal | speed = 1.0, | ||
| decimal | volume = 1.0, | ||
| decimal | startPoint = 0.0, | ||
| decimal | fadeInAfterFinished = 0.0 ) |
Places the music onto the music stack and plays it.
| music | The music index to play. |
| loopPoint | Loop point in samples. Use AUDIO_LOOP_NONE to play the track once or AUDIO_LOOP_DEFAULT to use the audio file's metadata. (default: AUDIO_LOOP_DEFAULT) |
| panning | Control the panning of the audio. -1.0 makes it sound in left ear only, 1.0 makes it sound in right ear, and closer to 0.0 centers it. |
| speed | Control the speed of the audio. Higher than 1.0 makes it faster, lesser than 1.0 is slower, 1.0 is normal speed. |
| volume | Controls the volume of the audio. 0.0 is muted, 1.0 is normal volume. |
| startPoint | The time (in seconds) to start the music at. |
| fadeInAfterFinished | The time period to fade in the previous music track after the currently playing track finishes playing, in seconds. |
| void Music.SetLoopPoint | ( | integer | music, |
| integer | loopPoint ) |
Sets the loop point of a music index.
| music | The music index to set the loop point. |
| loopPoint | The loop point in samples, or null to remove the audio's loop point. |
| void Music.Stop | ( | integer | music | ) |
Removes the music from the music stack, stopping it if currently playing.
| music | The music index to stop. |
| void Music.StopWithFadeOut | ( | decimal | seconds | ) |
Removes the music at the top of the music stack, fading it out over a time period.
| seconds | The time period to fade out the music, in seconds. |