Cleaned and formatted all the Audio namespace files

This commit is contained in:
SND\AstrorEnales_cp 2012-02-12 13:00:17 +00:00
parent 70f30907ff
commit ec48a838c7
13 changed files with 607 additions and 354 deletions

View File

@ -1,7 +1,4 @@
#region Using Statements using System;
using System;
#endregion // Using Statements
#region License #region License
@ -52,70 +49,88 @@ using System;
namespace ANX.Framework.Audio namespace ANX.Framework.Audio
{ {
public struct AudioCategory : IEquatable<AudioCategory> public struct AudioCategory : IEquatable<AudioCategory>
{ {
#region Public
public string Name
{
get
{
throw new NotImplementedException();
}
}
#endregion
public void Pause() #region Pause
{ public void Pause()
throw new NotImplementedException(); {
} throw new NotImplementedException();
}
#endregion
public void Resume() #region Resume
{ public void Resume()
throw new NotImplementedException(); {
} throw new NotImplementedException();
}
#endregion
public void SetVolume(float volume) #region SetVolume
{ public void SetVolume(float volume)
throw new NotImplementedException(); {
} throw new NotImplementedException();
}
#endregion
public void Stop(AudioStopOptions options) #region Stop
{ public void Stop(AudioStopOptions options)
throw new NotImplementedException(); {
} throw new NotImplementedException();
}
#endregion
public string Name #region GetHashCode
{ public override int GetHashCode()
get {
{ throw new NotImplementedException();
throw new NotImplementedException(); }
} #endregion
}
public override int GetHashCode() #region ToString
{ public override string ToString()
throw new NotImplementedException(); {
} throw new NotImplementedException();
}
#endregion
public override string ToString() #region Equals
{ public override bool Equals(object obj)
throw new NotImplementedException(); {
} if (obj != null &&
obj is AudioCategory)
{
return this == (AudioCategory)obj;
}
public override bool Equals(object obj) return false;
{ }
if (obj != null && obj.GetType() == this.GetType())
{
return this == (AudioCategory)obj;
}
return false; public bool Equals(AudioCategory other)
} {
return this == other;
}
#endregion
public bool Equals(AudioCategory other) #region Equality
{ public static bool operator ==(AudioCategory lhs, AudioCategory rhs)
return this == other; {
} throw new NotImplementedException();
}
public static bool operator ==(AudioCategory lhs, AudioCategory rhs) public static bool operator !=(AudioCategory lhs, AudioCategory rhs)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
#endregion
public static bool operator !=(AudioCategory lhs, AudioCategory rhs) }
{
throw new NotImplementedException();
}
}
} }

View File

@ -1,7 +1,4 @@
#region Using Statements using System;
using System;
#endregion // Using Statements
#region License #region License
@ -52,10 +49,10 @@ using System;
namespace ANX.Framework.Audio namespace ANX.Framework.Audio
{ {
[Flags] [Flags]
public enum AudioChannels public enum AudioChannels
{ {
Mono = 1, Mono = 1,
Stereo = 2, Stereo = 2,
} }
} }

View File

