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
@ -54,27 +51,7 @@ namespace ANX.Framework.Audio
{ {
public struct AudioCategory : IEquatable<AudioCategory> public struct AudioCategory : IEquatable<AudioCategory>
{ {
#region Public
public void Pause()
{
throw new NotImplementedException();
}
public void Resume()
{
throw new NotImplementedException();
}
public void SetVolume(float volume)
{
throw new NotImplementedException();
}
public void Stop(AudioStopOptions options)
{
throw new NotImplementedException();
}
public string Name public string Name
{ {
get get
@ -82,20 +59,55 @@ namespace ANX.Framework.Audio
throw new NotImplementedException(); throw new NotImplementedException();
} }
} }
#endregion
#region Pause
public void Pause()
{
throw new NotImplementedException();
}
#endregion
#region Resume
public void Resume()
{
throw new NotImplementedException();
}
#endregion
#region SetVolume
public void SetVolume(float volume)
{
throw new NotImplementedException();
}
#endregion
#region Stop
public void Stop(AudioStopOptions options)
{
throw new NotImplementedException();
}
#endregion
#region GetHashCode
public override int GetHashCode() public override int GetHashCode()
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
#endregion
#region ToString
public override string ToString() public override string ToString()
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
#endregion
#region Equals
public override bool Equals(object obj) public override bool Equals(object obj)
{ {
if (obj != null && obj.GetType() == this.GetType()) if (obj != null &&
obj is AudioCategory)
{ {
return this == (AudioCategory)obj; return this == (AudioCategory)obj;
} }
@ -107,7 +119,9 @@ namespace ANX.Framework.Audio
{ {
return this == other; return this == other;
} }
#endregion
#region Equality
public static bool operator ==(AudioCategory lhs, AudioCategory rhs) public static bool operator ==(AudioCategory lhs, AudioCategory rhs)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
@ -117,5 +131,6 @@ namespace ANX.Framework.Audio
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
#endregion
} }
} }

View File

@ -1,7 +1,4 @@
#region Using Statements using System;
using System;
#endregion // Using Statements
#region License #region License

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
// //
@ -56,43 +52,80 @@ namespace ANX.Framework.Audio
{ {
public class AudioEngine : IDisposable public class AudioEngine : IDisposable
{ {
#region Constants
public const int ContentVersion = 0x27; public const int ContentVersion = 0x27;
#endregion
#region Events
public event EventHandler<EventArgs> Disposing;
#endregion
#region Public
public bool IsDisposed
{
get
{
throw new NotImplementedException();
}
}
public ReadOnlyCollection<RendererDetail> RendererDetails
{
get
{
throw new NotImplementedException();
}
}
#endregion
#region Constructor
public AudioEngine(string settingsFile) public AudioEngine(string settingsFile)
{
}
public AudioEngine(string settingsFile, TimeSpan lookAheadTime, string rendererId)
{
}
public bool IsDisposed { get { throw new NotImplementedException(); } }
public ReadOnlyCollection<RendererDetail> RendererDetails { get { throw new NotImplementedException(); } }
public AudioCategory GetCategory(string name)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public float GetGlobalVariable(string name)
{ public AudioEngine(string settingsFile, TimeSpan lookAheadTime,
throw new NotImplementedException(); string rendererId)
}
public void SetGlobalVariable(string name, float value)
{
throw new NotImplementedException();
}
public void Update ()
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
~AudioEngine() ~AudioEngine()
{
Dispose();
}
#endregion
#region GetCategory
public AudioCategory GetCategory(string name)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
protected virtual void Dispose ( bool disposing) #endregion
#region GetGlobalVariable
public float GetGlobalVariable(string name)
{
throw new NotImplementedException();
}
#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(); throw new NotImplementedException();
} }
@ -101,6 +134,6 @@ namespace ANX.Framework.Audio
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public event EventHandler<EventArgs> Disposing; #endregion
} }
} }

View File

