Class TMusicLoop
Unit
Declaration
type TMusicLoop = class(TObject)
Description
Class to play an individual sound or a music (as background loop or not)
Hierarchy
- TObject
- TMusicLoop
Overview
Methods
![]() |
constructor Create; virtual; |
![]() |
destructor Destroy; override; |
![]() |
function Load(Filename: string): TMusicLoop; |
![]() |
procedure Play(Filename: string; LectureEnBoucle: boolean = true); overload; |
![]() |
procedure Play(LectureEnBoucle: boolean = true); overload; |
![]() |
procedure PlaySound; |
![]() |
procedure Stop; |
![]() |
procedure Pause; |
![]() |
function isPaused: boolean; |
![]() |
function IsPlaying: boolean; |
![]() |
function IsActive: boolean; |
![]() |
function CurrentTimeInSeconds: integer; |
![]() |
function DurationInSeconds: integer; |
![]() |
class function Current: TMusicLoop; |
Properties
![]() |
property tag: integer read Ftag write Settag; |
![]() |
property audioActif: boolean read FaudioActif write SetaudioActif; |
![]() |
property audioOn: boolean read FaudioOn write SetaudioOn; |
![]() |
property audioEnBoucle: boolean read FaudioEnBoucle write SetaudioEnBoucle; |
![]() |
property AudioPaused: boolean read FAudioPaused write SetAudioPaused; |
![]() |
property Filename: string read getFileName; |
![]() |
property Volume: TVolumeSonore read getVolume write SetVolume; |
Description
Methods
![]() |
constructor Create; virtual; |
|
Create an instance of a TMusicLoop or use "TMusicLoop.Current" to use the default one | |
![]() |
destructor Destroy; override; |
|
Destroy this instance | |
![]() |
function Load(Filename: string): TMusicLoop; |
|
Load a music or sound (file formats depend on the operating system). You can try MP3 for music and WAV for sounds | |
![]() |
procedure Play(Filename: string; LectureEnBoucle: boolean = true); overload; |
|
Load and play a sound or music | |
![]() |
procedure Play(LectureEnBoucle: boolean = true); overload; |
|
Play current soound or music in an infinite loop or one time | |
![]() |
procedure PlaySound; |
|
Just play current sound once time | |
![]() |
procedure Stop; |
|
Stop current play (sound or music) | |
![]() |
procedure Pause; |
|
Stop the music or restart it if it was paused | |
![]() |
function isPaused: boolean; |
|
Return true if the music is in pause | |
![]() |
function IsPlaying: boolean; |
|
Check if a sound or music is playing | |
![]() |
function IsActive: boolean; |
|
Check if a sound or music file is loaded | |
![]() |
function CurrentTimeInSeconds: integer; |
|
Return current playing time in seconds | |
![]() |
function DurationInSeconds: integer; |
|
Return the music duration in seconds | |
![]() |
class function Current: TMusicLoop; |
|
Get the instance of the default music loop to use it as a singleton | |
Properties
![]() |
property tag: integer read Ftag write Settag; |
![]() |
property audioActif: boolean read FaudioActif write SetaudioActif; |
![]() |
property audioOn: boolean read FaudioOn write SetaudioOn; |
![]() |
property audioEnBoucle: boolean read FaudioEnBoucle write SetaudioEnBoucle; |
![]() |
property AudioPaused: boolean read FAudioPaused write SetAudioPaused; |
![]() |
property Filename: string read getFileName; |
![]() |
property Volume: TVolumeSonore read getVolume write SetVolume; |
|
Set or get volume level for current playing sound or music | |
Generated by PasDoc 0.16.0.