@ -1,10 +1,6 @@
#region Using Statements using System;
using System;
using System.IO;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
#endregion // Using Statements
#region License #region License
// //
@ -54,53 +50,90 @@ using System.Collections.ObjectModel;
namespace ANX.Framework.Audio namespace ANX.Framework.Audio
{ {
public class AudioEngine : IDisposable public class AudioEngine : IDisposable
{ {
public const int ContentVersion = 0x27; #region Constants
public const int ContentVersion = 0x27;
#endregion
#region Events
public event EventHandler<EventArgs> Disposing;
#endregion
public AudioEngine(string settingsFile) #region Public
{ public bool IsDisposed
{
get
{
throw new NotImplementedException();
}
}
} public ReadOnlyCollection<RendererDetail> RendererDetails
public AudioEngine(string settingsFile, TimeSpan lookAheadTime, string rendererId) {
{ get
{
throw new NotImplementedException();
}
}
#endregion
} #region Constructor
public AudioEngine(string settingsFile)
{
throw new NotImplementedException();
}
public bool IsDisposed { get { throw new NotImplementedException(); } } public AudioEngine(string settingsFile, TimeSpan lookAheadTime,
public ReadOnlyCollection<RendererDetail> RendererDetails { get { throw new NotImplementedException(); } } string rendererId)
{
throw new NotImplementedException();
}
public AudioCategory GetCategory(string name) ~AudioEngine()
{ {
throw new NotImplementedException(); Dispose();
} }
public float GetGlobalVariable(string name) #endregion
{
throw new NotImplementedException();
}
public void SetGlobalVariable(string name, float value)
{
throw new NotImplementedException();
}
public void Update ()
{
throw new NotImplementedException();
}
~AudioEngine() #region GetCategory
{ public AudioCategory GetCategory(string name)
throw new NotImplementedException(); {
} throw new NotImplementedException();
protected virtual void Dispose ( bool disposing) }
{ #endregion
throw new NotImplementedException();
}
public void Dispose() #region GetGlobalVariable
{ public float GetGlobalVariable(string name)
throw new NotImplementedException(); {
} throw new NotImplementedException();
public event EventHandler<EventArgs> Disposing; }
} #endregion
#region SetGlobalVariable
public void SetGlobalVariable(string name, float value)
{
throw new NotImplementedException();
}
#endregion
#region Update
public void Update()
{
throw new NotImplementedException();
}
#endregion
#region Dispose
protected virtual void Dispose(bool disposing)
{
throw new NotImplementedException();
}
public void Dispose()
{
throw new NotImplementedException();
}
#endregion
}
} }

View File

@ -1,8 +1,4 @@
#region Using Statements using System;
using System;
using System.IO;
#endregion // Using Statements
#region License #region License
@ -53,57 +49,147 @@ using System.IO;
namespace ANX.Framework.Audio namespace ANX.Framework.Audio
{ {
public sealed class Cue : IDisposable public sealed class Cue : IDisposable
{ {
public bool IsCreated { get { throw new NotImplementedException(); } } #region Events
public bool IsDisposed { get { throw new NotImplementedException(); } } public event EventHandler<EventArgs> Disposing;
public bool IsPaused { get { throw new NotImplementedException(); } } #endregion
public bool IsPlaying { get { throw new NotImplementedException(); } }
public bool IsPrepared { get { throw new NotImplementedException(); } }
public bool IsPreparing { get { throw new NotImplementedException(); } }
public bool IsStopped { get { throw new NotImplementedException(); } }
public bool IsStopping { get { throw new NotImplementedException(); } }
public string Name { get { throw new NotImplementedException(); } }
#region Public
public bool IsCreated
{
get
{
throw new NotImplementedException();
}
}
public event EventHandler<EventArgs> Disposing; public bool IsDisposed
{
get
{
throw new NotImplementedException();
}
}
public void Apply3D(AudioListener listener, AudioEmitter emitter) public bool IsPaused
{ {
get
{
throw new NotImplementedException();
}
}
} public bool IsPlaying
public float GetVariable(string name) {
{ get
throw new NotImplementedException(); {
} throw new NotImplementedException();
public void Pause () }
{ }
throw new NotImplementedException();
}
public void Play ()
{
throw new NotImplementedException();
}
public void Resume ()
{
throw new NotImplementedException();
}
public void SetVariable(string name, float value)
{
throw new NotImplementedException();
}
public void Stop(AudioStopOptions options)
{
throw new NotImplementedException();
}
~Cue() public bool IsPrepared
{ {
get
{
throw new NotImplementedException();
}
}
} public bool IsPreparing
public void Dispose() {
{ get
throw new NotImplementedException(); {
} throw new NotImplementedException();
} }
}
public bool IsStopped
{
get
{
throw new NotImplementedException();
}
}
public bool IsStopping
{
get
{
throw new NotImplementedException();
}
}
public string Name
{
get
{
throw new NotImplementedException();
}
}
#endregion
#region Constructor
~Cue()
{
Dispose();
}
#endregion
#region Apply3D
public void Apply3D(AudioListener listener, AudioEmitter emitter)
{
throw new NotImplementedException();
}
#endregion
#region SetVariable
public void SetVariable(string name, float value)
{
throw new NotImplementedException();
}
#endregion
#region GetVariable
public float GetVariable(string name)
{
throw new NotImplementedException();
}
#endregion
#region Pause
public void Pause()
{
throw new NotImplementedException();
}
#endregion
#region Play
public void Play()
{
throw new NotImplementedException();
}
#endregion
#region Resume
public void Resume()
{
throw new NotImplementedException();
}
#endregion
#region Stop
public void Stop(AudioStopOptions options)
{
throw new NotImplementedException();
}
#endregion
#region Dispose
public void Dispose()
{
throw new NotImplementedException();
}
#endregion
}
} }

