Provides a way to load and play music files. Usually setup in Scenes.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Content ContentData
DeltaEngine.Multimedia Music
DeltaEngine.Multimedia.BaseOpenAL OpenALMusic
DeltaEngine.Multimedia.Mocks MockMusic
DeltaEngine.Multimedia.SharpDX XAudioMusic
DeltaEngine.Multimedia.SlimDX XAudioMusic
DeltaEngine.Multimedia.Xna XnaMusic
Namespace: DeltaEngine.Multimedia
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The Music type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Music | Initializes a new instance of the Music class |
Methods
Name | Description | |
---|---|---|
CreateDefault | (Inherited from ContentData.) | |
Dispose | (Inherited from ContentData.) | |
DisposeData | (Overrides ContentData DisposeData .) | |
HandleStreamFinished | ||
InternalCreateDefault | (Inherited from ContentData.) | |
IsPlaying | ||
LoadData | (Inherited from ContentData.) | |
Play | ||
Play(Single) | ||
PlayNativeMusic | ||
SetPlayingVolume | ||
Stop | ||
StopNativeMusic | ||
ToString | (Inherited from ContentData.) | |
UpdateStateAndPosition |
Fields
Name | Description | |
---|---|---|
BufferSize | ||
BuffersPerSecond | ||
cachedVolume | ||
ContentChanged | (Inherited from ContentData.) | |
device | ||
NumberOfBuffers | ||
StreamFinished |
Properties
Name | Description | |
---|---|---|
AllowCreationIfContentNotFound | (Overrides ContentData AllowCreationIfContentNotFound.) | |
DurationInSeconds | ||
IsDisposed | (Inherited from ContentData.) | |
Loop | ||
MetaData | (Inherited from ContentData.) | |
Name | (Inherited from ContentData.) | |
PositionInSeconds | ||
Volume |
Remarks
Examples
[Test] public void PlayMusic() { ContentLoader.Load<Music>("DefaultMusic").Play(); }
[Test] public void PlayOggMusic() { ContentLoader.Load<Music>("OggMusic").Play(); }
[Test] public void PlayWmaMusic() { ContentLoader.Load<Music>("WmaMusic").Play(); }
See Also