The MediaPlayer can be used to play audio files. See the media player tutorial for more information. NOTE: The media player should be declared as a process global object. The Complete event is raised when playback completes. It will only be raised if you initialize the object with Initialize2.
Returns the total duration of the loaded file (in milliseconds).
Initialize
Initializes the object. You should use Initialize2 if you want to handle the Complete event. Example: DimMPAsMediaPlayer'should be done in Sub Process_Globals MP.Initialize2("MP")
MP.Load(File.DirAssets, "SomeFile.mp3")
MP.Play
Initialize2 (EventNameAsString)
Similar to Initialize2. Complete event will be raised when play back completes. EventName - The Sub that will handle the Complete event.
IsInitializedAsBoolean
IsPlayingAsBoolean
Returns true if the media player is currently playing.
Load (DirAsString, FileNameAsString)
Loads an audio file and prepares it for playing.
LoopingAsBoolean
Gets or sets whether the media player will restart playing automatically.
Pause
Pauses playback. You can resume playback from the current position by calling Play.
Play
Starts (or resumes) playing the loaded audio file.
PositionAsInt
Gets or sets the current position (in milliseconds).
Release
Releases all resources allocated by the media player.
SetVolume (LeftAsFloat, RightAsFloat)
Sets the playing volume for each channel. The value should be between 0 to 1.
Stop
Stops playing. You must call Load before trying to play again.
Top