View File

@ -1,8 +1,4 @@
#region Using Statements using System;
using System;
using System.IO;
#endregion // Using Statements
#region License #region License
@ -51,18 +47,15 @@ using System.IO;
#endregion // License #endregion // License
namespace ANX.Framework.Audio namespace ANX.Framework.Audio
{ {
public sealed class DynamicSoundEffectInstance : SoundEffectInstance public sealed class DynamicSoundEffectInstance : SoundEffectInstance
{ {
#region Events
public event EventHandler<EventArgs> BufferNeeded; public event EventHandler<EventArgs> BufferNeeded;
#endregion
public DynamicSoundEffectInstance(int sampleRate, AudioChannels channels) #region Public
{
throw new NotImplementedException();
}
public override bool IsLooped public override bool IsLooped
{ {
get get
@ -82,35 +75,55 @@ namespace ANX.Framework.Audio
throw new NotImplementedException(); throw new NotImplementedException();
} }
} }
#endregion
#region Constructor
public DynamicSoundEffectInstance(int sampleRate, AudioChannels channels)
{
throw new NotImplementedException();
}
#endregion
#region GetSampleDuration
public TimeSpan GetSampleDuration(int sizeInBytes) public TimeSpan GetSampleDuration(int sizeInBytes)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
#endregion
#region GetSampleSizeInBytes
public int GetSampleSizeInBytes(TimeSpan duration) public int GetSampleSizeInBytes(TimeSpan duration)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
#endregion
#region Play
public override void Play() public override void Play()
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
#endregion
#region SubmitBuffer
public void SubmitBuffer(byte[] buffer) public void SubmitBuffer(byte[] buffer)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
#endregion
#region SubmitBuffer
public void SubmitBuffer(byte[] buffer, int offset, int count) public void SubmitBuffer(byte[] buffer, int offset, int count)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
#endregion
#region Dispose
protected override void Dispose(bool disposing) protected override void Dispose(bool disposing)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
#endregion
} }
} }

View File

@ -63,8 +63,8 @@ namespace ANX.Framework.Audio
{ {
} }
public InstancePlayLimitException(string message, Exception inner) public InstancePlayLimitException(string message, Exception innerException)
: base(message, inner) : base(message, innerException)
{ {
} }
#endregion #endregion

View File

