Castle Game Engine: CastleSoundEngine: Class TMusicPlayer

# Class TMusicPlayer
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleSoundEngine ## 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
| `internal const DefaultMusicVolume = 1.0;`
### Methods
| `constructor Create(AnEngine: TRepoSoundEngine);`
| `destructor Destroy; override;`
### Properties
| `property Sound: TSoundType read FSound write SetSound default stNone;`
| `property MusicVolume: Single read GetMusicVolume write SetMusicVolume default DefaultMusicVolume;`
## Description ### Fields
| `internal const DefaultMusicVolume = 1.0;`
### Methods
| `constructor Create(AnEngine: TRepoSoundEngine);`
| `destructor Destroy; override;`
### Properties
| `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.
| `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 2013-08-17 21:27:14