@ -1,8 +1,4 @@
#region Using Statements using System;
using System;
using System.IO;
#endregion // Using Statements
#region License #region License
@ -55,55 +51,145 @@ 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 bool IsPaused { get { throw new NotImplementedException(); } }
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(); } }
public event EventHandler<EventArgs> Disposing; public event EventHandler<EventArgs> Disposing;
#endregion
#region Public
public bool IsCreated
{
get
{
throw new NotImplementedException();
}
}
public bool IsDisposed
{
get
{
throw new NotImplementedException();
}
}
public bool IsPaused
{
get
{
throw new NotImplementedException();
}
}
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();
}
}
#endregion
#region Constructor
~Cue()
{
Dispose();
}
#endregion
#region Apply3D
public void Apply3D(AudioListener listener, AudioEmitter emitter) public void Apply3D(AudioListener listener, AudioEmitter emitter)
{ {
throw new NotImplementedException();
}
#endregion
} #region SetVariable
public float GetVariable(string name)
{
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) public void SetVariable(string name, float value)
{ {
throw new NotImplementedException(); 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) public void Stop(AudioStopOptions options)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
#endregion
~Cue() #region Dispose
{
}
public void Dispose() public void Dispose()
{ {
throw new NotImplementedException(); 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 TimeSpan BufferDuration { get; set; }
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 event EventHandler<EventArgs> BufferReady;
#endregion
public void Stop () #region Public
public readonly string Name;
public static ReadOnlyCollection<Microphone> All
{ {
get
}
public void Start ()
{
}
public int GetSampleSizeInBytes (TimeSpan duration)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public TimeSpan GetSampleDuration (int sizeInBytes) }
public TimeSpan BufferDuration
{
get;
set;
}
public static Microphone Default
{
get
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public int GetData(byte[] buffer) }
public bool IsHeadset
{
get
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public int GetData(byte[] buffer, int offset, int count) }
public int SampleRate
{
get
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
}
public MicrophoneState State
{
get
{
throw new NotImplementedException();
}
}
#endregion
#region Constructor
~Microphone() ~Microphone()
{ {
throw new NotImplementedException(); 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".

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 inner)
{
} }
public NoAudioHardwareException(string message, Exception innerException)
: 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 inner)
{
} }
public NoMicrophoneConnectedException(string message, Exception innerException)
: 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
@ -55,40 +51,75 @@ namespace ANX.Framework.Audio
{ {
public class SoundBank : IDisposable public class SoundBank : IDisposable
{ {
public SoundBank(AudioEngine audioEngine, string filename) #region Events
{
}
public bool IsDisposed { get { throw new NotImplementedException(); } }
public bool IsInUse { get { throw new NotImplementedException(); } }
public event EventHandler<EventArgs> Disposing; public event EventHandler<EventArgs> Disposing;
#endregion
#region Public
public bool IsDisposed
{
get;
private set;
}
public Cue GetCue(string name) public bool IsInUse
{
get
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
public void PlayCue(string name)
{
throw new NotImplementedException();
} }
public void PlayCue(string name, AudioListener listener, AudioEmitter emitter) #endregion
#region Constructor
public SoundBank(AudioEngine audioEngine, string filename)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
~SoundBank() ~SoundBank()
{
Dispose();
}
#endregion
#region GetCue
public Cue GetCue(string name)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
#endregion
#region PlayCue
public void PlayCue(string name)
{
throw new NotImplementedException();
}
#endregion
#region PlayCue
public void PlayCue(string name, AudioListener listener, AudioEmitter emitter)
{
throw new NotImplementedException();
}
#endregion
#region Dispose
public void Dispose() public void Dispose()
{ {
throw new NotImplementedException(); Dispose(true);
} }
protected virtual void Dispose(bool disposing) protected virtual void Dispose(bool disposing)
{ {
if (IsDisposed)
{
return;
}
IsDisposed = true;
throw new NotImplementedException(); throw new NotImplementedException();
} }
#endregion
} }
} }

View File

@ -1,7 +1,4 @@
#region Using Statements using System;
using System;
#endregion // Using Statements
#region License #region License

View File

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