@ -1,9 +1,6 @@
#region Using Statements using System;
using System;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
#endregion // Using Statements
#region License #region License
// //
@ -51,48 +48,111 @@ using System.Collections.ObjectModel;
#endregion // License #endregion // License
namespace ANX.Framework.Audio namespace ANX.Framework.Audio
{ {
public sealed class Microphone public sealed class Microphone
{ {
public readonly string Name; #region Events
public static ReadOnlyCollection<Microphone> All { get { throw new NotImplementedException(); } } public event EventHandler<EventArgs> BufferReady;
public TimeSpan BufferDuration { get; set; } #endregion
public static Microphone Default { get { throw new NotImplementedException(); } }
public bool IsHeadset { get { throw new NotImplementedException(); } }
public int SampleRate { get { throw new NotImplementedException(); } }
public MicrophoneState State { get { throw new NotImplementedException(); } }
public event EventHandler<EventArgs> BufferReady;
public void Stop () #region Public
{ public readonly string Name;
}
public void Start () public static ReadOnlyCollection<Microphone> All
{ {
get
{
throw new NotImplementedException();
}
}
} public TimeSpan BufferDuration
public int GetSampleSizeInBytes (TimeSpan duration) {
{ get;
throw new NotImplementedException(); set;
} }
public TimeSpan GetSampleDuration (int sizeInBytes)
{ public static Microphone Default
throw new NotImplementedException(); {
} get
public int GetData(byte[] buffer) {
{ throw new NotImplementedException();
throw new NotImplementedException(); }
} }
public int GetData(byte[] buffer, int offset, int count)
{ public bool IsHeadset
throw new NotImplementedException(); {
} get
~Microphone() {
{ throw new NotImplementedException();
throw new NotImplementedException(); }
} }
}
public int SampleRate
{
get
{
throw new NotImplementedException();
}
}
public MicrophoneState State
{
get
{
throw new NotImplementedException();
}
}
#endregion
#region Constructor
~Microphone()
{
throw new NotImplementedException();
}
#endregion
#region Stop
public void Stop()
{
throw new NotImplementedException();
}
#endregion
#region Start
public void Start()
{
throw new NotImplementedException();
}
#endregion
#region GetSampleSizeInBytes
public int GetSampleSizeInBytes(TimeSpan duration)
{
throw new NotImplementedException();
}
#endregion
#region GetSampleDuration
public TimeSpan GetSampleDuration(int sizeInBytes)
{
throw new NotImplementedException();
}
#endregion
#region GetData
public int GetData(byte[] buffer)
{
throw new NotImplementedException();
}
#endregion
#region GetData
public int GetData(byte[] buffer, int offset, int count)
{
throw new NotImplementedException();
}
#endregion
}
} }

View File

@ -1,9 +1,4 @@
#region Using Statements #region License
using System;
#endregion // Using Statements
#region License
// //
// This file is part of the ANX.Framework created by the "ANX.Framework developer group". // This file is part of the ANX.Framework created by the "ANX.Framework developer group".
@ -52,9 +47,9 @@ using System;
namespace ANX.Framework.Audio namespace ANX.Framework.Audio
{ {
public enum MicrophoneState public enum MicrophoneState
{ {
Started, Started,
Stopped, Stopped,
} }
} }

View File

@ -1,10 +1,6 @@
#region Using Statements using System;
using System;
using System.IO;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
#endregion // Using Statements
#region License #region License
// //
@ -51,24 +47,25 @@ using System.Runtime.InteropServices;
// particular purpose and non-infringement. // particular purpose and non-infringement.
#endregion // License #endregion // License
namespace ANX.Framework.Audio namespace ANX.Framework.Audio
{ {
[SerializableAttribute] [SerializableAttribute]
public sealed class NoAudioHardwareException : ExternalException public sealed class NoAudioHardwareException : ExternalException
{ {
public NoAudioHardwareException() public NoAudioHardwareException()
{ : base()
{
}
} public NoAudioHardwareException(string message)
public NoAudioHardwareException(string message) : base(message)
{ {
}
} public NoAudioHardwareException(string message, Exception innerException)
public NoAudioHardwareException(string message, Exception inner) : base(message, innerException)
{ {
}
} }
}
} }

View File

@ -1,8 +1,4 @@
#region Using Statements using System;
using System;
using System.IO;
#endregion // Using Statements
#region License #region License
@ -51,23 +47,23 @@ using System.IO;
#endregion // License #endregion // License
namespace ANX.Framework.Audio namespace ANX.Framework.Audio
{ {
public sealed class NoMicrophoneConnectedException : Exception public sealed class NoMicrophoneConnectedException : Exception
{ {
public NoMicrophoneConnectedException() public NoMicrophoneConnectedException()
{ : base()
{
}
} public NoMicrophoneConnectedException(string message)
public NoMicrophoneConnectedException(string message) : base(message)
{ {
}
} public NoMicrophoneConnectedException(string message, Exception innerException)
public NoMicrophoneConnectedException(string message, Exception inner) : base(message, innerException)
{ {
}
} }
}
} }

View File

