Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SoundBase.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 
4 using System;
5 using System.Diagnostics;
6 
7 using SiliconStudio.Core;
8 
9 namespace SiliconStudio.Paradox.Audio
10 {
11  /// <summary>
12  /// Base class for all the sounds and sound instances.
13  /// </summary>
14  [DebuggerDisplay("{Name}")]
15  public abstract partial class SoundBase : ComponentBase
16  {
17  /// <summary>
18  /// Create an instance of soundBase.
19  /// </summary>
20  /// <param name="engine">A valid AudioEngine</param>
21  /// <exception cref="ArgumentNullException">The engine argument is null</exception>
22  internal SoundBase(AudioEngine engine)
23  {
24  if (engine == null)
25  throw new ArgumentNullException("engine");
26 
27  AudioEngine = engine;
28  }
29 
30  internal AudioEngine AudioEngine { get; private set; }
31 
32  internal AudioEngineState EngineState { get { return AudioEngine.State; } }
33 
34  #region Disposing Utilities
35 
36  internal void CheckNotDisposed()
37  {
38  if(IsDisposed)
39  throw new ObjectDisposedException("this");
40  }
41 
42  #endregion
43  }
44 }
AudioEngineState
Describe the possible states of the AudioEngine.
Base class for a framework component.
Represents the audio engine. In current version, the audio engine necessarily creates its context on ...
Definition: AudioEngine.cs:80
Base class for all the sounds and sound instances.
Definition: SoundBase.cs:15