Class TMusicPlayer

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TMusicPlayer = class(TObject)

Description

Music player, to easily play a sound preloaded by TRepoSoundEngine. Instance of this class should be created only internally by the TRepoSoundEngine, always use this through TRepoSoundEngine.MusicPlayer.

Hierarchy

  • TObject
  • TMusicPlayer

Overview

Fields

Public internal const DefaultMusicVolume = 1.0;

Methods

Public constructor Create(AnEngine: TRepoSoundEngine);
Public destructor Destroy; override;

Properties

Public property Sound: TSoundType read FSound write SetSound default stNone;
Public property MusicVolume: Single read GetMusicVolume write SetMusicVolume default DefaultMusicVolume;

Description

Fields

Public internal const DefaultMusicVolume = 1.0;
 

Methods

Public constructor Create(AnEngine: TRepoSoundEngine);
 
Public destructor Destroy; override;
 

Properties

Public property Sound: TSoundType read FSound write SetSound default stNone;

Currently played music. Set to stNone to stop playing music. Set to anything else to play that music.

Changing value of this property (when both the old and new values are <> stNone and are different) restarts playing the music.

Public property MusicVolume: Single read GetMusicVolume write SetMusicVolume default DefaultMusicVolume;

Music volume. This must always be within 0..1 range. 0.0 means that there is no music (this case should be optimized).


Generated by PasDoc 0.13.0 on 2014-04-30 22:06:45