@ -1,8 +1,4 @@
#region Using Statements using System;
using System;
using System.IO;
#endregion // Using Statements
#region License #region License
@ -53,42 +49,77 @@ using System.IO;
namespace ANX.Framework.Audio namespace ANX.Framework.Audio
{ {
public class SoundBank : IDisposable public class SoundBank : IDisposable
{ {
public SoundBank(AudioEngine audioEngine, string filename) #region Events
{ public event EventHandler<EventArgs> Disposing;
#endregion
#region Public
public bool IsDisposed
{
get;
private set;
}
} public bool IsInUse
public bool IsDisposed { get { throw new NotImplementedException(); } } {
public bool IsInUse { get { throw new NotImplementedException(); } } get
{
throw new NotImplementedException();
}
}
#endregion
#region Constructor
public SoundBank(AudioEngine audioEngine, string filename)
{
throw new NotImplementedException();
}
public event EventHandler<EventArgs> Disposing; ~SoundBank()
{
Dispose();
}
#endregion
#region GetCue
public Cue GetCue(string name)
{
throw new NotImplementedException();
}
#endregion
public Cue GetCue(string name) #region PlayCue
{ public void PlayCue(string name)
throw new NotImplementedException(); {
} throw new NotImplementedException();
public void PlayCue(string name) }
{ #endregion
throw new NotImplementedException();
}
public void PlayCue(string name, AudioListener listener, AudioEmitter emitter)
{
throw new NotImplementedException();
}
~SoundBank() #region PlayCue
{ public void PlayCue(string name, AudioListener listener, AudioEmitter emitter)
throw new NotImplementedException(); {
} throw new NotImplementedException();
public void Dispose() }
{ #endregion
throw new NotImplementedException();
} #region Dispose
protected virtual void Dispose(bool disposing) public void Dispose()
{ {
throw new NotImplementedException(); Dispose(true);
} }
}
protected virtual void Dispose(bool disposing)
{
if (IsDisposed)
{
return;
}
IsDisposed = true;
throw new NotImplementedException();
}
#endregion
}
} }

View File

@ -1,7 +1,4 @@
#region Using Statements using System;
using System;
#endregion // Using Statements
#region License #region License
@ -52,11 +49,11 @@ using System;
namespace ANX.Framework.Audio namespace ANX.Framework.Audio
{ {
[Flags] [Flags]
public enum SoundState public enum SoundState
{ {
Playing = 0, Playing = 0,
Paused = 1, Paused = 1,
Stopped = 2, Stopped = 2,
} }
} }

View File

@ -1,8 +1,4 @@
#region Using Statements using System;
using System;
using System.Collections.ObjectModel;
#endregion // Using Statements
#region License #region License
@ -53,33 +49,70 @@ using System.Collections.ObjectModel;
namespace ANX.Framework.Audio namespace ANX.Framework.Audio
{ {
public class WaveBank : IDisposable public class WaveBank : IDisposable
{ {
public WaveBank(AudioEngine audioEngine, string nonStreamingWaveBankFilename) #region Events
{ public event EventHandler<EventArgs> Disposing;
#endregion
} #region Public
public WaveBank(AudioEngine audioEngine, string streamingWaveBankFilename, int offset, short packetsize) public bool IsDisposed
{ {
get;
private set;
}
} public bool IsInUse
public bool IsDisposed { get { throw new NotImplementedException(); } } {
public bool IsInUse { get { throw new NotImplementedException(); } } get
public bool IsPrepared { get { throw new NotImplementedException(); } } {
throw new NotImplementedException();
}
}
public bool IsPrepared
{
get
{
throw new NotImplementedException();
}
}
#endregion
~WaveBank() #region Constructor
{ public WaveBank(AudioEngine audioEngine, string nonStreamingWaveBankFilename)
throw new NotImplementedException(); {
}
public void Dispose() }
{ public WaveBank(AudioEngine audioEngine, string streamingWaveBankFilename,
throw new NotImplementedException(); int offset, short packetsize)
} {
protected virtual void Dispose(bool disposing)
{ }
throw new NotImplementedException();
} ~WaveBank()
public event EventHandler<EventArgs> Disposing; {
} Dispose();
}
#endregion
#region Dispose
public void Dispose()
{
Dispose(true);
}
protected virtual void Dispose(bool disposing)
{
if (IsDisposed)
{
return;
}
IsDisposed = true;
throw new NotImplementedException();
}
#endregion
}
} }