Music ClassDelta Engine Documentation
Provides a way to load and play music files. Usually setup in Scenes. View code on GitHub
Inheritance Hierarchy

System Object
  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

public abstract class Music : ContentData

The Music type exposes the following members.

Constructors

  NameDescription
Protected methodMusic
Initializes a new instance of the Music class
Top
Methods

  NameDescription
Protected methodCreateDefault (Inherited from ContentData.)
Public methodDispose (Inherited from ContentData.)
Protected methodDisposeData (Overrides ContentData DisposeData .)
Protected methodHandleStreamFinished
Public methodInternalCreateDefault (Inherited from ContentData.)
Public methodIsPlaying
Protected methodLoadData (Inherited from ContentData.)
Public methodPlay 
Public methodPlay(Single)
Protected methodPlayNativeMusic
Protected methodSetPlayingVolume
Public methodStop
Protected methodStopNativeMusic
Public methodToString (Inherited from ContentData.)
Public methodUpdateStateAndPosition
Top
Fields

  NameDescription
Public fieldStatic memberBufferSize
Protected fieldStatic memberBuffersPerSecond
Protected fieldcachedVolume
Protected fieldContentChanged (Inherited from ContentData.)
Protected fielddevice
Public fieldStatic memberNumberOfBuffers
Public fieldStreamFinished
Top
Properties

  NameDescription
Protected propertyAllowCreationIfContentNotFound (Overrides ContentData AllowCreationIfContentNotFound.)
Public propertyDurationInSeconds
Public propertyIsDisposed (Inherited from ContentData.)
Public propertyLoop
Public propertyMetaData (Inherited from ContentData.)
Public propertyName (Inherited from ContentData.)
Public propertyPositionInSeconds
Public propertyVolume
Top
Remarks

Tests: DeltaEngine.Multimedia.Tests.MusicTests
Examples

13 unit tests call DeltaEngine.Multimedia.Music
[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