Moved Alut to OpenTK.Compatibility.
Moved SoundData and SoundFormat to OpenTK.Compatibility. Moved AL and Alc classes to OpenTK.Audio.OpenAL and added the previous namespace to OpenTK.Compatibility. Removed SoundData wrappers from AL class. Updated samples to use the new API.
This commit is contained in:
parent
244084c99e
commit
da9497928e
35 changed files with 5551 additions and 60 deletions
235
Source/Compatibility/Audio/AudioReader.cs
Normal file
235
Source/Compatibility/Audio/AudioReader.cs
Normal file
|
@ -0,0 +1,235 @@
|
|||
#region --- License ---
|
||||
/* Licensed under the MIT/X11 license.
|
||||
* Copyright (c) 2006-2008 the OpenTK Team.
|
||||
* This notice may not be removed from any source distribution.
|
||||
* See license.txt for licensing details.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
/// <summary>
|
||||
/// Encapsulates a sound stream and provides decoding and streaming capabilities.
|
||||
/// </summary>
|
||||
public class AudioReader : IDisposable
|
||||
{
|
||||
static object reader_lock = new object();
|
||||
static List<AudioReader> readers = new List<AudioReader>();
|
||||
|
||||
bool disposed;
|
||||
Stream stream;
|
||||
AudioReader implementation;
|
||||
|
||||
#region --- Constructors ---
|
||||
|
||||
#region static AudioReader()
|
||||
|
||||
static AudioReader()
|
||||
{
|
||||
// TODO: Plugin architecture for sound formats. This is overkill now that we only have a WaveReader (future proofing).
|
||||
readers.Add(new WaveReader());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region protected AudioReader()
|
||||
|
||||
protected AudioReader() { }
|
||||
|
||||
#endregion
|
||||
|
||||
#region public AudioReader(string filename)
|
||||
|
||||
/// <summary>Creates a new AudioReader that can read the specified sound file.</summary>
|
||||
/// <param name="filename">The path to the sound file.</param>
|
||||
/// <returns>A new OpenTK.Audio.AudioReader, which can be used to read from the specified sound file.</returns>
|
||||
public AudioReader(string filename)
|
||||
: this(new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
||||
{ }
|
||||
|
||||
#endregion
|
||||
|
||||
#region public AudioReader(Stream s)
|
||||
|
||||
/// <summary>Creates a new AudioReader that can read the specified soundstream.</summary>
|
||||
/// <param name="s">The System.IO.Stream to read from.</param>
|
||||
/// <returns>A new OpenTK.Audio.AudioReader, which can be used to read from the specified sound stream.</returns>
|
||||
public AudioReader(Stream s)
|
||||
{
|
||||
try
|
||||
{
|
||||
lock (reader_lock)
|
||||
{
|
||||
foreach (AudioReader reader in readers)
|
||||
{
|
||||
long pos = s.Position;
|
||||
if (reader.Supports(s))
|
||||
{
|
||||
s.Position = pos;
|
||||
implementation = (AudioReader)
|
||||
reader.GetType().GetConstructor(
|
||||
System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public |
|
||||
System.Reflection.BindingFlags.Instance,
|
||||
null,
|
||||
new Type[] { typeof(Stream) },
|
||||
null)
|
||||
.Invoke(new object[] { s });
|
||||
return;
|
||||
}
|
||||
s.Position = pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
s.Close();
|
||||
throw;
|
||||
}
|
||||
throw new NotSupportedException("Could not find a decoder for the specified sound stream.");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- Public Members ---
|
||||
|
||||
#region public virtual bool Supports(Stream s)
|
||||
|
||||
/// <summary>When overriden in a derived class, checks if the decoder supports the specified sound stream.</summary>
|
||||
/// <param name="s">The System.IO.Stream to check.</param>
|
||||
/// <returns>True if the sound stream is supported; false otherwise.</returns>
|
||||
public virtual bool Supports(Stream s)
|
||||
{
|
||||
if (implementation != null)
|
||||
return implementation.Supports(s);
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public virtual SoundData<SampleType> ReadSamples(long count)
|
||||
|
||||
/// <summary>
|
||||
/// When overriden in a derived class, reads and decodes the specified number of samples from the sound stream.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of samples to read and decode.</param>
|
||||
/// <returns>An OpenTK.Audio.SoundData object that contains the decoded buffer.</returns>
|
||||
public virtual SoundData ReadSamples(long count)
|
||||
{
|
||||
if (implementation != null)
|
||||
return implementation.ReadSamples(count);
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public virtual SoundData<SampleType> ReadToEnd()
|
||||
|
||||
/// <summary>
|
||||
/// When overriden in a derived class, reads and decodes the sound stream.
|
||||
/// </summary>
|
||||
/// <returns>An OpenTK.Audio.SoundData object that contains the decoded buffer.</returns>
|
||||
public virtual SoundData ReadToEnd()
|
||||
{
|
||||
if (implementation != null)
|
||||
return implementation.ReadToEnd();
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public virtual int Frequency
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public virtual int Frequency
|
||||
{
|
||||
get
|
||||
{
|
||||
if (implementation != null)
|
||||
return implementation.Frequency;
|
||||
else
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
protected set
|
||||
{
|
||||
if (implementation != null)
|
||||
implementation.Frequency = value;
|
||||
else
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public virtual bool EndOfFile
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the AudioReader has reached the end of the file.
|
||||
/// </summary>
|
||||
public virtual bool EndOfFile
|
||||
{
|
||||
get
|
||||
{
|
||||
if (implementation != null)
|
||||
return implementation.EndOfFile;
|
||||
|
||||
return this.Stream.Position >= this.Stream.Length;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- Protected Members ---
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the input <see cref="System.IO.Stream"/> of the AudioReader.
|
||||
/// </summary>
|
||||
protected virtual Stream Stream
|
||||
{
|
||||
get { return stream; }
|
||||
set { stream = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDisposable Members
|
||||
|
||||
/// <summary>Closes the underlying Stream and disposes of the AudioReader resources.</summary>
|
||||
public virtual void Dispose()
|
||||
{
|
||||
this.Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
void Dispose(bool manual)
|
||||
{
|
||||
if (!disposed)
|
||||
{
|
||||
if (manual)
|
||||
if (this.Stream != null)
|
||||
this.Stream.Close();
|
||||
|
||||
disposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finalizes this AudioReader.
|
||||
/// </summary>
|
||||
~AudioReader()
|
||||
{
|
||||
this.Dispose(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
24
Source/Compatibility/Audio/AudioReaderException.cs
Normal file
24
Source/Compatibility/Audio/AudioReaderException.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
#region --- License ---
|
||||
/* Licensed under the MIT/X11 license.
|
||||
* Copyright (c) 2006-2008 the OpenTK Team.
|
||||
* This notice may not be removed from any source distribution.
|
||||
* See license.txt for licensing details.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
/// <summary>Represents exceptions related to OpenTK.Audio.AudioReader objects.</summary>
|
||||
public class AudioReaderException : AudioException
|
||||
{
|
||||
/// <summary>Constructs a new AudioReaderException.</summary>
|
||||
public AudioReaderException() : base() { }
|
||||
/// <summary>Constructs a new AudioReaderException with the specified error message.</summary>
|
||||
/// <param name="message">The error message of the AudioReaderException.</param>
|
||||
public AudioReaderException(string message) : base(message) { }
|
||||
}
|
||||
}
|
1652
Source/Compatibility/Audio/OpenAL/AL/AL.cs
Normal file
1652
Source/Compatibility/Audio/OpenAL/AL/AL.cs
Normal file
File diff suppressed because it is too large
Load diff
431
Source/Compatibility/Audio/OpenAL/AL/ALEnums.cs
Normal file
431
Source/Compatibility/Audio/OpenAL/AL/ALEnums.cs
Normal file
|
@ -0,0 +1,431 @@
|
|||
#region --- OpenTK.OpenAL License ---
|
||||
/* AlTokens.cs
|
||||
* C header: \OpenAL 1.1 SDK\include\Al.h
|
||||
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||
* See license.txt for license details
|
||||
* http://www.OpenTK.net */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
|
||||
///<summary>A list of valid Enable/Disable/IsEnabled parameters</summary>
|
||||
public enum ALCapability : int
|
||||
{
|
||||
///<summary>Currently no state toggles exist for vanilla OpenAL and no Extension uses it.</summary>
|
||||
Invalid = -1,
|
||||
}
|
||||
|
||||
///<summary>A list of valid 32-Bits Float Listener/GetListener parameters</summary>
|
||||
public enum ALListenerf : int
|
||||
{
|
||||
///<summary>Indicate the gain (Volume amplification) applied. Type: float Range: [0.0f - ? ] A value of 1.0 means un-attenuated/unchanged. Each division by 2 equals an attenuation of -6dB. Each multiplicaton with 2 equals an amplification of +6dB. A value of 0.0f is interpreted as zero volume and the channel is effectively disabled.</summary>
|
||||
Gain = 0x100A,
|
||||
|
||||
///<summary>(EFX Extension) This setting is critical if Air Absorption effects are enabled because the amount of Air Absorption applied is directly related to the real-world distance between the Source and the Listener. centimeters 0.01f meters 1.0f kilometers 1000.0f Range [float.MinValue .. float.MaxValue] Default: 1.0f</summary>
|
||||
EfxMetersPerUnit = 0x20004,
|
||||
}
|
||||
|
||||
///<summary>A list of valid Math.Vector3 Listener/GetListener parameters</summary>
|
||||
public enum ALListener3f : int
|
||||
{
|
||||
///<summary>Specify the current location in three dimensional space. OpenAL, like OpenGL, uses a right handed coordinate system, where in a frontal default view X (thumb) points right, Y points up (index finger), and Z points towards the viewer/camera (middle finger). To switch from a left handed coordinate system, flip the sign on the Z coordinate. Listener position is always in the world coordinate system.</summary>
|
||||
Position = 0x1004,
|
||||
|
||||
///<summary>Specify the current velocity in three dimensional space.</summary>
|
||||
Velocity = 0x1006,
|
||||
}
|
||||
|
||||
///<summary>A list of valid float[] Listener/GetListener parameters</summary>
|
||||
public enum ALListenerfv : int
|
||||
{
|
||||
///<summary>Indicate Listener orientation. Expects two Vector3, At followed by Up.</summary>
|
||||
Orientation = 0x100F,
|
||||
}
|
||||
|
||||
///<summary>A list of valid 32-Bits Float Source/GetSource parameters</summary>
|
||||
public enum ALSourcef : int
|
||||
{
|
||||
///<summary>Source specific reference distance. Type: float Range: [0.0f - float.PositiveInfinity] At 0.0f, no distance attenuation occurs. Type: float Default: 1.0f.</summary>
|
||||
ReferenceDistance = 0x1020,
|
||||
|
||||
///<summary>Indicate distance above which Sources are not attenuated using the inverse clamped distance model. Default: float.PositiveInfinity Type: float Range: [0.0f - float.PositiveInfinity]</summary>
|
||||
MaxDistance = 0x1023,
|
||||
|
||||
///<summary>Source specific rolloff factor. Type: float Range: [0.0f - float.PositiveInfinity]</summary>
|
||||
RolloffFactor = 0x1021,
|
||||
|
||||
///<summary>Specify the pitch to be applied, either at Source, or on mixer results, at Listener. Range: [0.5f - 2.0f] Default: 1.0f</summary>
|
||||
Pitch = 0x1003,
|
||||
|
||||
///<summary>Indicate the gain (volume amplification) applied. Type: float. Range: [0.0f - ? ] A value of 1.0 means un-attenuated/unchanged. Each division by 2 equals an attenuation of -6dB. Each multiplicaton with 2 equals an amplification of +6dB. A value of 0.0f is meaningless with respect to a logarithmic scale; it is interpreted as zero volume - the channel is effectively disabled.</summary>
|
||||
Gain = 0x100A,
|
||||
|
||||
///<summary>Indicate minimum Source attenuation. Type: float Range: [0.0f - 1.0f] (Logarthmic)</summary>
|
||||
MinGain = 0x100D,
|
||||
|
||||
///<summary>Indicate maximum Source attenuation. Type: float Range: [0.0f - 1.0f] (Logarthmic)</summary>
|
||||
MaxGain = 0x100E,
|
||||
|
||||
///<summary>Directional Source, inner cone angle, in degrees. Range: [0-360] Default: 360</summary>
|
||||
ConeInnerAngle = 0x1001,
|
||||
|
||||
///<summary>Directional Source, outer cone angle, in degrees. Range: [0-360] Default: 360</summary>
|
||||
ConeOuterAngle = 0x1002,
|
||||
|
||||
///<summary>Directional Source, outer cone gain. Default: 0.0f Range: [0.0f - 1.0] (Logarithmic)</summary>
|
||||
ConeOuterGain = 0x1022,
|
||||
|
||||
/// <summary>The playback position, expressed in seconds.</summary>
|
||||
SecOffset = 0x1024, // AL_EXT_OFFSET extension.
|
||||
|
||||
///<summary>(EFX Extension) This property is a multiplier on the amount of Air Absorption applied to the Source. The AL_AIR_ABSORPTION_FACTOR is multiplied by an internal Air Absorption Gain HF value of 0.994 (-0.05dB) per meter which represents normal atmospheric humidity and temperature. Range [0.0f .. 10.0f] Default: 0.0f</summary>
|
||||
EfxAirAbsorptionFactor = 0x20007,
|
||||
|
||||
///<summary>(EFX Extension) This property is defined the same way as the Reverb Room Rolloff property: it is one of two methods available in the Effect Extension to attenuate the reflected sound (early reflections and reverberation) according to source-listener distance. Range [0.0f .. 10.0f] Default: 0.0f</summary>
|
||||
EfxRoomRolloffFactor = 0x20008,
|
||||
|
||||
///<summary>(EFX Extension) A directed Source points in a specified direction. The Source sounds at full volume when the listener is directly in front of the source; it is attenuated as the listener circles the Source away from the front. Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
EfxConeOuterGainHighFrequency = 0x20009,
|
||||
|
||||
}
|
||||
|
||||
///<summary>A list of valid Math.Vector3 Source/GetSource parameters</summary>
|
||||
public enum ALSource3f : int
|
||||
{
|
||||
///<summary>Specify the current location in three dimensional space. OpenAL, like OpenGL, uses a right handed coordinate system, where in a frontal default view X (thumb) points right, Y points up (index finger), and Z points towards the viewer/camera (middle finger). To switch from a left handed coordinate system, flip the sign on the Z coordinate. Listener position is always in the world coordinate system.</summary>
|
||||
Position = 0x1004,
|
||||
|
||||
///<summary>Specify the current velocity in three dimensional space.</summary>
|
||||
Velocity = 0x1006,
|
||||
|
||||
///<summary>Specify the current direction vector.</summary>
|
||||
Direction = 0x1005,
|
||||
}
|
||||
|
||||
///<summary>A list of valid 8-Bits boolean Source/GetSource parameters</summary>
|
||||
public enum ALSourceb : int
|
||||
{
|
||||
///<summary>Indicate that the Source has relative coordinates. Type: bool Range: [True, False]</summary>
|
||||
SourceRelative = 0x202,
|
||||
|
||||
///<summary>Indicate whether the Source is looping. Type: bool Range: [True, False] Default: False.</summary>
|
||||
Looping = 0x1007,
|
||||
|
||||
///<summary>(EFX Extension) If this Source property is set to True, this Source’s direct-path is automatically filtered according to the orientation of the source relative to the listener and the setting of the Source property Sourcef.ConeOuterGainHF. Type: bool Range [False, True] Default: True</summary>
|
||||
EfxDirectFilterGainHighFrequencyAuto = 0x2000A,
|
||||
|
||||
///<summary>(EFX Extension) If this Source property is set to True, the intensity of this Source’s reflected sound is automatically attenuated according to source-listener distance and source directivity (as determined by the cone parameters). If it is False, the reflected sound is not attenuated according to distance and directivity. Type: bool Range [False, True] Default: True</summary>
|
||||
EfxAuxiliarySendFilterGainAuto = 0x2000B,
|
||||
|
||||
///<summary>(EFX Extension) If this Source property is AL_TRUE (its default value), the intensity of this Source’s reflected sound at high frequencies will be automatically attenuated according to the high-frequency source directivity as set by the Sourcef.ConeOuterGainHF property. If this property is AL_FALSE, the Source’s reflected sound is not filtered at all according to the Source’s directivity. Type: bool Range [False, True] Default: True</summary>
|
||||
EfxAuxiliarySendFilterGainHighFrequencyAuto = 0x2000C,
|
||||
}
|
||||
|
||||
///<summary>A list of valid Int32 Source parameters</summary>
|
||||
public enum ALSourcei : int
|
||||
{
|
||||
///<summary>The playback position, expressed in bytes.</summary>
|
||||
ByteOffset = 0x1026, // AL_EXT_OFFSET extension.
|
||||
|
||||
///<summary>The playback position, expressed in samples.</summary>
|
||||
SampleOffset = 0x1025, // AL_EXT_OFFSET extension.
|
||||
|
||||
///<summary>Indicate the Buffer to provide sound samples. Type: uint Range: any valid Buffer Handle.</summary>
|
||||
Buffer = 0x1009,
|
||||
|
||||
///<summary>Source type (Static, Streaming or undetermined). Use enum AlSourceType for comparison</summary>
|
||||
SourceType = 0x1027,
|
||||
|
||||
///<summary>(EFX Extension) This Source property is used to apply filtering on the direct-path (dry signal) of a Source.</summary>
|
||||
EfxDirectFilter = 0x20005,
|
||||
}
|
||||
|
||||
///<summary>A list of valid 3x Int32 Source/GetSource parameters</summary>
|
||||
public enum ALSource3i : int
|
||||
{
|
||||
///<summary>(EFX Extension) This Source property is used to establish connections between Sources and Auxiliary Effect Slots. For a Source to feed an Effect that has been loaded into an Auxiliary Effect Slot the application must configure one of the Source’s auxiliary sends. This process involves setting 3 variables – the destination Auxiliary Effect Slot ID, the Auxiliary Send number, and an optional Filter ID. Type: uint Range: any valid Filter Handle.</summary>
|
||||
EfxAuxiliarySendFilter = 0x20006,
|
||||
}
|
||||
|
||||
///<summary>A list of valid Int32 GetSource parameters</summary>
|
||||
public enum ALGetSourcei : int
|
||||
{
|
||||
///<summary>The playback position, expressed in bytes. AL_EXT_OFFSET Extension.</summary>
|
||||
ByteOffset = 0x1026,
|
||||
|
||||
///<summary>The playback position, expressed in samples. AL_EXT_OFFSET Extension.</summary>
|
||||
SampleOffset = 0x1025,
|
||||
|
||||
///<summary>Indicate the Buffer to provide sound samples. Type: uint Range: any valid Buffer Handle.</summary>
|
||||
Buffer = 0x1009,
|
||||
|
||||
/// <summary>The state of the source (Stopped, Playing, etc.) Use the enum AlSourceState for comparison.</summary>
|
||||
SourceState = 0x1010,
|
||||
|
||||
/// <summary>The number of buffers queued on this source.</summary>
|
||||
BuffersQueued = 0x1015,
|
||||
|
||||
/// <summary>The number of buffers in the queue that have been processed.</summary>
|
||||
BuffersProcessed = 0x1016,
|
||||
|
||||
///<summary>Source type (Static, Streaming or undetermined). Use enum AlSourceType for comparison.</summary>
|
||||
SourceType = 0x1027,
|
||||
}
|
||||
|
||||
/*
|
||||
public enum ALDeprecated : int
|
||||
{
|
||||
///<summary>Deprecated. Specify the channel mask. (Creative) Type: uint Range: [0 - 255]</summary>
|
||||
ChannelMask = 0x3000,
|
||||
}
|
||||
*/
|
||||
|
||||
///<summary>Source state information, can be retrieved by AL.Source() with ALSourcei.SourceState.</summary>
|
||||
public enum ALSourceState : int
|
||||
{
|
||||
///<summary>Default State when loaded, can be manually set with AL.SourceRewind().</summary>
|
||||
Initial = 0x1011,
|
||||
|
||||
///<summary>The source is currently playing.</summary>
|
||||
Playing = 0x1012,
|
||||
|
||||
///<summary>The source has paused playback.</summary>
|
||||
Paused = 0x1013,
|
||||
|
||||
///<summary>The source is not playing.</summary>
|
||||
Stopped = 0x1014,
|
||||
}
|
||||
|
||||
///<summary>Source type information, can be retrieved by AL.Source() with ALSourcei.SourceType.</summary>
|
||||
public enum ALSourceType : int
|
||||
{
|
||||
///<summary>Source is Static if a Buffer has been attached using AL.Source with the parameter Sourcei.Buffer.</summary>
|
||||
Static = 0x1028,
|
||||
|
||||
///<summary>Source is Streaming if one or more Buffers have been attached using AL.SourceQueueBuffers</summary>
|
||||
Streaming = 0x1029,
|
||||
|
||||
///<summary>Source is undetermined when it has a null Buffer attached</summary>
|
||||
Undetermined = 0x1030,
|
||||
}
|
||||
|
||||
///<summary>Sound samples: Format specifier.</summary>
|
||||
public enum ALFormat : int
|
||||
{
|
||||
///<summary>1 Channel, 8 Bits per sample.</summary>
|
||||
Mono8 = 0x1100,
|
||||
|
||||
///<summary>1 Channel, 16 Bits per sample.</summary>
|
||||
Mono16 = 0x1101,
|
||||
|
||||
///<summary>2 Channels, 8 Bits per sample each.</summary>
|
||||
Stereo8 = 0x1102,
|
||||
|
||||
///<summary>2 Channels, 16 Bits per sample each.</summary>
|
||||
Stereo16 = 0x1103,
|
||||
|
||||
/// <summary>1 Channel, A-law encoded data. Requires Extension: AL_EXT_ALAW</summary>
|
||||
MonoALawExt = 0x10016,
|
||||
|
||||
/// <summary>2 Channels, A-law encoded data. Requires Extension: AL_EXT_ALAW</summary>
|
||||
StereoALawExt = 0x10017,
|
||||
|
||||
/// <summary>1 Channel, µ-law encoded data. Requires Extension: AL_EXT_MULAW</summary>
|
||||
MonoMuLawExt = 0x10014,
|
||||
|
||||
/// <summary>2 Channels, µ-law encoded data. Requires Extension: AL_EXT_MULAW</summary>
|
||||
StereoMuLawExt = 0x10015,
|
||||
|
||||
/// <summary>Ogg Vorbis encoded data. Requires Extension: AL_EXT_vorbis</summary>
|
||||
VorbisExt = 0x10003,
|
||||
|
||||
/// <summary>MP3 encoded data. Requires Extension: AL_EXT_mp3</summary>
|
||||
Mp3Ext = 0x10020,
|
||||
|
||||
/// <summary>1 Channel, IMA4 ADPCM encoded data. Requires Extension: AL_EXT_IMA4</summary>
|
||||
MonoIma4Ext = 0x1300,
|
||||
|
||||
/// <summary>2 Channels, IMA4 ADPCM encoded data. Requires Extension: AL_EXT_IMA4</summary>
|
||||
StereoIma4Ext = 0x1301,
|
||||
|
||||
/// <summary>1 Channel, single-precision floating-point data. Requires Extension: AL_EXT_float32</summary>
|
||||
MonoFloat32Ext = 0x10010,
|
||||
|
||||
/// <summary>2 Channels, single-precision floating-point data. Requires Extension: AL_EXT_float32</summary>
|
||||
StereoFloat32Ext = 0x10011,
|
||||
|
||||
/// <summary>1 Channel, double-precision floating-point data. Requires Extension: AL_EXT_double</summary>
|
||||
MonoDoubleExt = 0x10012,
|
||||
|
||||
/// <summary>2 Channels, double-precision floating-point data. Requires Extension: AL_EXT_double</summary>
|
||||
StereoDoubleExt = 0x10013,
|
||||
|
||||
/// <summary>Multichannel 5.1, 16 Bits data. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
Multi51Chn16Ext = 0x120B,
|
||||
|
||||
/// <summary>Multichannel 5.1, 32 Bits data. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
Multi51Chn32Ext = 0x120C,
|
||||
|
||||
/// <summary>Multichannel 5.1, 8 Bits data. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
Multi51Chn8Ext = 0x120A,
|
||||
|
||||
/// <summary>Multichannel 6.1, 16 Bits data. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
Multi61Chn16Ext = 0x120E,
|
||||
|
||||
/// <summary>Multichannel 6.1, 32 Bits data. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
Multi61Chn32Ext = 0x120F,
|
||||
|
||||
/// <summary>Multichannel 6.1, 8 Bits data. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
Multi61Chn8Ext = 0x120D,
|
||||
|
||||
/// <summary>Multichannel 7.1, 16 Bits data. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
Multi71Chn16Ext = 0x1211,
|
||||
|
||||
/// <summary>Multichannel 7.1, 32 Bits data. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
Multi71Chn32Ext = 0x1212,
|
||||
|
||||
/// <summary>Multichannel 7.1, 8 Bits data. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
Multi71Chn8Ext = 0x1210,
|
||||
|
||||
/// <summary>Multichannel 4.0, 16 Bits data. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
MultiQuad16Ext = 0x1205,
|
||||
|
||||
/// <summary>Multichannel 4.0, 32 Bits data. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
MultiQuad32Ext = 0x1206,
|
||||
|
||||
/// <summary>Multichannel 4.0, 8 Bits data. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
MultiQuad8Ext = 0x1204,
|
||||
|
||||
/// <summary>1 Channel rear speaker, 16 Bits data. See Quadrophonic setups. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
MultiRear16Ext = 0x1208,
|
||||
|
||||
/// <summary>1 Channel rear speaker, 32 Bits data. See Quadrophonic setups. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
MultiRear32Ext = 0x1209,
|
||||
|
||||
/// <summary>1 Channel rear speaker, 8 Bits data. See Quadrophonic setups. Requires Extension: AL_EXT_MCFORMATS</summary>
|
||||
MultiRear8Ext = 0x1207,
|
||||
}
|
||||
|
||||
///<summary>A list of valid Int32 GetBuffer parameters</summary>
|
||||
public enum ALGetBufferi : int
|
||||
{
|
||||
///<summary>Sound sample's frequency, in units of Hertz [Hz]. This is the number of samples per second. Half of the sample frequency marks the maximum significant frequency component.</summary>
|
||||
Frequency = 0x2001,
|
||||
|
||||
/// <summary>Bit depth of the buffer. Should be 8 or 16.</summary>
|
||||
Bits = 0x2002,
|
||||
|
||||
/// <summary>Number of channels in buffer. > 1 is valid, but buffer won’t be positioned when played. 1 for Mono, 2 for Stereo.</summary>
|
||||
Channels = 0x2003,
|
||||
|
||||
/// <summary>size of the Buffer in bytes.</summary>
|
||||
Size = 0x2004,
|
||||
|
||||
// Deprecated: From Manual, not in header: AL_DATA ( i, iv ) original location where buffer was copied from generally useless, as was probably freed after buffer creation
|
||||
}
|
||||
|
||||
///<summary>Buffer state. Not supported for public use (yet).</summary>
|
||||
public enum ALBufferState : int
|
||||
{
|
||||
///<summary>Buffer state. Not supported for public use (yet).</summary>
|
||||
Unused = 0x2010,
|
||||
|
||||
///<summary>Buffer state. Not supported for public use (yet).</summary>
|
||||
Pending = 0x2011,
|
||||
|
||||
///<summary>Buffer state. Not supported for public use (yet).</summary>
|
||||
Processed = 0x2012,
|
||||
}
|
||||
|
||||
/// <summary>Returned by AL.GetError</summary>
|
||||
public enum ALError : int
|
||||
{
|
||||
///<summary>No OpenAL Error.</summary>
|
||||
NoError = 0,
|
||||
|
||||
///<summary>Invalid Name paramater passed to OpenAL call.</summary>
|
||||
InvalidName = 0xA001,
|
||||
|
||||
///<summary>Invalid parameter passed to OpenAL call.</summary>
|
||||
IllegalEnum = 0xA002,
|
||||
///<summary>Invalid parameter passed to OpenAL call.</summary>
|
||||
InvalidEnum = 0xA002,
|
||||
|
||||
///<summary>Invalid OpenAL enum parameter value.</summary>
|
||||
InvalidValue = 0xA003,
|
||||
|
||||
///<summary>Illegal OpenAL call.</summary>
|
||||
IllegalCommand = 0xA004,
|
||||
///<summary>Illegal OpenAL call.</summary>
|
||||
InvalidOperation = 0xA004,
|
||||
|
||||
///<summary>No OpenAL memory left.</summary>
|
||||
OutOfMemory = 0xA005,
|
||||
}
|
||||
|
||||
///<summary>A list of valid string AL.Get() parameters</summary>
|
||||
public enum ALGetString : int
|
||||
{
|
||||
/// <summary>Gets the Vendor name.</summary>
|
||||
Vendor = 0xB001,
|
||||
|
||||
/// <summary>Gets the driver version.</summary>
|
||||
Version = 0xB002,
|
||||
|
||||
/// <summary>Gets the renderer mode.</summary>
|
||||
Renderer = 0xB003,
|
||||
|
||||
/// <summary>Gets a list of all available Extensions, separated with spaces.</summary>
|
||||
Extensions = 0xB004,
|
||||
}
|
||||
|
||||
///<summary>A list of valid 32-Bits Float AL.Get() parameters</summary>
|
||||
public enum ALGetFloat : int
|
||||
{
|
||||
///<summary>Doppler scale. Default 1.0f</summary>
|
||||
DopplerFactor = 0xC000,
|
||||
|
||||
///<summary>Tweaks speed of propagation. This functionality is deprecated.</summary>
|
||||
DopplerVelocity = 0xC001,
|
||||
|
||||
///<summary>Speed of Sound in units per second. Default: 343.3f</summary>
|
||||
SpeedOfSound = 0xC003,
|
||||
}
|
||||
|
||||
///<summary>A list of valid Int32 AL.Get() parameters</summary>
|
||||
public enum ALGetInteger : int
|
||||
{
|
||||
///<summary>See enum ALDistanceModel.</summary><see cref="ALDistanceModel"/>
|
||||
DistanceModel = 0xD000,
|
||||
}
|
||||
|
||||
/// <summary>Used by AL.DistanceModel(), the distance model can be retrieved by AL.Get() with ALGetInteger.DistanceModel</summary>
|
||||
public enum ALDistanceModel : int
|
||||
{
|
||||
///<summary>Bypasses all distance attenuation calculation for all Sources.</summary>
|
||||
None = 0,
|
||||
|
||||
///<summary>InverseDistance is equivalent to the IASIG I3DL2 model with the exception that ALSourcef.ReferenceDistance does not imply any clamping.</summary>
|
||||
InverseDistance = 0xD001,
|
||||
|
||||
///<summary>InverseDistanceClamped is the IASIG I3DL2 model, with ALSourcef.ReferenceDistance indicating both the reference distance and the distance below which gain will be clamped.</summary>
|
||||
InverseDistanceClamped = 0xD002,
|
||||
|
||||
///<summary>AL_EXT_LINEAR_DISTANCE extension.</summary>
|
||||
LinearDistance = 0xD003,
|
||||
|
||||
///<summary>AL_EXT_LINEAR_DISTANCE extension.</summary>
|
||||
LinearDistanceClamped = 0xD004,
|
||||
|
||||
///<summary>AL_EXT_EXPONENT_DISTANCE extension.</summary>
|
||||
ExponentDistance = 0xD005,
|
||||
|
||||
///<summary>AL_EXT_EXPONENT_DISTANCE extension.</summary>
|
||||
ExponentDistanceClamped = 0xD006,
|
||||
}
|
||||
|
||||
}
|
1288
Source/Compatibility/Audio/OpenAL/AL/EffectsExtension.cs
Normal file
1288
Source/Compatibility/Audio/OpenAL/AL/EffectsExtension.cs
Normal file
File diff suppressed because it is too large
Load diff
361
Source/Compatibility/Audio/OpenAL/AL/EffectsExtensionEnums.cs
Normal file
361
Source/Compatibility/Audio/OpenAL/AL/EffectsExtensionEnums.cs
Normal file
|
@ -0,0 +1,361 @@
|
|||
#region --- OpenTK.OpenAL License ---
|
||||
/* EfxTokens.cs
|
||||
* C headers: \OpenAL 1.1 SDK\include\ "efx.h", "efx-creative.h", "Efx-Util.h"
|
||||
* Spec: Effects Extension Guide.pdf (bundled with OpenAL SDK)
|
||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||
* See license.txt for license details
|
||||
* http://www.OpenTK.net */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
#region Effect
|
||||
|
||||
///<summary>A list of valid 32-Bits Float Effect/GetEffect parameters</summary>
|
||||
public enum EfxEffectf : int
|
||||
{
|
||||
///<summary>Reverb Modal Density controls the coloration of the late reverb. Lowering the value adds more coloration to the late reverb. Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
ReverbDensity = 0x0001,
|
||||
///<summary>The Reverb Diffusion property controls the echo density in the reverberation decay. The default 1.0f provides the highest density. Reducing diffusion gives the reverberation a more "grainy" character that is especially noticeable with percussive sound sources. If you set a diffusion value of 0.0f, the later reverberation sounds like a succession of distinct echoes. Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
ReverbDiffusion = 0x0002,
|
||||
///<summary>The Reverb Gain property is the master volume control for the reflected sound - both early reflections and reverberation - that the reverb effect adds to all sound sources. Ranges from 1.0 (0db) (the maximum amount) to 0.0 (-100db) (no reflected sound at all) are accepted. Units: Linear gain Range [0.0f .. 1.0f] Default: 0.32f</summary>
|
||||
ReverbGain = 0x0003,
|
||||
///<summary>The Reverb Gain HF property further tweaks reflected sound by attenuating it at high frequencies. It controls a low-pass filter that applies globally to the reflected sound of all sound sources feeding the particular instance of the reverb effect. Ranges from 1.0f (0db) (no filter) to 0.0f (-100db) (virtually no reflected sound) are accepted. Units: Linear gain Range [0.0f .. 1.0f] Default: 0.89f</summary>
|
||||
ReverbGainHF = 0x0004,
|
||||
///<summary>The Decay Time property sets the reverberation decay time. It ranges from 0.1f (typically a small room with very dead surfaces) to 20.0 (typically a large room with very live surfaces). Unit: Seconds Range [0.1f .. 20.0f] Default: 1.49f</summary>
|
||||
ReverbDecayTime = 0x0005,
|
||||
///<summary>The Decay HF Ratio property sets the spectral quality of the Decay Time parameter. It is the ratio of high-frequency decay time relative to the time set by Decay Time.. Unit: linear multiplier Range [0.1f .. 2.0f] Default: 0.83f</summary>
|
||||
ReverbDecayHFRatio = 0x0006,
|
||||
///<summary>The Reflections Gain property controls the overall amount of initial reflections relative to the Gain property. The value of Reflections Gain ranges from a maximum of 3.16f (+10 dB) to a minimum of 0.0f (-100 dB) (no initial reflections at all), and is corrected by the value of the Gain property. Unit: Linear gain Range [0.0f .. 3.16f] Default: 0.05f</summary>
|
||||
ReverbReflectionsGain = 0x0007,
|
||||
///<summary>The Reflections Delay property is the amount of delay between the arrival time of the direct path from the source to the first reflection from the source. It ranges from 0 to 300 milliseconds. Unit: Seconds Range [0.0f .. 0.3f] Default: 0.007f</summary>
|
||||
ReverbReflectionsDelay = 0x0008,
|
||||
///<summary>The Late Reverb Gain property controls the overall amount of later reverberation relative to the Gain property. The value of Late Reverb Gain ranges from a maximum of 10.0f (+20 dB) to a minimum of 0.0f (-100 dB) (no late reverberation at all). Unit: Linear gain Range [0.0f .. 10.0f] Default: 1.26f</summary>
|
||||
ReverbLateReverbGain = 0x0009,
|
||||
///<summary>The Late Reverb Delay property defines the begin time of the late reverberation relative to the time of the initial reflection (the first of the early reflections). It ranges from 0 to 100 milliseconds. Unit: Seconds Range [0.0f .. 0.1f] Default: 0.011f</summary>
|
||||
ReverbLateReverbDelay = 0x000A,
|
||||
///<summary>The Air Absorption Gain HF property controls the distance-dependent attenuation at high frequencies caused by the propagation medium and applies to reflected sound only. Unit: Linear gain per meter Range [0.892f .. 1.0f] Default: 0.994f</summary>
|
||||
ReverbAirAbsorptionGainHF = 0x000B,
|
||||
///<summary>The Room Rolloff Factor property is one of two methods available to attenuate the reflected sound (containing both reflections and reverberation) according to source-listener distance. It's defined the same way as OpenAL's Rolloff Factor, but operates on reverb sound instead of direct-path sound. Unit: Linear multiplier Range [0.0f .. 10.0f] Default: 0.0f</summary>
|
||||
ReverbRoomRolloffFactor = 0x000C,
|
||||
|
||||
///<summary>This property sets the modulation rate of the low-frequency oscillator that controls the delay time of the delayed signals. Unit: Hz Range [0.0f .. 10.0f] Default: 1.1f</summary>
|
||||
ChorusRate = 0x0003,
|
||||
///<summary>This property controls the amount by which the delay time is modulated by the low-frequency oscillator. Range [0.0f .. 1.0f] Default: 0.1f</summary>
|
||||
ChorusDepth = 0x0004,
|
||||
///<summary>This property controls the amount of processed signal that is fed back to the input of the chorus effect. Negative values will reverse the phase of the feedback signal. At full magnitude the identical sample will repeat endlessly. Range [-1.0f .. +1.0f] Default: +0.25f</summary>
|
||||
ChorusFeedback = 0x0005,
|
||||
///<summary>This property controls the average amount of time the sample is delayed before it is played back, and with feedback, the amount of time between iterations of the sample. Larger values lower the pitch. Unit: Seconds Range [0.0f .. 0.016f] Default: 0.016f</summary>
|
||||
ChorusDelay = 0x0006,
|
||||
|
||||
///<summary>This property controls the shape of the distortion. The higher the value for Edge, the "dirtier" and "fuzzier" the effect. Range [0.0f .. 1.0f] Default: 0.2f</summary>
|
||||
DistortionEdge = 0x0001,
|
||||
///<summary>This property allows you to attenuate the distorted sound. Range [0.01f .. 1.0f] Default: 0.05f</summary>
|
||||
DistortionGain = 0x0002,
|
||||
///<summary>Input signals can have a low pass filter applied, to limit the amount of high frequency signal feeding into the distortion effect. Unit: Hz Range [80.0f .. 24000.0f] Default: 8000.0f</summary>
|
||||
DistortionLowpassCutoff = 0x0003,
|
||||
///<summary>This property controls the frequency at which the post-distortion attenuation (Distortion Gain) is active. Unit: Hz Range [80.0f .. 24000.0f] Default: 3600.0f</summary>
|
||||
DistortionEQCenter = 0x0004,
|
||||
///<summary>This property controls the bandwidth of the post-distortion attenuation. Unit: Hz Range [80.0f .. 24000.0f] Default: 3600.0f</summary>
|
||||
DistortionEQBandwidth = 0x0005,
|
||||
|
||||
///<summary>This property controls the delay between the original sound and the first "tap", or echo instance. Subsequently, the value for Echo Delay is used to determine the time delay between each "second tap" and the next "first tap". Unit: Seconds Range [0.0f .. 0.207f] Default: 0.1f</summary>
|
||||
EchoDelay = 0x0001,
|
||||
///<summary>This property controls the delay between the "first tap" and the "second tap". Subsequently, the value for Echo LR Delay is used to determine the time delay between each "first tap" and the next "second tap". Unit: Seconds Range [0.0f .. 0.404f] Default: 0.1f</summary>
|
||||
EchoLRDelay = 0x0002,
|
||||
///<summary>This property controls the amount of high frequency damping applied to each echo. As the sound is subsequently fed back for further echoes, damping results in an echo which progressively gets softer in tone as well as intensity. Range [0.0f .. 0.99f] Default: 0.5f</summary>
|
||||
EchoDamping = 0x0003,
|
||||
///<summary>This property controls the amount of feedback the output signal fed back into the input. Use this parameter to create "cascading" echoes. At full magnitude, the identical sample will repeat endlessly. Below full magnitude, the sample will repeat and fade. Range [0.0f .. 1.0f] Default: 0.5f</summary>
|
||||
EchoFeedback = 0x0004,
|
||||
///<summary>This property controls how hard panned the individual echoes are. With a value of 1.0f, the first "tap" will be panned hard left, and the second "tap" hard right. –1.0f gives the opposite result and values near to 0.0f result in less emphasized panning. Range [-1.0f .. +1.0f] Default: -1.0f</summary>
|
||||
EchoSpread = 0x0005,
|
||||
|
||||
///<summary>The number of times per second the low-frequency oscillator controlling the amount of delay repeats. Range [0.0f .. 10.0f] Default: 0.27f</summary>
|
||||
FlangerRate = 0x0003,
|
||||
///<summary>The ratio by which the delay time is modulated by the low-frequency oscillator. Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
FlangerDepth = 0x0004,
|
||||
///<summary>This is the amount of the output signal level fed back into the effect's input. A negative value will reverse the phase of the feedback signal. Range [-1.0f .. +1.0f] Default: -0.5f</summary>
|
||||
FlangerFeedback = 0x0005,
|
||||
///<summary>The average amount of time the sample is delayed before it is played back. When used with the Feedback property it's the amount of time between iterations of the sample. Unit: Seconds Range [0.0f .. 0.004f] Default: 0.002f</summary>
|
||||
FlangerDelay = 0x0006,
|
||||
|
||||
///<summary>This is the carrier frequency. For carrier frequencies below the audible range, the single sideband modulator may produce phaser effects, spatial effects or a slight pitch-shift. As the carrier frequency increases, the timbre of the sound is affected. Unit: Hz Range [0.0f .. 24000.0f] Default: 0.0f</summary>
|
||||
FrequencyShifterFrequency = 0x0001,
|
||||
|
||||
///<summary>This controls the frequency of the low-frequency oscillator used to morph between the two phoneme filters. Unit: Hz Range [0.0f .. 10.0f] Default: 1.41f</summary>
|
||||
VocalMorpherRate = 0x0006,
|
||||
|
||||
///<summary>This is the frequency of the carrier signal. If the carrier signal is slowly varying (less than 20 Hz), the result is a slow amplitude variation effect (tremolo). Unit: Hz Range [0.0f .. 8000.0f] Default: 440.0f</summary>
|
||||
RingModulatorFrequency = 0x0001,
|
||||
///<summary>This controls the cutoff frequency at which the input signal is high-pass filtered before being ring modulated. Unit: Hz Range [0.0f .. 24000.0f] Default: 800.0f</summary>
|
||||
RingModulatorHighpassCutoff = 0x0002,
|
||||
|
||||
///<summary>This property controls the time the filtering effect takes to sweep from minimum to maximum center frequency when it is triggered by input signal. Unit: Seconds Range [0.0001f .. 1.0f] Default: 0.06f</summary>
|
||||
AutowahAttackTime = 0x0001,
|
||||
///<summary>This property controls the time the filtering effect takes to sweep from maximum back to base center frequency, when the input signal ends. Unit: Seconds Range [0.0001f .. 1.0f] Default: 0.06f</summary>
|
||||
AutowahReleaseTime = 0x0002,
|
||||
///<summary>This property controls the resonant peak, sometimes known as emphasis or Q, of the auto-wah band-pass filter. Range [2.0f .. 1000.0f] Default: 1000.0f</summary>
|
||||
AutowahResonance = 0x0003,
|
||||
///<summary>This property controls the input signal level at which the band-pass filter will be fully opened. Range [0.00003f .. 31621.0f] Default: 11.22f</summary>
|
||||
AutowahPeakGain = 0x0004,
|
||||
|
||||
///<summary>This property controls amount of cut or boost on the low frequency range. Range [0.126f .. 7.943f] Default: 1.0f</summary>
|
||||
EqualizerLowGain = 0x0001,
|
||||
///<summary>This property controls the low frequency below which signal will be cut off. Unit: Hz Range [50.0f .. 800.0f] Default: 200.0f</summary>
|
||||
EqualizerLowCutoff = 0x0002,
|
||||
///<summary>This property allows you to cut/boost signal on the "mid1" range. Range [0.126f .. 7.943f] Default: 1.0f</summary>
|
||||
EqualizerMid1Gain = 0x0003,
|
||||
///<summary>This property sets the center frequency for the "mid1" range. Unit: Hz Range [200.0f .. 3000.0f] Default: 500.0f</summary>
|
||||
EqualizerMid1Center = 0x0004,
|
||||
///<summary>This property controls the width of the "mid1" range. Range [0.01f .. 1.0f] Default: 1.0f</summary>
|
||||
EqualizerMid1Width = 0x0005,
|
||||
///<summary>This property allows you to cut/boost signal on the "mid2" range. Range [0.126f .. 7.943f] Default: 1.0f</summary>
|
||||
EqualizerMid2Gain = 0x0006,
|
||||
///<summary>This property sets the center frequency for the "mid2" range. Unit: Hz Range [1000.0f .. 8000.0f] Default: 3000.0f</summary>
|
||||
EqualizerMid2Center = 0x0007,
|
||||
///<summary>This property controls the width of the "mid2" range. Range [0.01f .. 1.0f] Default: 1.0f</summary>
|
||||
EqualizerMid2Width = 0x0008,
|
||||
///<summary>This property allows to cut/boost the signal at high frequencies. Range [0.126f .. 7.943f] Default: 1.0f</summary>
|
||||
EqualizerHighGain = 0x0009,
|
||||
///<summary>This property controls the high frequency above which signal will be cut off. Unit: Hz Range [4000.0f .. 16000.0f] Default: 6000.0f</summary>
|
||||
EqualizerHighCutoff = 0x000A,
|
||||
|
||||
///<summary>Reverb Modal Density controls the coloration of the late reverb. Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
EaxReverbDensity = 0x0001,
|
||||
///<summary>The Reverb Diffusion property controls the echo density in the reverberation decay. Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
EaxReverbDiffusion = 0x0002,
|
||||
///<summary>Reverb Gain controls the level of the reverberant sound in an environment. A high level of reverb is characteristic of rooms with highly reflective walls and/or small dimensions. Unit: Linear gain Range [0.0f .. 1.0f] Default: 0.32f</summary>
|
||||
EaxReverbGain = 0x0003,
|
||||
///<summary>Gain HF is used to attenuate the high frequency content of all the reflected sound in an environment. You can use this property to give a room specific spectral characteristic. Unit: Linear gain Range [0.0f .. 1.0f] Default: 0.89f</summary>
|
||||
EaxReverbGainHF = 0x0004,
|
||||
///<summary>Gain LF is the low frequency counterpart to Gain HF. Use this to reduce or boost the low frequency content in an environment. Unit: Linear gain Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
EaxReverbGainLF = 0x0005,
|
||||
///<summary>The Decay Time property sets the reverberation decay time. It ranges from 0.1f (typically a small room with very dead surfaces) to 20.0f (typically a large room with very live surfaces). Unit: Seconds Range [0.1f .. 20.0f] Default: 1.49f</summary>
|
||||
EaxReverbDecayTime = 0x0006,
|
||||
///<summary>Decay HF Ratio scales the decay time of high frequencies relative to the value of the Decay Time property. By changing this value, you are changing the amount of time it takes for the high frequencies to decay compared to the mid frequencies of the reverb. Range [0.1f .. 2.0f] Default: 0.83f</summary>
|
||||
EaxReverbDecayHFRatio = 0x0007,
|
||||
///<summary>Decay LF Ratio scales the decay time of low frequencies in the reverberation in the same manner that Decay HF Ratio handles high frequencies. Unit: Linear multiplier Range [0.1f .. 2.0f] Default: 1.0f</summary>
|
||||
EaxReverbDecayLFRatio = 0x0008,
|
||||
///<summary>Reflections Gain sets the level of the early reflections in an environment. Early reflections are used as a cue for determining the size of the environment we are in. Unit: Linear gain Range [0.0f .. 3.16f] Default: 0.05f</summary>
|
||||
EaxReverbReflectionsGain = 0x0009,
|
||||
///<summary>Reflections Delay controls the amount of time it takes for the first reflected wave front to reach the listener, relative to the arrival of the direct-path sound. Unit: Seconds Range [0.0f .. 0.3f] Default: 0.007f</summary>
|
||||
EaxReverbReflectionsDelay = 0x000A,
|
||||
///<summary>The Late Reverb Gain property controls the overall amount of later reverberation relative to the Gain property. Range [0.0f .. 10.0f] Default: 1.26f</summary>
|
||||
EaxReverbLateReverbGain = 0x000C,
|
||||
///<summary>The Late Reverb Delay property defines the begin time of the late reverberation relative to the time of the initial reflection (the first of the early reflections). It ranges from 0 to 100 milliseconds. Unit: Seconds Range [0.0f .. 0.1f] Default: 0.011f</summary>
|
||||
EaxReverbLateReverbDelay = 0x000D,
|
||||
///<summary>Echo Time controls the rate at which the cyclic echo repeats itself along the reverberation decay. Range [0.075f .. 0.25f] Default: 0.25f</summary>
|
||||
EaxReverbEchoTime = 0x000F,
|
||||
///<summary>Echo Depth introduces a cyclic echo in the reverberation decay, which will be noticeable with transient or percussive sounds. Range [0.0f .. 1.0f] Default: 0.0f</summary>
|
||||
EaxReverbEchoDepth = 0x0010,
|
||||
///<summary>Modulation Time controls the speed of the rate of periodic changes in pitch (vibrato). Range [0.04f .. 4.0f] Default: 0.25f</summary>
|
||||
EaxReverbModulationTime = 0x0011,
|
||||
///<summary>Modulation Depth controls the amount of pitch change. Low values of Diffusion will contribute to reinforcing the perceived effect by reducing the mixing of overlapping reflections in the reverberation decay. Range [0.0f .. 1.0f] Default: 0.0f</summary>
|
||||
EaxReverbModulationDepth = 0x0012,
|
||||
///<summary>The Air Absorption Gain HF property controls the distance-dependent attenuation at high frequencies caused by the propagation medium. It applies to reflected sound only. Range [0.892f .. 1.0f] Default: 0.994f</summary>
|
||||
EaxReverbAirAbsorptionGainHF = 0x0013,
|
||||
///<summary>The property HF reference determines the frequency at which the high-frequency effects created by Reverb properties are measured. Unit: Hz Range [1000.0f .. 20000.0f] Default: 5000.0f</summary>
|
||||
EaxReverbHFReference = 0x0014,
|
||||
///<summary>The property LF reference determines the frequency at which the low-frequency effects created by Reverb properties are measured. Unit: Hz Range [20.0f .. 1000.0f] Default: 250.0f</summary>
|
||||
EaxReverbLFReference = 0x0015,
|
||||
///<summary>The Room Rolloff Factor property is one of two methods available to attenuate the reflected sound (containing both reflections and reverberation) according to source-listener distance. It's defined the same way as OpenAL Rolloff Factor, but operates on reverb sound instead of direct-path sound. Range [0.0f .. 10.0f] Default: 0.0f</summary>
|
||||
EaxReverbRoomRolloffFactor = 0x0016,
|
||||
}
|
||||
|
||||
///<summary>A list of valid Math.Vector3 Effect/GetEffect parameters</summary>
|
||||
public enum EfxEffect3f : int
|
||||
{
|
||||
/// <summary>Reverb Pan does for the Reverb what Reflections Pan does for the Reflections. Unit: Vector3 of length 0f to 1f Default: {0.0f, 0.0f, 0.0f}</summary>
|
||||
EaxReverbLateReverbPan = 0x000E,
|
||||
/// <summary>This Vector3 controls the spatial distribution of the cluster of early reflections. The direction of this vector controls the global direction of the reflections, while its magnitude controls how focused the reflections are towards this direction. For legacy reasons this Vector3 follows a left-handed co-ordinate system! Note that OpenAL uses a right-handed coordinate system. Unit: Vector3 of length 0f to 1f Default: {0.0f, 0.0f, 0.0f}</summary>
|
||||
EaxReverbReflectionsPan = 0x000B,
|
||||
}
|
||||
|
||||
///<summary>A list of valid Int32 Effect/GetEffect parameters</summary>
|
||||
public enum EfxEffecti : int
|
||||
{
|
||||
///<summary>This property sets the waveform shape of the low-frequency oscillator that controls the delay time of the delayed signals. Unit: (0) Sinusoid, (1) Triangle Range [0 .. 1] Default: 1</summary>
|
||||
ChorusWaveform = 0x0001,
|
||||
///<summary>This property controls the phase difference between the left and right low-frequency oscillators. At zero degrees the two low-frequency oscillators are synchronized. Unit: Degrees Range [-180 .. 180] Default: 90</summary>
|
||||
ChorusPhase = 0x0002,
|
||||
|
||||
///<summary>Selects the shape of the low-frequency oscillator waveform that controls the amount of the delay of the sampled signal. Unit: (0) Sinusoid, (1) Triangle Range [0 .. 1] Default: 1</summary>
|
||||
FlangerWaveform = 0x0001,
|
||||
///<summary>This changes the phase difference between the left and right low-frequency oscillator's. At zero degrees the two low-frequency oscillators are synchronized. Range [-180 .. +180] Default: 0</summary>
|
||||
FlangerPhase = 0x0002,
|
||||
|
||||
///<summary>These select which internal signals are added together to produce the output. Unit: (0) Down, (1) Up, (2) Off Range [0 .. 2] Default: 0</summary>
|
||||
FrequencyShifterLeftDirection = 0x0002,
|
||||
///<summary>These select which internal signals are added together to produce the output. Unit: (0) Down, (1) Up, (2) Off Range [0 .. 2] Default: 0</summary>
|
||||
FrequencyShifterRightDirection = 0x0003,
|
||||
|
||||
///<summary>Sets the vocal morpher 4-band formant filter A, used to impose vocal tract effects upon the input signal. The vocal morpher is not necessarily intended for use on voice signals; it is primarily intended for pitched noise effects, vocal-like wind effects, etc. Unit: Use enum EfxFormantFilterSettings Range [0 .. 29] Default: 0, "Phoneme A"</summary>
|
||||
VocalMorpherPhonemeA = 0x0001,
|
||||
///<summary>This is used to adjust the pitch of phoneme filter A in 1-semitone increments. Unit: Semitones Range [-24 .. +24] Default: 0</summary>
|
||||
VocalMorpherPhonemeACoarseTuning = 0x0002,
|
||||
///<summary>Sets the vocal morpher 4-band formant filter B, used to impose vocal tract effects upon the input signal. The vocal morpher is not necessarily intended for use on voice signals; it is primarily intended for pitched noise effects, vocal-like wind effects, etc. Unit: Use enum EfxFormantFilterSettings Range [0 .. 29] Default: 10, "Phoneme ER"</summary>
|
||||
VocalMorpherPhonemeB = 0x0003,
|
||||
///<summary>This is used to adjust the pitch of phoneme filter B in 1-semitone increments. Unit: Semitones Range [-24 .. +24] Default: 0</summary>
|
||||
VocalMorpherPhonemeBCoarseTuning = 0x0004,
|
||||
///<summary>This controls the shape of the low-frequency oscillator used to morph between the two phoneme filters. Unit: (0) Sinusoid, (1) Triangle, (2) Sawtooth Range [0 .. 2] Default: 0</summary>
|
||||
VocalMorpherWaveform = 0x0005,
|
||||
|
||||
///<summary>This sets the number of semitones by which the pitch is shifted. There are 12 semitones per octave. Unit: Semitones Range [-12 .. +12] Default: +12</summary>
|
||||
PitchShifterCoarseTune = 0x0001,
|
||||
///<summary>This sets the number of cents between Semitones a pitch is shifted. A Cent is 1/100th of a Semitone. Unit: Cents Range [-50 .. +50] Default: 0</summary>
|
||||
PitchShifterFineTune = 0x0002,
|
||||
|
||||
///<summary>This controls which waveform is used as the carrier signal. Traditional ring modulator and tremolo effects generally use a sinusoidal carrier. Unit: (0) Sinusoid, (1) Sawtooth, (2) Square Range [0 .. 2] Default: 0</summary>
|
||||
RingModulatorWaveform = 0x0003,
|
||||
|
||||
///<summary>Enabling this will result in audio exhibiting smaller variation in intensity between the loudest and quietest portions. Unit: (0) Off, (1) On Range [0 .. 1] Default: 1</summary>
|
||||
CompressorOnoff = 0x0001,
|
||||
|
||||
///<summary>When this flag is set, the high-frequency decay time automatically stays below a limit value that's derived from the setting of the property Air Absorption HF. Unit: (0) False, (1) True Range [False, True] Default: True</summary>
|
||||
ReverbDecayHFLimit = 0x000D,
|
||||
|
||||
///<summary>When this flag is set, the high-frequency decay time automatically stays below a limit value that's derived from the setting of the property AirAbsorptionGainHF. Unit: (0) False, (1) True Range [False, True] Default: True</summary>
|
||||
EaxReverbDecayHFLimit = 0x0017,
|
||||
|
||||
/// <summary>Used with the enum EfxEffectType as it's parameter.</summary>
|
||||
EffectType = 0x8001,
|
||||
}
|
||||
|
||||
///<summary>Vocal morpher effect parameters. If both parameters are set to the same phoneme, that determines the filtering effect that will be heard. If these two parameters are set to different phonemes, the filtering effect will morph between the two settings at a rate specified by EfxEffectf.VocalMorpherRate.</summary>
|
||||
public enum EfxFormantFilterSettings : int
|
||||
{
|
||||
VocalMorpherPhonemeA = 0,
|
||||
VocalMorpherPhonemeE = 1,
|
||||
VocalMorpherPhonemeI = 2,
|
||||
VocalMorpherPhonemeO = 3,
|
||||
VocalMorpherPhonemeU = 4,
|
||||
VocalMorpherPhonemeAA = 5,
|
||||
VocalMorpherPhonemeAE = 6,
|
||||
VocalMorpherPhonemeAH = 7,
|
||||
VocalMorpherPhonemeAO = 8,
|
||||
VocalMorpherPhonemeEH = 9,
|
||||
VocalMorpherPhonemeER = 10,
|
||||
VocalMorpherPhonemeIH = 11,
|
||||
VocalMorpherPhonemeIY = 12,
|
||||
VocalMorpherPhonemeUH = 13,
|
||||
VocalMorpherPhonemeUW = 14,
|
||||
VocalMorpherPhonemeB = 15,
|
||||
VocalMorpherPhonemeD = 16,
|
||||
VocalMorpherPhonemeF = 17,
|
||||
VocalMorpherPhonemeG = 18,
|
||||
VocalMorpherPhonemeJ = 19,
|
||||
VocalMorpherPhonemeK = 20,
|
||||
VocalMorpherPhonemeL = 21,
|
||||
VocalMorpherPhonemeM = 22,
|
||||
VocalMorpherPhonemeN = 23,
|
||||
VocalMorpherPhonemeP = 24,
|
||||
VocalMorpherPhonemeR = 25,
|
||||
VocalMorpherPhonemeS = 26,
|
||||
VocalMorpherPhonemeT = 27,
|
||||
VocalMorpherPhonemeV = 28,
|
||||
VocalMorpherPhonemeZ = 29,
|
||||
}
|
||||
|
||||
///<summary>Effect type definitions to be used with EfxEffecti.EffectType.</summary>
|
||||
public enum EfxEffectType : int
|
||||
{
|
||||
///<summary>No Effect, disable. This Effect type is used when an Effect object is initially created.</summary>
|
||||
Null = 0x0000,
|
||||
///<summary>The Reverb effect is the standard Effects Extension's environmental reverberation effect. It is available on all Generic Software and Generic Hardware devices.</summary>
|
||||
Reverb = 0x0001,
|
||||
///<summary>The Chorus effect essentially replays the input audio accompanied by another slightly delayed version of the signal, creating a "doubling" effect.</summary>
|
||||
Chorus = 0x0002,
|
||||
///<summary>The Distortion effect simulates turning up (overdriving) the gain stage on a guitar amplifier or adding a distortion pedal to an instrument's output.</summary>
|
||||
Distortion = 0x0003,
|
||||
///<summary>The Echo effect generates discrete, delayed instances of the input signal.</summary>
|
||||
Echo = 0x0004,
|
||||
///<summary>The Flanger effect creates a "tearing" or "whooshing" sound, like a jet flying overhead.</summary>
|
||||
Flanger = 0x0005,
|
||||
///<summary>The Frequency shifter is a single-sideband modulator, which translates all the component frequencies of the input signal by an equal amount.</summary>
|
||||
FrequencyShifter = 0x0006,
|
||||
///<summary>The Vocal morpher consists of a pair of 4-band formant filters, used to impose vocal tract effects upon the input signal.</summary>
|
||||
VocalMorpher = 0x0007,
|
||||
///<summary>The Pitch shifter applies time-invariant pitch shifting to the input signal, over a one octave range and controllable at a semi-tone and cent resolution.</summary>
|
||||
PitchShifter = 0x0008,
|
||||
///<summary>The Ring modulator multiplies an input signal by a carrier signal in the time domain, resulting in tremolo or inharmonic effects.</summary>
|
||||
RingModulator = 0x0009,
|
||||
///<summary>The Auto-wah effect emulates the sound of a wah-wah pedal used with an electric guitar, or a mute on a brass instrument.</summary>
|
||||
Autowah = 0x000A,
|
||||
///<summary>The Compressor will boost quieter portions of the audio, while louder portions will stay the same or may even be reduced.</summary>
|
||||
Compressor = 0x000B,
|
||||
///<summary>The Equalizer is very flexible, providing tonal control over four different adjustable frequency ranges.</summary>
|
||||
Equalizer = 0x000C,
|
||||
///<summary>The EAX Reverb has a more advanced parameter set than EfxEffectType.Reverb, but is only natively supported on devices that support the EAX 3.0 or above.</summary>
|
||||
EaxReverb = 0x8000,
|
||||
}
|
||||
|
||||
#endregion Effect
|
||||
|
||||
#region Auxiliary Effect Slot
|
||||
|
||||
///<summary>A list of valid Int32 AuxiliaryEffectSlot/GetAuxiliaryEffectSlot parameters</summary>
|
||||
public enum EfxAuxiliaryi : int
|
||||
{
|
||||
/// <summary>This property is used to attach an Effect object to the Auxiliary Effect Slot object. After the attachment, the Auxiliary Effect Slot object will contain the effect type and have the same effect parameters that were stored in the Effect object. Any Sources feeding the Auxiliary Effect Slot will immediate feed the new effect type and new effect parameters.</summary>
|
||||
EffectslotEffect = 0x0001,
|
||||
|
||||
/// <summary>This property is used to enable or disable automatic send adjustments based on the physical positions of the sources and the listener. This property should be enabled when an application wishes to use a reverb effect to simulate the environment surrounding a listener or a collection of Sources. Range [False, True] Default: True </summary>
|
||||
EffectslotAuxiliarySendAuto = 0x0003,
|
||||
}
|
||||
|
||||
///<summary>A list of valid 32-Bits Float AuxiliaryEffectSlot/GetAuxiliaryEffectSlot parameters</summary>
|
||||
public enum EfxAuxiliaryf : int
|
||||
{
|
||||
/// <summary>This property is used to specify an output level for the Auxiliary Effect Slot. Setting the gain to 0.0f mutes the output. Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
EffectslotGain = 0x0002,
|
||||
}
|
||||
|
||||
#endregion Auxiliary Effect Slot
|
||||
|
||||
#region Filter Object
|
||||
|
||||
///<summary>A list of valid 32-Bits Float Filter/GetFilter parameters</summary>
|
||||
public enum EfxFilterf : int
|
||||
{
|
||||
///<summary>Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
LowpassGain = 0x0001,
|
||||
///<summary>Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
LowpassGainHF = 0x0002,
|
||||
|
||||
///<summary>Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
HighpassGain = 0x0001,
|
||||
///<summary>Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
HighpassGainLF = 0x0002,
|
||||
|
||||
///<summary>Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
BandpassGain = 0x0001,
|
||||
///<summary>Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
BandpassGainLF = 0x0002,
|
||||
///<summary>Range [0.0f .. 1.0f] Default: 1.0f</summary>
|
||||
BandpassGainHF = 0x0003,
|
||||
}
|
||||
|
||||
///<summary>A list of valid Int32 Filter/GetFilter parameters</summary>
|
||||
public enum EfxFilteri : int
|
||||
{
|
||||
/// <summary>Used with the enum EfxFilterType as Parameter to select a filter logic.</summary>
|
||||
FilterType = 0x8001,
|
||||
}
|
||||
|
||||
///<summary>Filter type definitions to be used with EfxFilteri.FilterType.</summary>
|
||||
public enum EfxFilterType : int
|
||||
{
|
||||
///<summary>No Filter, disable. This Filter type is used when a Filter object is initially created.</summary>
|
||||
Null = 0x0000,
|
||||
/// <summary>A low-pass filter is used to remove high frequency content from a signal.</summary>
|
||||
Lowpass = 0x0001,
|
||||
///<summary>Currently not implemented. A high-pass filter is used to remove low frequency content from a signal.</summary>
|
||||
Highpass = 0x0002,
|
||||
///<summary>Currently not implemented. A band-pass filter is used to remove high and low frequency content from a signal.</summary>
|
||||
Bandpass = 0x0003,
|
||||
}
|
||||
|
||||
#endregion Filter Object
|
||||
}
|
369
Source/Compatibility/Audio/OpenAL/AL/EffectsExtensionPresets.cs
Normal file
369
Source/Compatibility/Audio/OpenAL/AL/EffectsExtensionPresets.cs
Normal file
|
@ -0,0 +1,369 @@
|
|||
#region --- OpenTK.OpenAL License ---
|
||||
/* EfxPresets.cs
|
||||
* C headers: \OpenAL 1.1 SDK\include\ "efx.h", "efx-creative.h", "Efx-Util.h"
|
||||
* Spec: Effects Extension Guide.pdf (bundled with OpenAL SDK)
|
||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||
* See license.txt for license details
|
||||
* http://www.OpenTK.net */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
public partial class EffectsExtension
|
||||
{
|
||||
// Todo: Add documentation
|
||||
// Todo: CLS compliance.
|
||||
|
||||
#pragma warning disable 1591
|
||||
|
||||
[CLSCompliant(false)]
|
||||
public struct EaxReverb
|
||||
{
|
||||
public uint Environment; // TODO: EAX-EFX conversion
|
||||
public float EnvironmentSize; // TODO: EAX-EFX conversion
|
||||
public float EnvironmentDiffusion; // TODO: EAX-EFX conversion
|
||||
public int Room; // TODO: EAX-EFX conversion
|
||||
public int RoomHF; // TODO: EAX-EFX conversion
|
||||
public int RoomLF; // TODO: EAX-EFX conversion
|
||||
public float DecayTime;
|
||||
public float DecayHFRatio;
|
||||
public float DecayLFRatio;
|
||||
public int Reflections; // TODO: EAX-EFX conversion
|
||||
public float ReflectionsDelay;
|
||||
public Vector3 ReflectionsPan;
|
||||
public int Reverb; // TODO: EAX-EFX conversion
|
||||
public float ReverbDelay;
|
||||
public Vector3 ReverbPan;
|
||||
public float EchoTime;
|
||||
public float EchoDepth;
|
||||
public float ModulationTime;
|
||||
public float ModulationDepth;
|
||||
public float AirAbsorptionHF;
|
||||
public float HFReference;
|
||||
public float LFReference;
|
||||
public float RoomRolloffFactor;
|
||||
public uint Flags; // TODO: EAX-EFX conversion
|
||||
|
||||
public EaxReverb(uint environment,
|
||||
float environmentSize,
|
||||
float environmentDiffusion,
|
||||
int room,
|
||||
int roomHF,
|
||||
int roomLF,
|
||||
float decayTime,
|
||||
float decayHFRatio,
|
||||
float decayLFRatio,
|
||||
int reflections,
|
||||
float reflectionsDelay,
|
||||
float reflectionsPanX,
|
||||
float reflectionsPanY,
|
||||
float reflectionsPanZ,
|
||||
int reverb,
|
||||
float reverbDelay,
|
||||
float reverbPanX,
|
||||
float reverbPanY,
|
||||
float reverbPanZ,
|
||||
float echoTime,
|
||||
float echoDepth,
|
||||
float modulationTime,
|
||||
float modulationDepth,
|
||||
float airAbsorptionHF,
|
||||
float hfReference,
|
||||
float lfReference,
|
||||
float roomRolloffFactor,
|
||||
uint flags)
|
||||
{
|
||||
Environment = environment;
|
||||
EnvironmentSize = environmentSize;
|
||||
EnvironmentDiffusion = environmentDiffusion;
|
||||
Room = room;
|
||||
RoomHF = roomHF;
|
||||
RoomLF = roomLF;
|
||||
DecayTime = decayTime;
|
||||
DecayHFRatio = decayHFRatio;
|
||||
DecayLFRatio = decayLFRatio;
|
||||
Reflections = reflections;
|
||||
ReflectionsDelay = reflectionsDelay;
|
||||
ReflectionsPan = new Vector3(reflectionsPanX, reflectionsPanY, reflectionsPanZ);
|
||||
Reverb = reverb;
|
||||
ReverbDelay = reverbDelay;
|
||||
ReverbPan = new Vector3(reverbPanX, reverbPanY, reverbPanZ);
|
||||
EchoTime = echoTime;
|
||||
EchoDepth = echoDepth;
|
||||
ModulationTime = modulationTime;
|
||||
ModulationDepth = modulationDepth;
|
||||
AirAbsorptionHF = airAbsorptionHF;
|
||||
HFReference = hfReference;
|
||||
LFReference = lfReference;
|
||||
RoomRolloffFactor = roomRolloffFactor;
|
||||
Flags = flags;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// TODO: CLS compliance.
|
||||
[CLSCompliant(false)]
|
||||
public static void GetEaxFromEfxEax(ref EaxReverb input, out EfxEaxReverb output)
|
||||
{
|
||||
output.AirAbsorptionGainHF = 0.995f; // input.AirAbsorptionHF * somegain?
|
||||
output.RoomRolloffFactor = input.RoomRolloffFactor;
|
||||
|
||||
output.Density = 1f; // todo, currently default
|
||||
output.Diffusion = 1f; // todo, currently default
|
||||
|
||||
output.DecayTime = input.DecayTime;
|
||||
output.DecayHFLimit = 1; // todo, currently default
|
||||
output.DecayHFRatio = input.DecayHFRatio;
|
||||
output.DecayLFRatio = input.DecayLFRatio;
|
||||
|
||||
output.EchoDepth = input.EchoDepth;
|
||||
output.EchoTime = input.EchoTime;
|
||||
|
||||
output.Gain = 0.32f; // todo, currently default
|
||||
output.GainHF = 0.89f; // todo, currently default
|
||||
output.GainLF = 1f;// todo, currently default
|
||||
|
||||
output.LFReference = input.LFReference;
|
||||
output.HFReference = input.HFReference;
|
||||
|
||||
output.LateReverbDelay = input.ReverbDelay;
|
||||
output.LateReverbGain = 1.26f; // todo, currently default
|
||||
output.LateReverbPan = input.ReverbPan;
|
||||
|
||||
output.ModulationDepth = input.ModulationDepth;
|
||||
output.ModulationTime = input.ModulationTime;
|
||||
|
||||
output.ReflectionsDelay = input.ReflectionsDelay;
|
||||
output.ReflectionsGain = 0.05f; // todo, currently default
|
||||
output.ReflectionsPan = input.ReflectionsPan;
|
||||
}
|
||||
|
||||
public struct EfxEaxReverb
|
||||
{
|
||||
public float Density;
|
||||
public float Diffusion;
|
||||
public float Gain;
|
||||
public float GainHF;
|
||||
public float GainLF;
|
||||
public float DecayTime;
|
||||
public float DecayHFRatio;
|
||||
public float DecayLFRatio;
|
||||
public float ReflectionsGain;
|
||||
public float ReflectionsDelay;
|
||||
public Vector3 ReflectionsPan;
|
||||
public float LateReverbGain;
|
||||
public float LateReverbDelay;
|
||||
public Vector3 LateReverbPan;
|
||||
public float EchoTime;
|
||||
public float EchoDepth;
|
||||
public float ModulationTime;
|
||||
public float ModulationDepth;
|
||||
public float AirAbsorptionGainHF;
|
||||
public float HFReference;
|
||||
public float LFReference;
|
||||
public float RoomRolloffFactor;
|
||||
public int DecayHFLimit;
|
||||
}
|
||||
|
||||
/*
|
||||
public struct _EAXOBSTRUCTIONPROPERTIES
|
||||
{
|
||||
public int lObstruction;
|
||||
public float flObstructionLFRatio;
|
||||
}
|
||||
_EAXOBSTRUCTIONPROPERTIES EAXOBSTRUCTIONPROPERTIES;//, *LPEAXOBSTRUCTIONPROPERTIES;
|
||||
|
||||
public struct _EAXOCCLUSIONPROPERTIES
|
||||
{
|
||||
public int lOcclusion;
|
||||
public float flOcclusionLFRatio;
|
||||
public float flOcclusionRoomRatio;
|
||||
public float flOcclusionDirectRatio;
|
||||
}
|
||||
_EAXOCCLUSIONPROPERTIES EAXOCCLUSIONPROPERTIES;//, *LPEAXOCCLUSIONPROPERTIES;
|
||||
|
||||
public struct _EAXEXCLUSIONPROPERTIES
|
||||
{
|
||||
public int lExclusion;
|
||||
public float flExclusionLFRatio;
|
||||
}
|
||||
_EAXEXCLUSIONPROPERTIES EAXEXCLUSIONPROPERTIES;//, *LPEAXEXCLUSIONPROPERTIES;
|
||||
|
||||
public struct _EFXLOWPASSFILTER
|
||||
{
|
||||
public float flGain;
|
||||
public float flGainHF;
|
||||
}
|
||||
_EFXLOWPASSFILTER EFXLOWPASSFILTER;//, *LPEFXLOWPASSFILTER;
|
||||
|
||||
|
||||
void ConvertReverbParameters(EAXREVERBPROPERTIES *pEAXProp, EFXEAXREVERBPROPERTIES *pEFXEAXReverb);
|
||||
void ConvertObstructionParameters(EAXOBSTRUCTIONPROPERTIES *pObProp, EFXLOWPASSFILTER *pDirectLowPassFilter);
|
||||
void ConvertExclusionParameters(EAXEXCLUSIONPROPERTIES *pExProp, EFXLOWPASSFILTER *pSendLowPassFilter);
|
||||
void ConvertOcclusionParameters(EAXOCCLUSIONPROPERTIES *pOcProp, EFXLOWPASSFILTER *pDirectLowPassFilter, EFXLOWPASSFILTER *pSendLowPassFilter);
|
||||
*/
|
||||
|
||||
// TODO: CLS compliance.
|
||||
///<summary>EAX Reverb Presets in legacy format - use ConvertReverbParameters() to convert to EFX EAX Reverb Presets for use with the OpenAL Effects Extension.</summary>
|
||||
[CLSCompliant(false)]
|
||||
public static class ReverbPresets
|
||||
{
|
||||
// CASTLE PRESETS
|
||||
|
||||
public static EaxReverb CastleSmallRoom = new EaxReverb(26, 8.3f, 0.890f, -1000, -800, -2000, 1.22f, 0.83f, 0.31f, -100, 0.022f, 0f, 0f, 0f, 600, 0.011f, 0f, 0f, 0f, 0.138f, 0.080f, 0.250f, 0f, -5f, 5168.6f, 139.5f, 0f, 0x20);
|
||||
public static EaxReverb CastleShortPassage = new EaxReverb(26, 8.3f, 0.890f, -1000, -1000, -2000, 2.32f, 0.83f, 0.31f, -100, 0.007f, 0f, 0f, 0f, 200, 0.023f, 0f, 0f, 0f, 0.138f, 0.080f, 0.250f, 0f, -5f, 5168.6f, 139.5f, 0f, 0x20);
|
||||
public static EaxReverb CastleMediumroom = new EaxReverb(26, 8.3f, 0.930f, -1000, -1100, -2000, 2.04f, 0.83f, 0.46f, -400, 0.022f, 0f, 0f, 0f, 400, 0.011f, 0f, 0f, 0f, 0.155f, 0.030f, 0.250f, 0f, -5f, 5168.6f, 139.5f, 0f, 0x20);
|
||||
public static EaxReverb CastleLongpassage = new EaxReverb(26, 8.3f, 0.890f, -1000, -800, -2000, 3.42f, 0.83f, 0.31f, -100, 0.007f, 0f, 0f, 0f, 300, 0.023f, 0f, 0f, 0f, 0.138f, 0.080f, 0.250f, 0f, -5f, 5168.6f, 139.5f, 0f, 0x20);
|
||||
public static EaxReverb CastleLargeroom = new EaxReverb(26, 8.3f, 0.820f, -1000, -1100, -1800, 2.53f, 0.83f, 0.50f, -700, 0.034f, 0f, 0f, 0f, 200, 0.016f, 0f, 0f, 0f, 0.185f, 0.070f, 0.250f, 0f, -5f, 5168.6f, 139.5f, 0f, 0x20);
|
||||
public static EaxReverb CastleHall = new EaxReverb(26, 8.3f, 0.810f, -1000, -1100, -1500, 3.14f, 0.79f, 0.62f, -1500, 0.056f, 0f, 0f, 0f, 100, 0.024f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5168.6f, 139.5f, 0f, 0x20);
|
||||
public static EaxReverb CastleCupboard = new EaxReverb(26, 8.3f, 0.890f, -1000, -1100, -2000, 0.67f, 0.87f, 0.31f, 300, 0.010f, 0f, 0f, 0f, 1100, 0.007f, 0f, 0f, 0f, 0.138f, 0.080f, 0.250f, 0f, -5f, 5168.6f, 139.5f, 0f, 0x20);
|
||||
public static EaxReverb CastleCourtyard = new EaxReverb(26, 8.3f, 0.420f, -1000, -700, -1400, 2.13f, 0.61f, 0.23f, -1300, 0.160f, 0f, 0f, 0f, -300, 0.036f, 0f, 0f, 0f, 0.250f, 0.370f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x1f);
|
||||
public static EaxReverb CastleAlcove = new EaxReverb(26, 8.3f, 0.890f, -1000, -600, -2000, 1.64f, 0.87f, 0.31f, 00, 0.007f, 0f, 0f, 0f, 300, 0.034f, 0f, 0f, 0f, 0.138f, 0.080f, 0.250f, 0f, -5f, 5168.6f, 139.5f, 0f, 0x20);
|
||||
|
||||
// FACTORY PRESETS
|
||||
|
||||
public static EaxReverb FactoryAlcove = new EaxReverb(26, 1.8f, 0.590f, -1200, -200, -600, 3.14f, 0.65f, 1.31f, 300, 0.010f, 0f, 0f, 0f, 000, 0.038f, 0f, 0f, 0f, 0.114f, 0.100f, 0.250f, 0f, -5f, 3762.6f, 362.5f, 0f, 0x20);
|
||||
public static EaxReverb FactoryShortpassage = new EaxReverb(26, 1.8f, 0.640f, -1200, -200, -600, 2.53f, 0.65f, 1.31f, 0, 0.010f, 0f, 0f, 0f, 200, 0.038f, 0f, 0f, 0f, 0.135f, 0.230f, 0.250f, 0f, -5f, 3762.6f, 362.5f, 0f, 0x20);
|
||||
public static EaxReverb FactoryMediumroom = new EaxReverb(26, 1.9f, 0.820f, -1200, -200, -600, 2.76f, 0.65f, 1.31f, -1100, 0.022f, 0f, 0f, 0f, 300, 0.023f, 0f, 0f, 0f, 0.174f, 0.070f, 0.250f, 0f, -5f, 3762.6f, 362.5f, 0f, 0x20);
|
||||
public static EaxReverb FactoryLongpassage = new EaxReverb(26, 1.8f, 0.640f, -1200, -200, -600, 4.06f, 0.65f, 1.31f, 0, 0.020f, 0f, 0f, 0f, 200, 0.037f, 0f, 0f, 0f, 0.135f, 0.230f, 0.250f, 0f, -5f, 3762.6f, 362.5f, 0f, 0x20);
|
||||
public static EaxReverb FactoryLargeroom = new EaxReverb(26, 1.9f, 0.750f, -1200, -300, -400, 4.24f, 0.51f, 1.31f, -1500, 0.039f, 0f, 0f, 0f, 100, 0.023f, 0f, 0f, 0f, 0.231f, 0.070f, 0.250f, 0f, -5f, 3762.6f, 362.5f, 0f, 0x20);
|
||||
public static EaxReverb FactoryHall = new EaxReverb(26, 1.9f, 0.750f, -1000, -300, -400, 7.43f, 0.51f, 1.31f, -2400, 0.073f, 0f, 0f, 0f, -100, 0.027f, 0f, 0f, 0f, 0.250f, 0.070f, 0.250f, 0f, -5f, 3762.6f, 362.5f, 0f, 0x20);
|
||||
public static EaxReverb FactoryCupboard = new EaxReverb(26, 1.7f, 0.630f, -1200, -200, -600, 0.49f, 0.65f, 1.31f, 200, 0.010f, 0f, 0f, 0f, 600, 0.032f, 0f, 0f, 0f, 0.107f, 0.070f, 0.250f, 0f, -5f, 3762.6f, 362.5f, 0f, 0x20);
|
||||
public static EaxReverb FactoryCourtyard = new EaxReverb(26, 1.7f, 0.570f, -1000, -1000, -400, 2.32f, 0.29f, 0.56f, -1300, 0.140f, 0f, 0f, 0f, -800, 0.039f, 0f, 0f, 0f, 0.250f, 0.290f, 0.250f, 0f, -5f, 3762.6f, 362.5f, 0f, 0x20);
|
||||
public static EaxReverb FactorySmallroom = new EaxReverb(26, 1.8f, 0.820f, -1000, -200, -600, 1.72f, 0.65f, 1.31f, -300, 0.010f, 0f, 0f, 0f, 500, 0.024f, 0f, 0f, 0f, 0.119f, 0.070f, 0.250f, 0f, -5f, 3762.6f, 362.5f, 0f, 0x20);
|
||||
|
||||
// ICE PALACE PRESETS
|
||||
|
||||
public static EaxReverb IcepalaceAlcove = new EaxReverb(26, 2.7f, 0.840f, -1000, -500, -1100, 2.76f, 1.46f, 0.28f, 100, 0.010f, 0f, 0f, 0f, -100, 0.030f, 0f, 0f, 0f, 0.161f, 0.090f, 0.250f, 0f, -5f, 12428.5f, 99.6f, 0f, 0x20);
|
||||
public static EaxReverb IcepalaceShortpassage = new EaxReverb(26, 2.7f, 0.750f, -1000, -500, -1100, 1.79f, 1.46f, 0.28f, -600, 0.010f, 0f, 0f, 0f, 100, 0.019f, 0f, 0f, 0f, 0.177f, 0.090f, 0.250f, 0f, -5f, 12428.5f, 99.6f, 0f, 0x20);
|
||||
public static EaxReverb IcepalaceMediumroom = new EaxReverb(26, 2.7f, 0.870f, -1000, -500, -700, 2.22f, 1.53f, 0.32f, -800, 0.039f, 0f, 0f, 0f, 100, 0.027f, 0f, 0f, 0f, 0.186f, 0.120f, 0.250f, 0f, -5f, 12428.5f, 99.6f, 0f, 0x20);
|
||||
public static EaxReverb IcepalaceLongpassage = new EaxReverb(26, 2.7f, 0.770f, -1000, -500, -800, 3.01f, 1.46f, 0.28f, -200, 0.012f, 0f, 0f, 0f, 200, 0.025f, 0f, 0f, 0f, 0.186f, 0.040f, 0.250f, 0f, -5f, 12428.5f, 99.6f, 0f, 0x20);
|
||||
public static EaxReverb IcepalaceLargeroom = new EaxReverb(26, 2.9f, 0.810f, -1000, -500, -700, 3.14f, 1.53f, 0.32f, -1200, 0.039f, 0f, 0f, 0f, 000, 0.027f, 0f, 0f, 0f, 0.214f, 0.110f, 0.250f, 0f, -5f, 12428.5f, 99.6f, 0f, 0x20);
|
||||
public static EaxReverb IcepalaceHall = new EaxReverb(26, 2.9f, 0.760f, -1000, -700, -500, 5.49f, 1.53f, 0.38f, -1900, 0.054f, 0f, 0f, 0f, -400, 0.052f, 0f, 0f, 0f, 0.226f, 0.110f, 0.250f, 0f, -5f, 12428.5f, 99.6f, 0f, 0x20);
|
||||
public static EaxReverb IcepalaceCupboard = new EaxReverb(26, 2.7f, 0.830f, -1000, -600, -1300, 0.76f, 1.53f, 0.26f, 100, 0.012f, 0f, 0f, 0f, 600, 0.016f, 0f, 0f, 0f, 0.143f, 0.080f, 0.250f, 0f, -5f, 12428.5f, 99.6f, 0f, 0x20);
|
||||
public static EaxReverb IcepalaceCourtyard = new EaxReverb(26, 2.9f, 0.590f, -1000, -1100, -1000, 2.04f, 1.20f, 0.38f, -1000, 0.173f, 0f, 0f, 0f, -1000, 0.043f, 0f, 0f, 0f, 0.235f, 0.480f, 0.250f, 0f, -5f, 12428.5f, 99.6f, 0f, 0x20);
|
||||
public static EaxReverb IcepalaceSmallroom = new EaxReverb(26, 2.7f, 0.840f, -1000, -500, -1100, 1.51f, 1.53f, 0.27f, -100, 0.010f, 0f, 0f, 0f, 300, 0.011f, 0f, 0f, 0f, 0.164f, 0.140f, 0.250f, 0f, -5f, 12428.5f, 99.6f, 0f, 0x20);
|
||||
|
||||
// SPACE STATION PRESETS
|
||||
|
||||
public static EaxReverb SpacestationAlcove = new EaxReverb(26, 1.5f, 0.780f, -1000, -300, -100, 1.16f, 0.81f, 0.55f, 300, 0.007f, 0f, 0f, 0f, 000, 0.018f, 0f, 0f, 0f, 0.192f, 0.210f, 0.250f, 0f, -5f, 3316.1f, 458.2f, 0f, 0x20);
|
||||
public static EaxReverb SpacestationMediumroom = new EaxReverb(26, 1.5f, 0.750f, -1000, -400, -100, 3.01f, 0.50f, 0.55f, -800, 0.034f, 0f, 0f, 0f, 100, 0.035f, 0f, 0f, 0f, 0.209f, 0.310f, 0.250f, 0f, -5f, 3316.1f, 458.2f, 0f, 0x20);
|
||||
public static EaxReverb SpacestationShortpassage = new EaxReverb(26, 1.5f, 0.870f, -1000, -400, -100, 3.57f, 0.50f, 0.55f, 0, 0.012f, 0f, 0f, 0f, 100, 0.016f, 0f, 0f, 0f, 0.172f, 0.200f, 0.250f, 0f, -5f, 3316.1f, 458.2f, 0f, 0x20);
|
||||
public static EaxReverb SpacestationLongpassage = new EaxReverb(26, 1.9f, 0.820f, -1000, -400, -100, 4.62f, 0.62f, 0.55f, 0, 0.012f, 0f, 0f, 0f, 200, 0.031f, 0f, 0f, 0f, 0.250f, 0.230f, 0.250f, 0f, -5f, 3316.1f, 458.2f, 0f, 0x20);
|
||||
public static EaxReverb SpacestationLargeroom = new EaxReverb(26, 1.8f, 0.810f, -1000, -400, -100, 3.89f, 0.38f, 0.61f, -1000, 0.056f, 0f, 0f, 0f, -100, 0.035f, 0f, 0f, 0f, 0.233f, 0.280f, 0.250f, 0f, -5f, 3316.1f, 458.2f, 0f, 0x20);
|
||||
public static EaxReverb SpacestationHall = new EaxReverb(26, 1.9f, 0.870f, -1000, -400, -100, 7.11f, 0.38f, 0.61f, -1500, 0.100f, 0f, 0f, 0f, -400, 0.047f, 0f, 0f, 0f, 0.250f, 0.250f, 0.250f, 0f, -5f, 3316.1f, 458.2f, 0f, 0x20);
|
||||
public static EaxReverb SpacestationCupboard = new EaxReverb(26, 1.4f, 0.560f, -1000, -300, -100, 0.79f, 0.81f, 0.55f, 300, 0.007f, 0f, 0f, 0f, 500, 0.018f, 0f, 0f, 0f, 0.181f, 0.310f, 0.250f, 0f, -5f, 3316.1f, 458.2f, 0f, 0x20);
|
||||
public static EaxReverb SpacestationSmallroom = new EaxReverb(26, 1.5f, 0.700f, -1000, -300, -100, 1.72f, 0.82f, 0.55f, -200, 0.007f, 0f, 0f, 0f, 300, 0.013f, 0f, 0f, 0f, 0.188f, 0.260f, 0.250f, 0f, -5f, 3316.1f, 458.2f, 0f, 0x20);
|
||||
|
||||
// WOODEN GALLEON PRESETS
|
||||
|
||||
public static EaxReverb WoodenAlcove = new EaxReverb(26, 7.5f, 1f, -1000, -1800, -1000, 1.22f, 0.62f, 0.91f, 100, 0.012f, 0f, 0f, 0f, -300, 0.024f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 4705f, 99.6f, 0f, 0x3f);
|
||||
public static EaxReverb WoodenShortpassage = new EaxReverb(26, 7.5f, 1f, -1000, -1800, -1000, 1.75f, 0.50f, 0.87f, -100, 0.012f, 0f, 0f, 0f, -400, 0.024f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 4705f, 99.6f, 0f, 0x3f);
|
||||
public static EaxReverb WoodenMediumroom = new EaxReverb(26, 7.5f, 1f, -1000, -2000, -1100, 1.47f, 0.42f, 0.82f, -100, 0.049f, 0f, 0f, 0f, -100, 0.029f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 4705f, 99.6f, 0f, 0x3f);
|
||||
public static EaxReverb WoodenLongpassage = new EaxReverb(26, 7.5f, 1f, -1000, -2000, -1000, 1.99f, 0.40f, 0.79f, 000, 0.020f, 0f, 0f, 0f, -700, 0.036f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 4705f, 99.6f, 0f, 0x3f);
|
||||
public static EaxReverb WoodenLargeroom = new EaxReverb(26, 7.5f, 1f, -1000, -2100, -1100, 2.65f, 0.33f, 0.82f, -100, 0.066f, 0f, 0f, 0f, -200, 0.049f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 4705f, 99.6f, 0f, 0x3f);
|
||||
public static EaxReverb WoodenHall = new EaxReverb(26, 7.5f, 1f, -1000, -2200, -1100, 3.45f, 0.30f, 0.82f, -100, 0.088f, 0f, 0f, 0f, -200, 0.063f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 4705f, 99.6f, 0f, 0x3f);
|
||||
public static EaxReverb WoodenCupboard = new EaxReverb(26, 7.5f, 1f, -1000, -1700, -1000, 0.56f, 0.46f, 0.91f, 100, 0.012f, 0f, 0f, 0f, 100, 0.028f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 4705f, 99.6f, 0f, 0x3f);
|
||||
public static EaxReverb WoodenSmallroom = new EaxReverb(26, 7.5f, 1f, -1000, -1900, -1000, 0.79f, 0.32f, 0.87f, 00, 0.032f, 0f, 0f, 0f, -100, 0.029f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 4705f, 99.6f, 0f, 0x3f);
|
||||
public static EaxReverb WoodenCourtyard = new EaxReverb(26, 7.5f, 0.650f, -1000, -2200, -1000, 1.79f, 0.35f, 0.79f, -500, 0.123f, 0f, 0f, 0f, -2000, 0.032f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 4705f, 99.6f, 0f, 0x3f);
|
||||
|
||||
// SPORTS PRESETS
|
||||
|
||||
public static EaxReverb SportEmptystadium = new EaxReverb(26, 7.2f, 1f, -1000, -700, -200, 6.26f, 0.51f, 1.10f, -2400, 0.183f, 0f, 0f, 0f, -800, 0.038f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x20);
|
||||
public static EaxReverb SportSquashcourt = new EaxReverb(26, 7.5f, 0.750f, -1000, -1000, -200, 2.22f, 0.91f, 1.16f, -700, 0.007f, 0f, 0f, 0f, -200, 0.011f, 0f, 0f, 0f, 0.126f, 0.190f, 0.250f, 0f, -5f, 7176.9f, 211.2f, 0f, 0x20);
|
||||
public static EaxReverb SportSmallswimmingpool = new EaxReverb(26, 36.2f, 0.700f, -1000, -200, -100, 2.76f, 1.25f, 1.14f, -400, 0.020f, 0f, 0f, 0f, -200, 0.030f, 0f, 0f, 0f, 0.179f, 0.150f, 0.895f, 0.190f, -5f, 5000f, 250f, 0f, 0x0);
|
||||
public static EaxReverb SportLargeswimmingpool = new EaxReverb(26, 36.2f, 0.820f, -1000, -200, 0, 5.49f, 1.31f, 1.14f, -700, 0.039f, 0f, 0f, 0f, -600, 0.049f, 0f, 0f, 0f, 0.222f, 0.550f, 1.159f, 0.210f, -5f, 5000f, 250f, 0f, 0x0);
|
||||
public static EaxReverb SportGymnasium = new EaxReverb(26, 7.5f, 0.810f, -1000, -700, -100, 3.14f, 1.06f, 1.35f, -800, 0.029f, 0f, 0f, 0f, -500, 0.045f, 0f, 0f, 0f, 0.146f, 0.140f, 0.250f, 0f, -5f, 7176.9f, 211.2f, 0f, 0x20);
|
||||
public static EaxReverb SportFullstadium = new EaxReverb(26, 7.2f, 1f, -1000, -2300, -200, 5.25f, 0.17f, 0.80f, -2000, 0.188f, 0f, 0f, 0f, -1100, 0.038f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x20);
|
||||
public static EaxReverb SportStadimtannoy = new EaxReverb(26, 3f, 0.780f, -1000, -500, -600, 2.53f, 0.88f, 0.68f, -1100, 0.230f, 0f, 0f, 0f, -600, 0.063f, 0f, 0f, 0f, 0.250f, 0.200f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x20);
|
||||
|
||||
// PREFAB PRESETS
|
||||
|
||||
public static EaxReverb PrefabWorkshop = new EaxReverb(26, 1.9f, 1f, -1000, -1700, -800, 0.76f, 1f, 1f, 0, 0.012f, 0f, 0f, 0f, 100, 0.012f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x0);
|
||||
public static EaxReverb PrefabSchoolroom = new EaxReverb(26, 1.86f, 0.690f, -1000, -400, -600, 0.98f, 0.45f, 0.18f, 300, 0.017f, 0f, 0f, 0f, 300, 0.015f, 0f, 0f, 0f, 0.095f, 0.140f, 0.250f, 0f, -5f, 7176.9f, 211.2f, 0f, 0x20);
|
||||
public static EaxReverb PrefabPractiseroom = new EaxReverb(26, 1.86f, 0.870f, -1000, -800, -600, 1.12f, 0.56f, 0.18f, 200, 0.010f, 0f, 0f, 0f, 300, 0.011f, 0f, 0f, 0f, 0.095f, 0.140f, 0.250f, 0f, -5f, 7176.9f, 211.2f, 0f, 0x20);
|
||||
public static EaxReverb PrefabOuthouse = new EaxReverb(26, 80.3f, 0.820f, -1000, -1900, -1600, 1.38f, 0.38f, 0.35f, -100, 0.024f, 0f, 0f, -0f, -400, 0.044f, 0f, 0f, 0f, 0.121f, 0.170f, 0.250f, 0f, -5f, 2854.4f, 107.5f, 0f, 0x0);
|
||||
public static EaxReverb PrefabCaravan = new EaxReverb(26, 8.3f, 1f, -1000, -2100, -1800, 0.43f, 1.50f, 1f, 0, 0.012f, 0f, 0f, 0f, 600, 0.012f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x1f);
|
||||
|
||||
// DOME AND PIPE PRESETS
|
||||
|
||||
public static EaxReverb DomeTomb = new EaxReverb(26, 51.8f, 0.790f, -1000, -900, -1300, 4.18f, 0.21f, 0.10f, -825, 0.030f, 0f, 0f, 0f, 450, 0.022f, 0f, 0f, 0f, 0.177f, 0.190f, 0.250f, 0f, -5f, 2854.4f, 20f, 0f, 0x0);
|
||||
public static EaxReverb DomeSaintPauls = new EaxReverb(26, 50.3f, 0.870f, -1000, -900, -1300, 10.48f, 0.19f, 0.10f, -1500, 0.090f, 0f, 0f, 0f, 200, 0.042f, 0f, 0f, 0f, 0.250f, 0.120f, 0.250f, 0f, -5f, 2854.4f, 20f, 0f, 0x3f);
|
||||
public static EaxReverb PipeSmall = new EaxReverb(26, 50.3f, 1f, -1000, -900, -1300, 5.04f, 0.10f, 0.10f, -600, 0.032f, 0f, 0f, 0f, 800, 0.015f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 2854.4f, 20f, 0f, 0x3f);
|
||||
public static EaxReverb PipeLongthin = new EaxReverb(26, 1.6f, 0.910f, -1000, -700, -1100, 9.21f, 0.18f, 0.10f, -300, 0.010f, 0f, 0f, 0f, -300, 0.022f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 2854.4f, 20f, 0f, 0x0);
|
||||
public static EaxReverb PipeLarge = new EaxReverb(26, 50.3f, 1f, -1000, -900, -1300, 8.45f, 0.10f, 0.10f, -800, 0.046f, 0f, 0f, 0f, 400, 0.032f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 2854.4f, 20f, 0f, 0x3f);
|
||||
public static EaxReverb PipeResonant = new EaxReverb(26, 1.3f, 0.910f, -1000, -700, -1100, 6.81f, 0.18f, 0.10f, -300, 0.010f, 0f, 0f, 0f, 00, 0.022f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 2854.4f, 20f, 0f, 0x0);
|
||||
|
||||
// OUTDOORS PRESETS
|
||||
|
||||
public static EaxReverb OutdoorsBackyard = new EaxReverb(26, 80.3f, 0.450f, -1000, -1200, -600, 1.12f, 0.34f, 0.46f, -700, 0.069f, 0f, 0f, -0f, -300, 0.023f, 0f, 0f, 0f, 0.218f, 0.340f, 0.250f, 0f, -5f, 4399.1f, 242.9f, 0f, 0x0);
|
||||
public static EaxReverb OutdoorsRollingplains = new EaxReverb(26, 80.3f, 0f, -1000, -3900, -400, 2.13f, 0.21f, 0.46f, -1500, 0.300f, 0f, 0f, -0f, -700, 0.019f, 0f, 0f, 0f, 0.250f, 1f, 0.250f, 0f, -5f, 4399.1f, 242.9f, 0f, 0x0);
|
||||
public static EaxReverb OutdoorsDeepcanyon = new EaxReverb(26, 80.3f, 0.740f, -1000, -1500, -400, 3.89f, 0.21f, 0.46f, -1000, 0.223f, 0f, 0f, -0f, -900, 0.019f, 0f, 0f, 0f, 0.250f, 1f, 0.250f, 0f, -5f, 4399.1f, 242.9f, 0f, 0x0);
|
||||
public static EaxReverb OutdoorsCreek = new EaxReverb(26, 80.3f, 0.350f, -1000, -1500, -600, 2.13f, 0.21f, 0.46f, -800, 0.115f, 0f, 0f, -0f, -1400, 0.031f, 0f, 0f, 0f, 0.218f, 0.340f, 0.250f, 0f, -5f, 4399.1f, 242.9f, 0f, 0x0);
|
||||
public static EaxReverb OutdoorsValley = new EaxReverb(26, 80.3f, 0.280f, -1000, -3100, -1600, 2.88f, 0.26f, 0.35f, -1700, 0.263f, 0f, 0f, -0f, -800, 0.100f, 0f, 0f, 0f, 0.250f, 0.340f, 0.250f, 0f, -5f, 2854.4f, 107.5f, 0f, 0x0);
|
||||
|
||||
// MOOD PRESETS
|
||||
|
||||
public static EaxReverb MoodHeaven = new EaxReverb(26, 19.6f, 0.940f, -1000, -200, -700, 5.04f, 1.12f, 0.56f, -1230, 0.020f, 0f, 0f, 0f, 200, 0.029f, 0f, 0f, 0f, 0.250f, 0.080f, 2.742f, 0.050f, -2f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb MoodHell = new EaxReverb(26, 100f, 0.570f, -1000, -900, -700, 3.57f, 0.49f, 2f, -10000, 0.020f, 0f, 0f, 0f, 300, 0.030f, 0f, 0f, 0f, 0.110f, 0.040f, 2.109f, 0.520f, -5f, 5000f, 139.5f, 0f, 0x40);
|
||||
public static EaxReverb MoodMemory = new EaxReverb(26, 8f, 0.850f, -1000, -400, -900, 4.06f, 0.82f, 0.56f, -2800, 0f, 0f, 0f, 0f, 100, 0f, 0f, 0f, 0f, 0.250f, 0f, 0.474f, 0.450f, -10f, 5000f, 250f, 0f, 0x0);
|
||||
|
||||
// DRIVING SIMULATION PRESETS
|
||||
|
||||
public static EaxReverb DrivingCommentator = new EaxReverb(26, 3f, 0f, 1000, -500, -600, 2.42f, 0.88f, 0.68f, -1400, 0.093f, 0f, 0f, 0f, -1200, 0.017f, 0f, 0f, 0f, 0.250f, 1f, 0.250f, 0f, -10f, 5000f, 250f, 0f, 0x20);
|
||||
public static EaxReverb DrivingPitgarage = new EaxReverb(26, 1.9f, 0.590f, -1000, -300, -500, 1.72f, 0.93f, 0.87f, -500, 0f, 0f, 0f, 0f, 200, 0.016f, 0f, 0f, 0f, 0.250f, 0.110f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x0);
|
||||
public static EaxReverb DrivingIncarRacer = new EaxReverb(26, 1.1f, 0.800f, -1000, 0, -200, 0.17f, 2f, 0.41f, 500, 0.007f, 0f, 0f, 0f, -300, 0.015f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 10268.2f, 251f, 0f, 0x20);
|
||||
public static EaxReverb DrivingIncarSports = new EaxReverb(26, 1.1f, 0.800f, -1000, -400, 0, 0.17f, 0.75f, 0.41f, 0, 0.010f, 0f, 0f, 0f, -500, 0f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 10268.2f, 251f, 0f, 0x20);
|
||||
public static EaxReverb DrivingIncarLuxury = new EaxReverb(26, 1.6f, 1f, -1000, -2000, -600, 0.13f, 0.41f, 0.46f, -200, 0.010f, 0f, 0f, 0f, 400, 0.010f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 10268.2f, 251f, 0f, 0x20);
|
||||
public static EaxReverb DrivingFullgrandstand = new EaxReverb(26, 8.3f, 1f, -1000, -1100, -400, 3.01f, 1.37f, 1.28f, -900, 0.090f, 0f, 0f, 0f, -1500, 0.049f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 10420.2f, 250f, 0f, 0x1f);
|
||||
public static EaxReverb DrivingEmptygrandstand = new EaxReverb(26, 8.3f, 1f, -1000, 0, -200, 4.62f, 1.75f, 1.40f, -1363, 0.090f, 0f, 0f, 0f, -1200, 0.049f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 10420.2f, 250f, 0f, 0x1f);
|
||||
public static EaxReverb DrivingTunnel = new EaxReverb(26, 3.1f, 0.810f, -1000, -800, -100, 3.42f, 0.94f, 1.31f, -300, 0.051f, 0f, 0f, 0f, -300, 0.047f, 0f, 0f, 0f, 0.214f, 0.050f, 0.250f, 0f, -5f, 5000f, 155.3f, 0f, 0x20);
|
||||
|
||||
// CITY PRESETS
|
||||
|
||||
public static EaxReverb CityStreets = new EaxReverb(26, 3f, 0.780f, -1000, -300, -100, 1.79f, 1.12f, 0.91f, -1100, 0.046f, 0f, 0f, 0f, -1400, 0.028f, 0f, 0f, 0f, 0.250f, 0.200f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x20);
|
||||
public static EaxReverb CitySubway = new EaxReverb(26, 3f, 0.740f, -1000, -300, -100, 3.01f, 1.23f, 0.91f, -300, 0.046f, 0f, 0f, 0f, 200, 0.028f, 0f, 0f, 0f, 0.125f, 0.210f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x20);
|
||||
public static EaxReverb CityMuseum = new EaxReverb(26, 80.3f, 0.820f, -1000, -1500, -1500, 3.28f, 1.40f, 0.57f, -1200, 0.039f, 0f, 0f, -0f, -100, 0.034f, 0f, 0f, 0f, 0.130f, 0.170f, 0.250f, 0f, -5f, 2854.4f, 107.5f, 0f, 0x0);
|
||||
public static EaxReverb CityLibrary = new EaxReverb(26, 80.3f, 0.820f, -1000, -1100, -2100, 2.76f, 0.89f, 0.41f, -900, 0.029f, 0f, 0f, -0f, -100, 0.020f, 0f, 0f, 0f, 0.130f, 0.170f, 0.250f, 0f, -5f, 2854.4f, 107.5f, 0f, 0x0);
|
||||
public static EaxReverb CityUnderpass = new EaxReverb(26, 3f, 0.820f, -1000, -700, -100, 3.57f, 1.12f, 0.91f, -800, 0.059f, 0f, 0f, 0f, -100, 0.037f, 0f, 0f, 0f, 0.250f, 0.140f, 0.250f, 0f, -7f, 5000f, 250f, 0f, 0x20);
|
||||
public static EaxReverb CityAbandoned = new EaxReverb(26, 3f, 0.690f, -1000, -200, -100, 3.28f, 1.17f, 0.91f, -700, 0.044f, 0f, 0f, 0f, -1100, 0.024f, 0f, 0f, 0f, 0.250f, 0.200f, 0.250f, 0f, -3f, 5000f, 250f, 0f, 0x20);
|
||||
|
||||
// MISC ROOMS
|
||||
|
||||
public static EaxReverb Generic = new EaxReverb(0, 7.5f, 1f, -1000, -100, 0, 1.49f, 0.83f, 1f, -2602, 0.007f, 0f, 0f, 0f, 200, 0.011f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Paddedcell = new EaxReverb(1, 1.4f, 1f, -1000, -6000, 0, 0.17f, 0.10f, 1f, -1204, 0.001f, 0f, 0f, 0f, 207, 0.002f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Room = new EaxReverb(2, 1.9f, 1f, -1000, -454, 0, 0.40f, 0.83f, 1f, -1646, 0.002f, 0f, 0f, 0f, 53, 0.003f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Bathroom = new EaxReverb(3, 1.4f, 1f, -1000, -1200, 0, 1.49f, 0.54f, 1f, -370, 0.007f, 0f, 0f, 0f, 1030, 0.011f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Livingroom = new EaxReverb(4, 2.5f, 1f, -1000, -6000, 0, 0.50f, 0.10f, 1f, -1376, 0.003f, 0f, 0f, 0f, -1104, 0.004f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Stoneroom = new EaxReverb(5, 11.6f, 1f, -1000, -300, 0, 2.31f, 0.64f, 1f, -711, 0.012f, 0f, 0f, 0f, 83, 0.017f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Auditorium = new EaxReverb(6, 21.6f, 1f, -1000, -476, 0, 4.32f, 0.59f, 1f, -789, 0.020f, 0f, 0f, 0f, -289, 0.030f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Concerthall = new EaxReverb(7, 19.6f, 1f, -1000, -500, 0, 3.92f, 0.70f, 1f, -1230, 0.020f, 0f, 0f, 0f, -02, 0.029f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Cave = new EaxReverb(8, 14.6f, 1f, -1000, 0, 0, 2.91f, 1.30f, 1f, -602, 0.015f, 0f, 0f, 0f, -302, 0.022f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x1f);
|
||||
public static EaxReverb Arena = new EaxReverb(9, 36.2f, 1f, -1000, -698, 0, 7.24f, 0.33f, 1f, -1166, 0.020f, 0f, 0f, 0f, 16, 0.030f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Hangar = new EaxReverb(10, 50.3f, 1f, -1000, -1000, 0, 10.05f, 0.23f, 1f, -602, 0.020f, 0f, 0f, 0f, 198, 0.030f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Carpettedhallway = new EaxReverb(11, 1.9f, 1f, -1000, -4000, 0, 0.30f, 0.10f, 1f, -1831, 0.002f, 0f, 0f, 0f, -1630, 0.030f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Hallway = new EaxReverb(12, 1.8f, 1f, -1000, -300, 0, 1.49f, 0.59f, 1f, -1219, 0.007f, 0f, 0f, 0f, 441, 0.011f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Stonecorridor = new EaxReverb(13, 13.5f, 1f, -1000, -237, 0, 2.70f, 0.79f, 1f, -1214, 0.013f, 0f, 0f, 0f, 395, 0.020f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Alley = new EaxReverb(14, 7.5f, 0.300f, -1000, -270, 0, 1.49f, 0.86f, 1f, -1204, 0.007f, 0f, 0f, 0f, -4, 0.011f, 0f, 0f, 0f, 0.125f, 0.950f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Forest = new EaxReverb(15, 38f, 0.300f, -1000, -3300, 0, 1.49f, 0.54f, 1f, -2560, 0.162f, 0f, 0f, 0f, -229, 0.088f, 0f, 0f, 0f, 0.125f, 1f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb City = new EaxReverb(16, 7.5f, 0.500f, -1000, -800, 0, 1.49f, 0.67f, 1f, -2273, 0.007f, 0f, 0f, 0f, -1691, 0.011f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Mountains = new EaxReverb(17, 100f, 0.270f, -1000, -2500, 0, 1.49f, 0.21f, 1f, -2780, 0.300f, 0f, 0f, 0f, -1434, 0.100f, 0f, 0f, 0f, 0.250f, 1f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x1f);
|
||||
public static EaxReverb Quarry = new EaxReverb(18, 17.5f, 1f, -1000, -1000, 0, 1.49f, 0.83f, 1f, -10000, 0.061f, 0f, 0f, 0f, 500, 0.025f, 0f, 0f, 0f, 0.125f, 0.700f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Plain = new EaxReverb(19, 42.5f, 0.210f, -1000, -2000, 0, 1.49f, 0.50f, 1f, -2466, 0.179f, 0f, 0f, 0f, -1926, 0.100f, 0f, 0f, 0f, 0.250f, 1f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Parkinglot = new EaxReverb(20, 8.3f, 1f, -1000, 0, 0, 1.65f, 1.50f, 1f, -1363, 0.008f, 0f, 0f, 0f, -1153, 0.012f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x1f);
|
||||
public static EaxReverb Sewerpipe = new EaxReverb(21, 1.7f, 0.800f, -1000, -1000, 0, 2.81f, 0.14f, 1f, 429, 0.014f, 0f, 0f, 0f, 1023, 0.021f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Underwater = new EaxReverb(22, 1.8f, 1f, -1000, -4000, 0, 1.49f, 0.10f, 1f, -449, 0.007f, 0f, 0f, 0f, 1700, 0.011f, 0f, 0f, 0f, 0.250f, 0f, 1.180f, 0.348f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Drugged = new EaxReverb(23, 1.9f, 0.500f, -1000, 0, 0, 8.39f, 1.39f, 1f, -115, 0.002f, 0f, 0f, 0f, 985, 0.030f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 1f, -5f, 5000f, 250f, 0f, 0x1f);
|
||||
public static EaxReverb Dizzy = new EaxReverb(24, 1.8f, 0.600f, -1000, -400, 0, 17.23f, 0.56f, 1f, -1713, 0.020f, 0f, 0f, 0f, -613, 0.030f, 0f, 0f, 0f, 0.250f, 1f, 0.810f, 0.310f, -5f, 5000f, 250f, 0f, 0x1f);
|
||||
public static EaxReverb Psychotic = new EaxReverb(25, 1f, 0.500f, -1000, -151, 0, 7.56f, 0.91f, 1f, -626, 0.020f, 0f, 0f, 0f, 774, 0.030f, 0f, 0f, 0f, 0.250f, 0f, 4f, 1f, -5f, 5000f, 250f, 0f, 0x1f);
|
||||
public static EaxReverb Dustyroom = new EaxReverb(26, 1.8f, 0.560f, -1000, -200, -300, 1.79f, 0.38f, 0.21f, -600, 0.002f, 0f, 0f, 0f, 200, 0.006f, 0f, 0f, 0f, 0.202f, 0.050f, 0.250f, 0f, -10f, 13046f, 163.3f, 0f, 0x20);
|
||||
public static EaxReverb Chapel = new EaxReverb(26, 19.6f, 0.840f, -1000, -500, 0, 4.62f, 0.64f, 1.23f, -700, 0.032f, 0f, 0f, 0f, -200, 0.049f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0.110f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Smallwaterroom = new EaxReverb(26, 36.2f, 0.700f, -1000, -698, 0, 1.51f, 1.25f, 1.14f, -100, 0.020f, 0f, 0f, 0f, 300, 0.030f, 0f, 0f, 0f, 0.179f, 0.150f, 0.895f, 0.190f, -7f, 5000f, 250f, 0f, 0x0);
|
||||
}
|
||||
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
}
|
193
Source/Compatibility/Audio/OpenAL/AL/XRamExtension.cs
Normal file
193
Source/Compatibility/Audio/OpenAL/AL/XRamExtension.cs
Normal file
|
@ -0,0 +1,193 @@
|
|||
#region --- OpenTK.OpenAL License ---
|
||||
/* XRamExtension.cs
|
||||
* C header: \OpenAL 1.1 SDK\include\xram.h
|
||||
* Spec: ?
|
||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||
* See license.txt for license details (MIT)
|
||||
* http://www.OpenTK.net */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
|
||||
///<summary>The X-Ram Extension is provided on the top-end Sound Blaster X-Fi solutions (Sound Blaster X-Fi Fatal1ty, Sound Blaster X-Fi Elite Pro, or later). These products feature 64MB of X-Ram that can only be used for audio purposes, which can be controlled by this Extension.</summary>
|
||||
[CLSCompliant(true)]
|
||||
public sealed class XRamExtension
|
||||
{
|
||||
#region Instance state
|
||||
|
||||
private bool _valid = false;
|
||||
|
||||
/// <summary>Returns True if the X-Ram Extension has been found and could be initialized.</summary>
|
||||
public bool IsInitialized
|
||||
{
|
||||
get { return _valid; }
|
||||
}
|
||||
|
||||
#endregion Instance state
|
||||
|
||||
#region X-RAM Function pointer definitions
|
||||
|
||||
// [CLSCompliant(false)]
|
||||
private delegate bool Delegate_SetBufferMode(int n, ref uint buffers, int value);
|
||||
//typedef ALboolean (__cdecl *EAXSetBufferMode)(ALsizei n, ALuint *buffers, ALint value);
|
||||
|
||||
// [CLSCompliant( false )]
|
||||
private delegate int Delegate_GetBufferMode(uint buffer, IntPtr value);
|
||||
//typedef ALenum (__cdecl *EAXGetBufferMode)(ALuint buffer, ALint *value);
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
private Delegate_SetBufferMode Imported_SetBufferMode;
|
||||
//[CLSCompliant(false)]
|
||||
private Delegate_GetBufferMode Imported_GetBufferMode;
|
||||
|
||||
#endregion X-RAM Function pointer definitions
|
||||
|
||||
#region X-RAM Tokens
|
||||
|
||||
private int AL_EAX_RAM_SIZE, AL_EAX_RAM_FREE,
|
||||
AL_STORAGE_AUTOMATIC, AL_STORAGE_HARDWARE, AL_STORAGE_ACCESSIBLE;
|
||||
|
||||
#endregion X-RAM Tokens
|
||||
|
||||
#region Constructor / Extension Loading
|
||||
|
||||
public XRamExtension()
|
||||
{ // Query if Extension supported and retrieve Tokens/Pointers if it is.
|
||||
_valid = false;
|
||||
if (AL.IsExtensionPresent("EAX-RAM") == false)
|
||||
return;
|
||||
|
||||
AL_EAX_RAM_SIZE = AL.GetEnumValue("AL_EAX_RAM_SIZE");
|
||||
AL_EAX_RAM_FREE = AL.GetEnumValue("AL_EAX_RAM_FREE");
|
||||
AL_STORAGE_AUTOMATIC = AL.GetEnumValue("AL_STORAGE_AUTOMATIC");
|
||||
AL_STORAGE_HARDWARE = AL.GetEnumValue("AL_STORAGE_HARDWARE");
|
||||
AL_STORAGE_ACCESSIBLE = AL.GetEnumValue("AL_STORAGE_ACCESSIBLE");
|
||||
|
||||
// Console.WriteLine("RamSize: {0} RamFree: {1} StorageAuto: {2} StorageHW: {3} StorageAccess: {4}",AL_EAX_RAM_SIZE,AL_EAX_RAM_FREE,AL_STORAGE_AUTOMATIC,AL_STORAGE_HARDWARE,AL_STORAGE_ACCESSIBLE);
|
||||
|
||||
if (AL_EAX_RAM_SIZE == 0 ||
|
||||
AL_EAX_RAM_FREE == 0 ||
|
||||
AL_STORAGE_AUTOMATIC == 0 ||
|
||||
AL_STORAGE_HARDWARE == 0 ||
|
||||
AL_STORAGE_ACCESSIBLE == 0)
|
||||
{
|
||||
Debug.WriteLine("X-Ram: Token values could not be retrieved.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Console.WriteLine("Free Ram: {0} / {1}",GetRamFree( ),GetRamSize( ));
|
||||
|
||||
try
|
||||
{
|
||||
Imported_GetBufferMode = (Delegate_GetBufferMode)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("EAXGetBufferMode"), typeof(Delegate_GetBufferMode));
|
||||
Imported_SetBufferMode = (Delegate_SetBufferMode)Marshal.GetDelegateForFunctionPointer(AL.GetProcAddress("EAXSetBufferMode"), typeof(Delegate_SetBufferMode));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.WriteLine("X-Ram: Attempt to marshal function pointers with AL.GetProcAddress failed. " + e.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
_valid = true;
|
||||
}
|
||||
|
||||
#endregion Constructor / Extension Loading
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>Query total amount of X-RAM in bytes.</summary>
|
||||
public int GetRamSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return AL.Get((ALGetInteger)AL_EAX_RAM_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Query free X-RAM available in bytes.</summary>
|
||||
public int GetRamFree
|
||||
{
|
||||
get
|
||||
{
|
||||
return AL.Get((ALGetInteger)AL_EAX_RAM_FREE);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>This enum is used to abstract the need of using AL.GetEnumValue() with the Extension. The values do NOT correspond to AL_STORAGE_* tokens!</summary>
|
||||
public enum XRamStorage : byte
|
||||
{
|
||||
/// <summary>Put an Open AL Buffer into X-RAM if memory is available, otherwise use host RAM. This is the default mode.</summary>
|
||||
Automatic = 0,
|
||||
/// <summary>Force an Open AL Buffer into X-RAM, good for non-streaming buffers.</summary>
|
||||
Hardware = 1,
|
||||
/// <summary>Force an Open AL Buffer into 'accessible' (currently host) RAM, good for streaming buffers.</summary>
|
||||
Accessible = 2,
|
||||
}
|
||||
|
||||
/// <summary>This function is used to set the storage Mode of an array of OpenAL Buffers.</summary>
|
||||
/// <param name="n">The number of OpenAL Buffers pointed to by buffer.</param>
|
||||
/// <param name="buffer">An array of OpenAL Buffer handles.</param>
|
||||
/// <param name="mode">The storage mode that should be used for all the given buffers. Should be the value of one of the following enum names: XRamStorage.Automatic, XRamStorage.Hardware, XRamStorage.Accessible</param>
|
||||
/// <returns>True if all the Buffers were successfully set to the requested storage mode, False otherwise.</returns>
|
||||
[CLSCompliant(false)]
|
||||
public bool SetBufferMode(int n, ref uint buffer, XRamStorage mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case XRamStorage.Accessible:
|
||||
return Imported_SetBufferMode(n, ref buffer, AL_STORAGE_ACCESSIBLE);
|
||||
case XRamStorage.Hardware:
|
||||
return Imported_SetBufferMode(n, ref buffer, AL_STORAGE_HARDWARE);
|
||||
default:
|
||||
return Imported_SetBufferMode(n, ref buffer, AL_STORAGE_AUTOMATIC);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>This function is used to set the storage Mode of an array of OpenAL Buffers.</summary>
|
||||
/// <param name="n">The number of OpenAL Buffers pointed to by buffer.</param>
|
||||
/// <param name="buffer">An array of OpenAL Buffer handles.</param>
|
||||
/// <param name="mode">The storage mode that should be used for all the given buffers. Should be the value of one of the following enum names: XRamStorage.Automatic, XRamStorage.Hardware, XRamStorage.Accessible</param>
|
||||
/// <returns>True if all the Buffers were successfully set to the requested storage mode, False otherwise.</returns>
|
||||
[CLSCompliant(true)]
|
||||
public bool SetBufferMode(int n, ref int buffer, XRamStorage mode)
|
||||
{
|
||||
uint temp = (uint)buffer;
|
||||
return SetBufferMode(n, ref temp, mode);
|
||||
}
|
||||
|
||||
/// <summary>This function is used to retrieve the storage Mode of a single OpenAL Buffer.</summary>
|
||||
/// <param name="buffer">The handle of an OpenAL Buffer.</param>
|
||||
/// <returns>The current Mode of the Buffer.</returns>
|
||||
[CLSCompliant(false)]
|
||||
public XRamStorage GetBufferMode(ref uint buffer)
|
||||
{
|
||||
int tempresult = Imported_GetBufferMode(buffer, IntPtr.Zero); // IntPtr.Zero due to the parameter being unused/reserved atm
|
||||
|
||||
if (tempresult == AL_STORAGE_ACCESSIBLE)
|
||||
return XRamStorage.Accessible;
|
||||
if (tempresult == AL_STORAGE_HARDWARE)
|
||||
return XRamStorage.Hardware;
|
||||
// default:
|
||||
return XRamStorage.Automatic;
|
||||
}
|
||||
|
||||
/// <summary>This function is used to retrieve the storage Mode of a single OpenAL Buffer.</summary>
|
||||
/// <param name="buffer">The handle of an OpenAL Buffer.</param>
|
||||
/// <returns>The current Mode of the Buffer.</returns>
|
||||
[CLSCompliant(true)]
|
||||
public XRamStorage GetBufferMode(ref int buffer)
|
||||
{
|
||||
uint temp = (uint)buffer;
|
||||
return GetBufferMode(ref temp);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
|
||||
}
|
||||
|
406
Source/Compatibility/Audio/OpenAL/Alc/Alc.cs
Normal file
406
Source/Compatibility/Audio/OpenAL/Alc/Alc.cs
Normal file
|
@ -0,0 +1,406 @@
|
|||
#region --- OpenTK.OpenAL License ---
|
||||
/* AlcFunctions.cs
|
||||
* C header: \OpenAL 1.1 SDK\include\Alc.h
|
||||
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||
* See license.txt for license details
|
||||
* http://www.OpenTK.net */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
/* Type Mapping
|
||||
// 8-bit boolean
|
||||
typedef char ALCboolean;
|
||||
* byte
|
||||
// character
|
||||
typedef char ALCchar;
|
||||
* byte
|
||||
// signed 8-bit 2's complement integer
|
||||
typedef char ALCbyte;
|
||||
* byte
|
||||
|
||||
// unsigned 8-bit integer
|
||||
typedef unsigned char ALCubyte;
|
||||
* ubyte
|
||||
|
||||
// signed 16-bit 2's complement integer
|
||||
typedef short ALCshort;
|
||||
* short
|
||||
|
||||
// unsigned 16-bit integer
|
||||
typedef unsigned short ALCushort;
|
||||
* ushort
|
||||
|
||||
// unsigned 32-bit integer
|
||||
typedef unsigned int ALCuint;
|
||||
* uint
|
||||
|
||||
// signed 32-bit 2's complement integer
|
||||
typedef int ALCint;
|
||||
* int
|
||||
// non-negative 32-bit binary integer size
|
||||
typedef int ALCsizei;
|
||||
* int
|
||||
// enumerated 32-bit value
|
||||
typedef int ALCenum;
|
||||
* int
|
||||
|
||||
// 32-bit IEEE754 floating-point
|
||||
typedef float ALCfloat;
|
||||
* float
|
||||
|
||||
// 64-bit IEEE754 floating-point
|
||||
typedef double ALCdouble;
|
||||
* double
|
||||
|
||||
// void type (for opaque pointers only)
|
||||
typedef void ALCvoid;
|
||||
* void
|
||||
|
||||
* ALCdevice
|
||||
* ALCcontext *context
|
||||
* IntPtr
|
||||
*/
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
|
||||
/// <summary>Alc = Audio Library Context</summary>
|
||||
public static class Alc
|
||||
{
|
||||
#region Constants
|
||||
|
||||
private const string Lib = AL.Lib;
|
||||
private const CallingConvention Style = CallingConvention.Cdecl;
|
||||
|
||||
#endregion Constants
|
||||
|
||||
#region Context Management
|
||||
|
||||
#region CreateContext
|
||||
|
||||
/// <summary>This function creates a context using a specified device.</summary>
|
||||
/// <param name="device">a pointer to a device</param>
|
||||
/// <param name="attrlist">a pointer to a set of attributes: ALC_FREQUENCY, ALC_MONO_SOURCES, ALC_REFRESH, ALC_STEREO_SOURCES, ALC_SYNC</param>
|
||||
/// <returns>Returns a pointer to the new context (NULL on failure). The attribute list can be NULL, or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values.</returns>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcCreateContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity]
|
||||
[CLSCompliant(false)]
|
||||
unsafe public static extern ContextHandle CreateContext([In] IntPtr device, [In] int* attrlist);
|
||||
// ALC_API ALCcontext * ALC_APIENTRY alcCreateContext( ALCdevice *device, const ALCint* attrlist );
|
||||
|
||||
/// <summary>This function creates a context using a specified device.</summary>
|
||||
/// <param name="device">a pointer to a device</param>
|
||||
/// <param name="attriblist">an array of a set of attributes: ALC_FREQUENCY, ALC_MONO_SOURCES, ALC_REFRESH, ALC_STEREO_SOURCES, ALC_SYNC</param>
|
||||
/// <returns>Returns a pointer to the new context (NULL on failure).</returns>
|
||||
/// <remarks>The attribute list can be NULL, or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values.</remarks>
|
||||
public static ContextHandle CreateContext(IntPtr device, int[] attriblist)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
fixed (int* attriblist_ptr = attriblist)
|
||||
{
|
||||
return CreateContext(device, attriblist_ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>This function makes a specified context the current context.</summary>
|
||||
/// <param name="context">A pointer to the new context.</param>
|
||||
/// <returns>Returns True on success, or False on failure.</returns>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcMakeContextCurrent", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern bool MakeContextCurrent([In] ContextHandle context);
|
||||
// ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context );
|
||||
|
||||
/// <summary>This function tells a context to begin processing. When a context is suspended, changes in OpenAL state will be accepted but will not be processed. alcSuspendContext can be used to suspend a context, and then all the OpenAL state changes can be applied at once, followed by a call to alcProcessContext to apply all the state changes immediately. In some cases, this procedure may be more efficient than application of properties in a non-suspended state. In some implementations, process and suspend calls are each a NOP.</summary>
|
||||
/// <param name="context">a pointer to the new context</param>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcProcessContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void ProcessContext([In] ContextHandle context);
|
||||
// ALC_API void ALC_APIENTRY alcProcessContext( ALCcontext *context );
|
||||
|
||||
/// <summary>This function suspends processing on a specified context. When a context is suspended, changes in OpenAL state will be accepted but will not be processed. A typical use of alcSuspendContext would be to suspend a context, apply all the OpenAL state changes at once, and then call alcProcessContext to apply all the state changes at once. In some cases, this procedure may be more efficient than application of properties in a non-suspended state. In some implementations, process and suspend calls are each a NOP.</summary>
|
||||
/// <param name="context">a pointer to the context to be suspended.</param>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcSuspendContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void SuspendContext([In] ContextHandle context);
|
||||
// ALC_API void ALC_APIENTRY alcSuspendContext( ALCcontext *context );
|
||||
|
||||
/// <summary>This function destroys a context.</summary>
|
||||
/// <param name="context">a pointer to the new context.</param>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcDestroyContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void DestroyContext([In] ContextHandle context);
|
||||
// ALC_API void ALC_APIENTRY alcDestroyContext( ALCcontext *context );
|
||||
|
||||
/// <summary>This function retrieves the current context.</summary>
|
||||
/// <returns>Returns a pointer to the current context.</returns>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetCurrentContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern ContextHandle GetCurrentContext();
|
||||
// ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( void );
|
||||
|
||||
/// <summary>This function retrieves a context's device pointer.</summary>
|
||||
/// <param name="context">a pointer to a context.</param>
|
||||
/// <returns>Returns a pointer to the specified context's device.</returns>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetContextsDevice", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern IntPtr GetContextsDevice([In] ContextHandle context);
|
||||
// ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context );
|
||||
|
||||
#endregion Context Management
|
||||
|
||||
#region Device Management
|
||||
|
||||
/// <summary>This function opens a device by name.</summary>
|
||||
/// <param name="devicename">a null-terminated string describing a device.</param>
|
||||
/// <returns>Returns a pointer to the opened device. The return value will be NULL if there is an error.</returns>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcOpenDevice", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern IntPtr OpenDevice([In] string devicename);
|
||||
// ALC_API ALCdevice * ALC_APIENTRY alcOpenDevice( const ALCchar *devicename );
|
||||
|
||||
/// <summary>This function closes a device by name.</summary>
|
||||
/// <param name="device">a pointer to an opened device</param>
|
||||
/// <returns>True will be returned on success or False on failure. Closing a device will fail if the device contains any contexts or buffers.</returns>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcCloseDevice", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern bool CloseDevice([In] IntPtr device);
|
||||
// ALC_API ALCboolean ALC_APIENTRY alcCloseDevice( ALCdevice *device );
|
||||
|
||||
#endregion Device Management
|
||||
|
||||
#region Error support.
|
||||
|
||||
/// <summary>This function retrieves the current context error state.</summary>
|
||||
/// <param name="device">a pointer to the device to retrieve the error state from</param>
|
||||
/// <returns>Errorcode Int32.</returns>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetError", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern AlcError GetError([In] IntPtr device);
|
||||
// ALC_API ALCenum ALC_APIENTRY alcGetError( ALCdevice *device );
|
||||
|
||||
#endregion Error support.
|
||||
|
||||
#region Extension support.
|
||||
|
||||
/// <summary>This function queries if a specified context extension is available.</summary>
|
||||
/// <param name="device">a pointer to the device to be queried for an extension.</param>
|
||||
/// <param name="extname">a null-terminated string describing the extension.</param>
|
||||
/// <returns>Returns True if the extension is available, False if the extension is not available.</returns>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcIsExtensionPresent", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern bool IsExtensionPresent([In] IntPtr device, [In] string extname);
|
||||
// ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent( ALCdevice *device, const ALCchar *extname );
|
||||
|
||||
/// <summary>This function retrieves the address of a specified context extension function.</summary>
|
||||
/// <param name="device">a pointer to the device to be queried for the function.</param>
|
||||
/// <param name="funcname">a null-terminated string describing the function.</param>
|
||||
/// <returns>Returns the address of the function, or NULL if it is not found.</returns>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetProcAddress", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern IntPtr GetProcAddress([In] IntPtr device, [In] string funcname);
|
||||
// ALC_API void * ALC_APIENTRY alcGetProcAddress( ALCdevice *device, const ALCchar *funcname );
|
||||
|
||||
/// <summary>This function retrieves the enum value for a specified enumeration name.</summary>
|
||||
/// <param name="device">a pointer to the device to be queried.</param>
|
||||
/// <param name="enumname">a null terminated string describing the enum value.</param>
|
||||
/// <returns>Returns the enum value described by the enumName string. This is most often used for querying an enum value for an ALC extension.</returns>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetEnumValue", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern int GetEnumValue([In] IntPtr device, [In] string enumname);
|
||||
// ALC_API ALCenum ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname );
|
||||
|
||||
#endregion Extension support.
|
||||
|
||||
#region Query functions
|
||||
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetString", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
private static extern IntPtr GetStringPrivate([In] IntPtr device, AlcGetString param);
|
||||
// ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param );
|
||||
|
||||
/// <summary>This function returns pointers to strings related to the context.</summary>
|
||||
/// <remarks>
|
||||
/// ALC_DEFAULT_DEVICE_SPECIFIER will return the name of the default output device.
|
||||
/// ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER will return the name of the default capture device.
|
||||
/// ALC_DEVICE_SPECIFIER will return the name of the specified output device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. A list is a pointer to a series of strings separated by NULL characters, with the list terminated by two NULL characters. See Enumeration Extension for more details.
|
||||
/// ALC_CAPTURE_DEVICE_SPECIFIER will return the name of the specified capture device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied.
|
||||
/// ALC_EXTENSIONS returns a list of available context extensions, with each extension separated by a space and the list terminated by a NULL character.
|
||||
/// </remarks>
|
||||
/// <param name="device">a pointer to the device to be queried.</param>
|
||||
/// <param name="param">an attribute to be retrieved: ALC_DEFAULT_DEVICE_SPECIFIER, ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER, ALC_DEVICE_SPECIFIER, ALC_CAPTURE_DEVICE_SPECIFIER, ALC_EXTENSIONS</param>
|
||||
/// <returns>A string containing the name of the Device.</returns>
|
||||
public static string GetString(IntPtr device, AlcGetString param)
|
||||
{
|
||||
return Marshal.PtrToStringAnsi(GetStringPrivate(device, param));
|
||||
}
|
||||
|
||||
/// <summary>This function returns a List of strings related to the context.</summary>
|
||||
/// <remarks>
|
||||
/// ALC_DEVICE_SPECIFIER will return the name of the specified output device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied. A list is a pointer to a series of strings separated by NULL characters, with the list terminated by two NULL characters. See Enumeration Extension for more details.
|
||||
/// ALC_CAPTURE_DEVICE_SPECIFIER will return the name of the specified capture device if a pointer is supplied, or will return a list of all available devices if a NULL device pointer is supplied.
|
||||
/// ALC_EXTENSIONS returns a list of available context extensions, with each extension separated by a space and the list terminated by a NULL character.
|
||||
/// </remarks>
|
||||
/// <param name="device">a pointer to the device to be queried.</param>
|
||||
/// <param name="param">an attribute to be retrieved: ALC_DEVICE_SPECIFIER, ALC_CAPTURE_DEVICE_SPECIFIER, ALC_ALL_DEVICES_SPECIFIER</param>
|
||||
/// <returns>A List of strings containing the names of the Devices.</returns>
|
||||
public static IList<string> GetString(IntPtr device, AlcGetStringList param)
|
||||
{
|
||||
List<string> result = new List<string>();
|
||||
IntPtr t = GetStringPrivate(IntPtr.Zero, (AlcGetString)param);
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
byte b;
|
||||
int offset = 0;
|
||||
do
|
||||
{
|
||||
b = Marshal.ReadByte(t, offset++);
|
||||
if (b != 0)
|
||||
sb.Append((char)b);
|
||||
if (b == 0)
|
||||
{
|
||||
result.Add(sb.ToString());
|
||||
if (Marshal.ReadByte(t, offset) == 0) // offset already properly increased through ++
|
||||
break; // 2x null
|
||||
else
|
||||
sb.Remove(0, sb.Length); // 1x null
|
||||
}
|
||||
} while (true);
|
||||
|
||||
return (IList<string>)result;
|
||||
}
|
||||
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetIntegerv", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
unsafe static extern void GetInteger(IntPtr device, AlcGetInteger param, int size, int* data);
|
||||
// ALC_API void ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *buffer );
|
||||
|
||||
/// <summary>This function returns integers related to the context.</summary>
|
||||
/// <param name="device">a pointer to the device to be queried.</param>
|
||||
/// <param name="param">an attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES</param>
|
||||
/// <param name="size">the size of the destination buffer provided, in number of integers.</param>
|
||||
/// <param name="data">a pointer to the buffer to be returned</param>
|
||||
public static void GetInteger(IntPtr device, AlcGetInteger param, int size, out int data)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
fixed (int* data_ptr = &data)
|
||||
{
|
||||
GetInteger(device, param, size, data_ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>This function returns integers related to the context.</summary>
|
||||
/// <param name="device">a pointer to the device to be queried.</param>
|
||||
/// <param name="param">an attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES</param>
|
||||
/// <param name="size">the size of the destination buffer provided, in number of integers.</param>
|
||||
/// <param name="data">a pointer to the buffer to be returned</param>
|
||||
public static void GetInteger(IntPtr device, AlcGetInteger param, int size, int[] data)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
fixed (int* data_ptr = data)
|
||||
{
|
||||
GetInteger(device, param, size, data_ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Query functions
|
||||
|
||||
#region Capture functions
|
||||
|
||||
/// <summary>This function opens a capture device by name. </summary>
|
||||
/// <param name="devicename">a pointer to a device name string.</param>
|
||||
/// <param name="frequency">the frequency that the buffer should be captured at.</param>
|
||||
/// <param name="format">the requested capture buffer format.</param>
|
||||
/// <param name="buffersize">the size of the capture buffer in samples, not bytes.</param>
|
||||
/// <returns>Returns the capture device pointer, or NULL on failure.</returns>
|
||||
[CLSCompliant(false), DllImport(Alc.Lib, EntryPoint = "alcCaptureOpenDevice", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern IntPtr CaptureOpenDevice(string devicename, uint frequency, ALFormat format, int buffersize);
|
||||
|
||||
/// <summary>This function opens a capture device by name. </summary>
|
||||
/// <param name="devicename">a pointer to a device name string.</param>
|
||||
/// <param name="frequency">the frequency that the buffer should be captured at.</param>
|
||||
/// <param name="format">the requested capture buffer format.</param>
|
||||
/// <param name="buffersize">the size of the capture buffer in samples, not bytes.</param>
|
||||
/// <returns>Returns the capture device pointer, or NULL on failure.</returns>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcCaptureOpenDevice", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern IntPtr CaptureOpenDevice(string devicename, int frequency, ALFormat format, int buffersize);
|
||||
|
||||
// ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize );
|
||||
|
||||
/// <summary>This function closes the specified capture device.</summary>
|
||||
/// <param name="device">a pointer to a capture device.</param>
|
||||
/// <returns>Returns True if the close operation was successful, False on failure.</returns>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcCaptureCloseDevice", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern bool CaptureCloseDevice([In] IntPtr device);
|
||||
// ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice( ALCdevice *device );
|
||||
|
||||
/// <summary>This function begins a capture operation.</summary>
|
||||
/// <remarks>alcCaptureStart will begin recording to an internal ring buffer of the size specified when opening the capture device. The application can then retrieve the number of samples currently available using the ALC_CAPTURE_SAPMPLES token with alcGetIntegerv. When the application determines that enough samples are available for processing, then it can obtain them with a call to alcCaptureSamples.</remarks>
|
||||
/// <param name="device">a pointer to a capture device.</param>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcCaptureStart", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void CaptureStart([In] IntPtr device);
|
||||
// ALC_API void ALC_APIENTRY alcCaptureStart( ALCdevice *device );
|
||||
|
||||
/// <summary>This function stops a capture operation.</summary>
|
||||
/// <param name="device">a pointer to a capture device.</param>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcCaptureStop", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void CaptureStop([In] IntPtr device);
|
||||
// ALC_API void ALC_APIENTRY alcCaptureStop( ALCdevice *device );
|
||||
|
||||
/// <summary>This function completes a capture operation, and does not block.</summary>
|
||||
/// <param name="device">a pointer to a capture device.</param>
|
||||
/// <param name="buffer">a pointer to a buffer, which must be large enough to accommodate the number of samples.</param>
|
||||
/// <param name="samples">the number of samples to be retrieved.</param>
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcCaptureSamples", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void CaptureSamples(IntPtr device, IntPtr buffer, int samples);
|
||||
// ALC_API void ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
|
||||
|
||||
/// <summary>This function completes a capture operation, and does not block.</summary>
|
||||
/// <param name="device">a pointer to a capture device.</param>
|
||||
/// <param name="buffer">a reference to a buffer, which must be large enough to accommodate the number of samples.</param>
|
||||
/// <param name="samples">the number of samples to be retrieved.</param>
|
||||
public static void CaptureSamples<T>(IntPtr device, ref T buffer, int samples)
|
||||
where T : struct
|
||||
{
|
||||
GCHandle handle = GCHandle.Alloc(buffer, GCHandleType.Pinned);
|
||||
try
|
||||
{
|
||||
CaptureSamples(device, handle.AddrOfPinnedObject(), samples);
|
||||
}
|
||||
finally
|
||||
{
|
||||
handle.Free();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>This function completes a capture operation, and does not block.</summary>
|
||||
/// <param name="device">a pointer to a capture device.</param>
|
||||
/// <param name="buffer">a buffer, which must be large enough to accommodate the number of samples.</param>
|
||||
/// <param name="samples">the number of samples to be retrieved.</param>
|
||||
public static void CaptureSamples<T>(IntPtr device, T[] buffer, int samples)
|
||||
where T : struct
|
||||
{
|
||||
CaptureSamples(device, ref buffer[0], samples);
|
||||
}
|
||||
|
||||
/// <summary>This function completes a capture operation, and does not block.</summary>
|
||||
/// <param name="device">a pointer to a capture device.</param>
|
||||
/// <param name="buffer">a buffer, which must be large enough to accommodate the number of samples.</param>
|
||||
/// <param name="samples">the number of samples to be retrieved.</param>
|
||||
public static void CaptureSamples<T>(IntPtr device, T[,] buffer, int samples)
|
||||
where T : struct
|
||||
{
|
||||
CaptureSamples(device, ref buffer[0, 0], samples);
|
||||
}
|
||||
|
||||
/// <summary>This function completes a capture operation, and does not block.</summary>
|
||||
/// <param name="device">a pointer to a capture device.</param>
|
||||
/// <param name="buffer">a buffer, which must be large enough to accommodate the number of samples.</param>
|
||||
/// <param name="samples">the number of samples to be retrieved.</param>
|
||||
public static void CaptureSamples<T>(IntPtr device, T[,,] buffer, int samples)
|
||||
where T : struct
|
||||
{
|
||||
CaptureSamples(device, ref buffer[0, 0, 0], samples);
|
||||
}
|
||||
|
||||
#endregion Capture functions
|
||||
|
||||
}
|
||||
|
||||
}
|
135
Source/Compatibility/Audio/OpenAL/Alc/AlcEnums.cs
Normal file
135
Source/Compatibility/Audio/OpenAL/Alc/AlcEnums.cs
Normal file
|
@ -0,0 +1,135 @@
|
|||
#region --- OpenTK.OpenAL License ---
|
||||
/* AlcTokens.cs
|
||||
* C header: \OpenAL 1.1 SDK\include\Alc.h
|
||||
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||
* See license.txt for license details
|
||||
* http://www.OpenTK.net */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines available context attributes.
|
||||
/// </summary>
|
||||
public enum AlcContextAttributes : int
|
||||
{
|
||||
///<summary>Followed by System.Int32 Hz</summary>
|
||||
Frequency = 0x1007,
|
||||
|
||||
///<summary>Followed by System.Int32 Hz</summary>
|
||||
Refresh = 0x1008,
|
||||
|
||||
///<summary>Followed by AlBoolean.True, or AlBoolean.False</summary>
|
||||
Sync = 0x1009,
|
||||
|
||||
///<summary>Followed by System.Int32 Num of requested Mono (3D) Sources</summary>
|
||||
MonoSources = 0x1010,
|
||||
|
||||
///<summary>Followed by System.Int32 Num of requested Stereo Sources</summary>
|
||||
StereoSources = 0x1011,
|
||||
|
||||
/// <summary>(EFX Extension) This Context property can be passed to OpenAL during Context creation (alcCreateContext) to request a maximum number of Auxiliary Sends desired on each Source. It is not guaranteed that the desired number of sends will be available, so an application should query this property after creating the context using alcGetIntergerv. Default: 2</summary>
|
||||
EfxMaxAuxiliarySends = 0x20003,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines OpenAL context errors.
|
||||
/// </summary>
|
||||
public enum AlcError : int
|
||||
{
|
||||
///<summary>There is no current error.</summary>
|
||||
NoError = 0,
|
||||
|
||||
///<summary>No Device. The device handle or specifier names an inaccessible driver/server.</summary>
|
||||
InvalidDevice = 0xA001,
|
||||
|
||||
///<summary>Invalid context ID. The Context argument does not name a valid context.</summary>
|
||||
InvalidContext = 0xA002,
|
||||
|
||||
///<summary>Bad enum. A token used is not valid, or not applicable.</summary>
|
||||
InvalidEnum = 0xA003,
|
||||
|
||||
///<summary>Bad value. A value (e.g. Attribute) is not valid, or not applicable.</summary>
|
||||
InvalidValue = 0xA004,
|
||||
|
||||
///<summary>Out of memory. Unable to allocate memory.</summary>
|
||||
OutOfMemory = 0xA005,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines available parameters for <see cref="OpenTK.Audio.Alc.GetString(IntPtr, AlcGetString)"/>.
|
||||
/// </summary>
|
||||
public enum AlcGetString : int
|
||||
{
|
||||
///<summary>The specifier string for the default device.</summary>
|
||||
DefaultDeviceSpecifier = 0x1004,
|
||||
|
||||
///<summary>A list of available context extensions separated by spaces.</summary>
|
||||
Extensions = 0x1006,
|
||||
|
||||
///<summary>The name of the default capture device</summary>
|
||||
CaptureDefaultDeviceSpecifier = 0x311, // ALC_EXT_CAPTURE extension.
|
||||
|
||||
/// <summary>a list of the default devices.</summary>
|
||||
DefaultAllDevicesSpecifier = 0x1012,
|
||||
|
||||
// duplicates from AlcGetStringList:
|
||||
|
||||
///<summary>Will only return the first Device, not a list. Use AlcGetStringList.CaptureDeviceSpecifier. ALC_EXT_CAPTURE_EXT </summary>
|
||||
CaptureDeviceSpecifier = 0x310,
|
||||
|
||||
///<summary>Will only return the first Device, not a list. Use AlcGetStringList.DeviceSpecifier</summary>
|
||||
DeviceSpecifier = 0x1005,
|
||||
|
||||
/// <summary>Will only return the first Device, not a list. Use AlcGetStringList.AllDevicesSpecifier</summary>
|
||||
AllDevicesSpecifier = 0x1013,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines available parameters for <see cref="OpenTK.Audio.Alc.GetString(IntPtr, AlcGetStringList)"/>.
|
||||
/// </summary>
|
||||
public enum AlcGetStringList : int
|
||||
{
|
||||
///<summary>The name of the specified capture device, or a list of all available capture devices if no capture device is specified. ALC_EXT_CAPTURE_EXT </summary>
|
||||
CaptureDeviceSpecifier = 0x310,
|
||||
|
||||
///<summary>The specifier strings for all available devices. ALC_ENUMERATION_EXT</summary>
|
||||
DeviceSpecifier = 0x1005,
|
||||
|
||||
/// <summary>The specifier strings for all available devices. ALC_ENUMERATE_ALL_EXT</summary>
|
||||
AllDevicesSpecifier = 0x1013,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines available parameters for <see cref="OpenTK.Audio.Alc.GetInteger(IntPtr, AlcGetInteger, int, out int)"/>.
|
||||
/// </summary>
|
||||
public enum AlcGetInteger : int
|
||||
{
|
||||
///<summary>The specification revision for this implementation (major version). NULL is an acceptable device.</summary>
|
||||
MajorVersion = 0x1000,
|
||||
|
||||
///<summary>The specification revision for this implementation (minor version). NULL is an acceptable device.</summary>
|
||||
MinorVersion = 0x1001,
|
||||
|
||||
///<summary>The size (number of ALCint values) required for a zero-terminated attributes list, for the current context. NULL is an invalid device.</summary>
|
||||
AttributesSize = 0x1002,
|
||||
|
||||
///<summary>Expects a destination of ALC_ATTRIBUTES_SIZE, and provides an attribute list for the current context of the specified device. NULL is an invalid device.</summary>
|
||||
AllAttributes = 0x1003,
|
||||
|
||||
///<summary>The number of capture samples available. NULL is an invalid device.</summary>
|
||||
CaptureSamples = 0x312,
|
||||
|
||||
/// <summary>(EFX Extension) This property can be used by the application to retrieve the Major version number of the Effects Extension supported by this OpenAL implementation. As this is a Context property is should be retrieved using alcGetIntegerv.</summary>
|
||||
EfxMajorVersion = 0x20001,
|
||||
|
||||
/// <summary>(EFX Extension) This property can be used by the application to retrieve the Minor version number of the Effects Extension supported by this OpenAL implementation. As this is a Context property is should be retrieved using alcGetIntegerv.</summary>
|
||||
EfxMinorVersion = 0x20002,
|
||||
|
||||
/// <summary>(EFX Extension) This Context property can be passed to OpenAL during Context creation (alcCreateContext) to request a maximum number of Auxiliary Sends desired on each Source. It is not guaranteed that the desired number of sends will be available, so an application should query this property after creating the context using alcGetIntergerv. Default: 2</summary>
|
||||
EfxMaxAuxiliarySends = 0x20003,
|
||||
}
|
||||
}
|
87
Source/Compatibility/Audio/Sound.cs
Normal file
87
Source/Compatibility/Audio/Sound.cs
Normal file
|
@ -0,0 +1,87 @@
|
|||
#region --- License ---
|
||||
/* Licensed under the MIT/X11 license.
|
||||
* Copyright (c) 2006-2008 the OpenTK Team.
|
||||
* This notice may not be removed from any source distribution.
|
||||
* See license.txt for licensing details.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
#if false
|
||||
/// <summary>Defines methods to load and hold sound buffer.</summary>
|
||||
public class Sound<SampleType> : IDisposable
|
||||
{
|
||||
bool disposed;
|
||||
SoundReader<SampleType> reader;
|
||||
SoundData<SampleType> data;
|
||||
|
||||
public Sound(Stream s)
|
||||
{
|
||||
if (s == null) throw new ArgumentNullException("s", "Must be a valid System.IO.Stream.");
|
||||
|
||||
reader = SoundReader.Create(s);
|
||||
}
|
||||
|
||||
public Sound(string filename)
|
||||
{
|
||||
if (String.IsNullOrEmpty(filename)) throw new ArgumentNullException("s", "Must be a valid System.IO.Stream.");
|
||||
|
||||
reader = SoundReader.Create(filename);
|
||||
}
|
||||
|
||||
#region --- Public Members ---
|
||||
|
||||
public SoundData ReadSamples(int count)
|
||||
{
|
||||
if (count <= 0) throw new ArgumentOutOfRangeException("count", "Must be larger than zero.");
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public SoundData ReadToEnd()
|
||||
{
|
||||
return reader.ReadToEnd();
|
||||
}
|
||||
|
||||
public SoundData SoundData { get { return data; } }
|
||||
|
||||
public void WriteToBuffer(int buffer, int length)
|
||||
{
|
||||
if (buffer == 0) throw new ArgumentOutOfRangeException("buffer", "May not be zero.");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- IDisposable Members ---
|
||||
|
||||
/// <summary>Disposes of the sound buffer.</summary>
|
||||
public void Dispose()
|
||||
{
|
||||
this.Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
private void Dispose(bool manual)
|
||||
{
|
||||
if (!disposed)
|
||||
{
|
||||
if (manual)
|
||||
reader.Dispose();
|
||||
disposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
~Sound()
|
||||
{
|
||||
this.Dispose(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
#endif
|
||||
}
|
266
Source/Compatibility/Audio/WaveReader.cs
Normal file
266
Source/Compatibility/Audio/WaveReader.cs
Normal file
|
@ -0,0 +1,266 @@
|
|||
#region --- License ---
|
||||
/* Licensed under the MIT/X11 license.
|
||||
* Copyright (c) 2006-2008 the OpenTK Team.
|
||||
* This notice may not be removed from any source distribution.
|
||||
* See license.txt for licensing details.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
using OpenTK.Audio;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
internal sealed class WaveReader : AudioReader
|
||||
{
|
||||
SoundData decoded_data;
|
||||
|
||||
//RIFF header
|
||||
string signature;
|
||||
int riff_chunck_size;
|
||||
string format;
|
||||
|
||||
//WAVE header
|
||||
string format_signature;
|
||||
int format_chunk_size;
|
||||
short audio_format;
|
||||
short channels;
|
||||
int sample_rate;
|
||||
int byte_rate;
|
||||
short block_align;
|
||||
short bits_per_sample;
|
||||
|
||||
//DATA header
|
||||
string data_signature;
|
||||
int data_chunk_size;
|
||||
|
||||
BinaryReader reader;
|
||||
|
||||
internal WaveReader() { }
|
||||
|
||||
internal WaveReader(Stream s)
|
||||
{
|
||||
if (s == null) throw new ArgumentNullException();
|
||||
if (!s.CanRead) throw new ArgumentException("Cannot read from specified Stream.");
|
||||
|
||||
reader = new BinaryReader(s);
|
||||
this.Stream = s;
|
||||
}
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Writes the WaveSound's data to the specified OpenAL buffer in the correct format.
|
||||
/// </summary>
|
||||
/// <param name="bid">
|
||||
/// A <see cref="System.UInt32"/>
|
||||
/// </param>
|
||||
public void WriteToBuffer(uint bid)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
//fix the array as a byte
|
||||
fixed (byte* p_Data = _Data)
|
||||
{
|
||||
if (Channels == 1)
|
||||
{
|
||||
if (BitsPerSample == 16)
|
||||
{
|
||||
Console.Write("Uploading 16 bit mono data to OpenAL...");
|
||||
AL.BufferData(bid, ALFormat.Mono16, (IntPtr)p_Data, _Data.Length, SampleRate);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (BitsPerSample == 8)
|
||||
{
|
||||
Console.Write("Uploading 8 bit mono data to OpenAL...");
|
||||
AL.BufferData(bid, ALFormat.Mono8, (IntPtr)p_Data, _Data.Length, SampleRate);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Channels == 2)
|
||||
{
|
||||
if (BitsPerSample == 16)
|
||||
{
|
||||
Console.Write("Uploading 16 bit stereo data to OpenAL...");
|
||||
AL.BufferData(bid, ALFormat.Stereo16, (IntPtr)p_Data, _Data.Length, SampleRate);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (BitsPerSample == 8)
|
||||
{
|
||||
Console.Write("Uploading 8 bit stereo data to OpenAL...");
|
||||
AL.BufferData(bid, ALFormat.Stereo8, (IntPtr)p_Data, _Data.Length, SampleRate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes all relevent information about the WaveSound to the console window.
|
||||
/// </summary>
|
||||
public void DumpParamsToConsole()
|
||||
{
|
||||
Console.WriteLine("AudioFormat:" + AudioFormat);
|
||||
Console.WriteLine("Channels:" + Channels);
|
||||
Console.WriteLine("SampleRate:" + SampleRate);
|
||||
Console.WriteLine("ByteRate:" + ByteRate);
|
||||
Console.WriteLine("BlockAlign:" + BlockAlign);
|
||||
Console.WriteLine("BitsPerSample:" + BitsPerSample);
|
||||
}
|
||||
|
||||
/// <value>
|
||||
/// Returns the WaveSound's raw sound data as an array of bytes.
|
||||
/// </value>
|
||||
public byte[] Data
|
||||
{
|
||||
get
|
||||
{
|
||||
return _Data;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#region --- Public Members ---
|
||||
|
||||
#region public override bool Supports(Stream s)
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether the specified stream contains valid WAVE/RIFF buffer.
|
||||
/// </summary>
|
||||
/// <param name="s">The System.IO.Stream to check.</param>
|
||||
/// <returns>True if the stream is a valid WAVE/RIFF file; false otherwise.</returns>
|
||||
public override bool Supports(Stream s)
|
||||
{
|
||||
BinaryReader reader = new BinaryReader(s);
|
||||
return this.ReadHeaders(reader);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public override SoundData ReadSamples(int samples)
|
||||
|
||||
/// <summary>
|
||||
/// Reads and decodes the specified number of samples from the sound stream.
|
||||
/// </summary>
|
||||
/// <param name="samples">The number of samples to read and decode.</param>
|
||||
/// <returns>An OpenTK.Audio.SoundData object that contains the decoded buffer.</returns>
|
||||
public override SoundData ReadSamples(long samples)
|
||||
{
|
||||
if (samples > reader.BaseStream.Length - reader.BaseStream.Position)
|
||||
samples = reader.BaseStream.Length - reader.BaseStream.Position;
|
||||
|
||||
//while (samples > decoded_data.Data.Length * (bits_per_sample / 8))
|
||||
// Array.Resize<byte>(ref decoded_data.Data, decoded_data.Data.Length * 2);
|
||||
|
||||
decoded_data = new SoundData(new SoundFormat(channels, bits_per_sample, sample_rate),
|
||||
reader.ReadBytes((int)samples));
|
||||
|
||||
return decoded_data;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public override SoundData ReadToEnd()
|
||||
|
||||
/// <summary>
|
||||
/// Reads and decodes the sound stream.
|
||||
/// </summary>
|
||||
/// <returns>An OpenTK.Audio.SoundData object that contains the decoded buffer.</returns>
|
||||
public override SoundData ReadToEnd()
|
||||
{
|
||||
try
|
||||
{
|
||||
//read the buffer into a byte array, even if the format is 16 bit
|
||||
//decoded_data = new byte[data_chunk_size];
|
||||
|
||||
decoded_data = new SoundData(new SoundFormat(channels, bits_per_sample, sample_rate),
|
||||
reader.ReadBytes((int)reader.BaseStream.Length));
|
||||
|
||||
Debug.WriteLine("decoded!");
|
||||
|
||||
//return new SoundData(decoded_data, new SoundFormat(channels, bits_per_sample, sample_rate));
|
||||
return decoded_data;
|
||||
}
|
||||
catch (AudioReaderException)
|
||||
{
|
||||
reader.Close();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- Protected Members ---
|
||||
|
||||
protected override Stream Stream
|
||||
{
|
||||
get { return base.Stream; }
|
||||
set
|
||||
{
|
||||
base.Stream = value;
|
||||
if (!ReadHeaders(reader))
|
||||
throw new AudioReaderException("Invalid WAVE/RIFF file: invalid or corrupt signature.");
|
||||
|
||||
Debug.Write(String.Format("Opened WAVE/RIFF file: ({0}, {1}, {2}, {3}) ", sample_rate.ToString(), bits_per_sample.ToString(),
|
||||
channels.ToString(), audio_format.ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- Private Members ---
|
||||
|
||||
// Tries to read the WAVE/RIFF headers, and returns true if they are valid.
|
||||
bool ReadHeaders(BinaryReader reader)
|
||||
{
|
||||
// Don't explicitly call reader.Close()/.Dispose(), as that will close the inner stream.
|
||||
// There's no such danger if the BinaryReader isn't explicitly destroyed.
|
||||
|
||||
// RIFF header
|
||||
signature = new string(reader.ReadChars(4));
|
||||
if (signature != "RIFF")
|
||||
return false;
|
||||
|
||||
riff_chunck_size = reader.ReadInt32();
|
||||
|
||||
format = new string(reader.ReadChars(4));
|
||||
if (format != "WAVE")
|
||||
return false;
|
||||
|
||||
// WAVE header
|
||||
format_signature = new string(reader.ReadChars(4));
|
||||
if (format_signature != "fmt ")
|
||||
return false;
|
||||
|
||||
format_chunk_size = reader.ReadInt32();
|
||||
audio_format = reader.ReadInt16();
|
||||
channels = reader.ReadInt16();
|
||||
sample_rate = reader.ReadInt32();
|
||||
byte_rate = reader.ReadInt32();
|
||||
block_align = reader.ReadInt16();
|
||||
bits_per_sample = reader.ReadInt16();
|
||||
|
||||
data_signature = new string(reader.ReadChars(4));
|
||||
if (data_signature != "data")
|
||||
return false;
|
||||
|
||||
data_chunk_size = reader.ReadInt32();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -34,8 +34,9 @@ using System.Windows.Forms;
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
|
||||
using OpenTK.Audio;
|
||||
using OpenTK;
|
||||
using OpenTK.Audio;
|
||||
using OpenTK.Audio.OpenAL;
|
||||
|
||||
namespace Examples
|
||||
{
|
||||
|
|
|
@ -11,6 +11,7 @@ using System.Threading;
|
|||
using System.IO;
|
||||
|
||||
using OpenTK.Audio;
|
||||
using OpenTK.Audio.OpenAL;
|
||||
|
||||
namespace Examples
|
||||
{
|
||||
|
@ -19,10 +20,65 @@ namespace Examples
|
|||
{
|
||||
static readonly string filename = Path.Combine(Path.Combine("Data", "Audio"), "the_ring_that_fell.wav");
|
||||
|
||||
// Loads a wave/riff audio file.
|
||||
public static byte[] LoadWave(Stream stream, out int channels, out int bits, out int rate)
|
||||
{
|
||||
if (stream == null)
|
||||
throw new ArgumentNullException("stream");
|
||||
|
||||
using (BinaryReader reader = new BinaryReader(stream))
|
||||
{
|
||||
// RIFF header
|
||||
string signature = new string(reader.ReadChars(4));
|
||||
if (signature != "RIFF")
|
||||
throw new NotSupportedException("Specified stream is not a wave file.");
|
||||
|
||||
int riff_chunck_size = reader.ReadInt32();
|
||||
|
||||
string format = new string(reader.ReadChars(4));
|
||||
if (format != "WAVE")
|
||||
throw new NotSupportedException("Specified stream is not a wave file.");
|
||||
|
||||
// WAVE header
|
||||
string format_signature = new string(reader.ReadChars(4));
|
||||
if (format_signature != "fmt ")
|
||||
throw new NotSupportedException("Specified wave file is not supported.");
|
||||
|
||||
int format_chunk_size = reader.ReadInt32();
|
||||
int audio_format = reader.ReadInt16();
|
||||
int num_channels = reader.ReadInt16();
|
||||
int sample_rate = reader.ReadInt32();
|
||||
int byte_rate = reader.ReadInt32();
|
||||
int block_align = reader.ReadInt16();
|
||||
int bits_per_sample = reader.ReadInt16();
|
||||
|
||||
string data_signature = new string(reader.ReadChars(4));
|
||||
if (data_signature != "data")
|
||||
throw new NotSupportedException("Specified wave file is not supported.");
|
||||
|
||||
int data_chunk_size = reader.ReadInt32();
|
||||
|
||||
channels = num_channels;
|
||||
bits = bits_per_sample;
|
||||
rate = sample_rate;
|
||||
|
||||
return reader.ReadBytes((int)reader.BaseStream.Length);
|
||||
}
|
||||
}
|
||||
|
||||
public static ALFormat GetSoundFormat(int channels, int bits)
|
||||
{
|
||||
switch (channels)
|
||||
{
|
||||
case 1: return bits == 8 ? ALFormat.Mono8 : ALFormat.Mono16;
|
||||
case 2: return bits == 8 ? ALFormat.Stereo8 : ALFormat.Stereo16;
|
||||
default: throw new NotSupportedException("The specified sound format is not supported.");
|
||||
}
|
||||
}
|
||||
|
||||
public static void Main()
|
||||
{
|
||||
using (AudioContext context = new AudioContext())
|
||||
using (AudioReader sound = new AudioReader(filename))
|
||||
{
|
||||
Console.WriteLine("Testing WaveReader({0}).ReadToEnd()", filename);
|
||||
|
||||
|
@ -30,7 +86,10 @@ namespace Examples
|
|||
int source = AL.GenSource();
|
||||
int state;
|
||||
|
||||
AL.BufferData(buffer, sound.ReadToEnd());
|
||||
int channels, bits_per_sample, sample_rate;
|
||||
byte[] sound_data = LoadWave(File.Open(filename, FileMode.Open), out channels, out bits_per_sample, out sample_rate);
|
||||
AL.BufferData(buffer, GetSoundFormat(channels, bits_per_sample), sound_data, sound_data.Length, sample_rate);
|
||||
|
||||
AL.Source(source, ALSourcei.Buffer, buffer);
|
||||
AL.SourcePlay(source);
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ using System.Threading;
|
|||
using System.ComponentModel;
|
||||
|
||||
using OpenTK.Audio;
|
||||
using OpenTK.Audio.OpenAL;
|
||||
|
||||
namespace Examples.OpenAL
|
||||
{
|
||||
|
@ -30,7 +31,6 @@ namespace Examples.OpenAL
|
|||
public static void Main()
|
||||
{
|
||||
using (AudioContext context = new AudioContext())
|
||||
using (AudioReader sound = new AudioReader(filename))
|
||||
{
|
||||
int source = AL.GenSource();
|
||||
int[] buffers = AL.GenBuffers(buffer_count);
|
||||
|
@ -40,8 +40,8 @@ namespace Examples.OpenAL
|
|||
|
||||
Console.Write("Playing");
|
||||
|
||||
foreach (int buffer in buffers)
|
||||
AL.BufferData(buffer, sound.ReadSamples(buffer_size));
|
||||
//foreach (int buffer in buffers)
|
||||
// AL.BufferData(buffer, sound.ReadSamples(buffer_size));
|
||||
AL.SourceQueueBuffers(source, buffers.Length, buffers);
|
||||
AL.SourcePlay(source);
|
||||
|
||||
|
@ -59,17 +59,17 @@ namespace Examples.OpenAL
|
|||
while (processed_count == 0);
|
||||
|
||||
Console.WriteLine(processed_count);
|
||||
while (processed_count > 0)
|
||||
{
|
||||
int buffer = AL.SourceUnqueueBuffer(source);
|
||||
if (buffer != 0 && !sound.EndOfFile)
|
||||
{
|
||||
Console.WriteLine(" " + buffer.ToString());
|
||||
AL.BufferData(buffer, sound.ReadSamples(buffer_size));
|
||||
AL.SourceQueueBuffer(source, buffer);
|
||||
}
|
||||
--processed_count;
|
||||
}
|
||||
//while (processed_count > 0)
|
||||
//{
|
||||
// int buffer = AL.SourceUnqueueBuffer(source);
|
||||
// if (buffer != 0 && !sound.EndOfFile)
|
||||
// {
|
||||
// Console.WriteLine(" " + buffer.ToString());
|
||||
// AL.BufferData(buffer, sound.ReadSamples(buffer_size));
|
||||
// AL.SourceQueueBuffer(source, buffer);
|
||||
// }
|
||||
// --processed_count;
|
||||
//}
|
||||
|
||||
AL.GetSource(source, ALGetSourcei.BuffersQueued, out queued_count);
|
||||
if (queued_count > 0)
|
||||
|
|
|
@ -29,6 +29,7 @@ using System;
|
|||
using System.Threading;
|
||||
using System.IO;
|
||||
using OpenTK.Audio;
|
||||
using OpenTK.Audio.OpenAL;
|
||||
|
||||
namespace Examples
|
||||
{
|
||||
|
@ -40,7 +41,6 @@ namespace Examples
|
|||
public static void Main()
|
||||
{
|
||||
using (AudioContext context = new AudioContext())
|
||||
using (AudioReader sound = new AudioReader(filename))
|
||||
{
|
||||
Console.WriteLine("Testing WaveReader({0}).ReadToEnd()", filename);
|
||||
|
||||
|
@ -65,7 +65,9 @@ namespace Examples
|
|||
|
||||
efx.AuxiliaryEffectSlot(slot, EfxAuxiliaryi.EffectslotEffect, effect);
|
||||
|
||||
AL.BufferData(buffer, sound.ReadToEnd());
|
||||
int channels, bits, rate;
|
||||
byte[] data = Playback.LoadWave(File.Open(filename, FileMode.Open), out channels, out bits, out rate);
|
||||
AL.BufferData(buffer, Playback.GetSoundFormat(channels, bits), data, data.Length, rate);
|
||||
|
||||
AL.Source(source, ALSourcef.ConeOuterGain, 1.0f);
|
||||
AL.Source(source, ALSourcei.Buffer, buffer);
|
||||
|
|
|
@ -33,6 +33,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
using OpenTK;
|
||||
using OpenTK.Audio;
|
||||
using OpenTK.Audio.OpenAL;
|
||||
|
||||
namespace Examples
|
||||
{
|
||||
|
|
|
@ -7,12 +7,13 @@
|
|||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
using OpenTK.Audio;
|
||||
using OpenTK.Audio.OpenAL;
|
||||
|
||||
using AlContext = System.IntPtr;
|
||||
using AlDevice = System.IntPtr;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Examples
|
||||
{
|
||||
|
|
|
@ -69,13 +69,15 @@ namespace Examples.WinForms
|
|||
|
||||
void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
Type delegates = typeof(GL).GetNestedType("Delegates", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
|
||||
foreach (Function f in LoadFunctionsFromType(typeof(GL)))
|
||||
{
|
||||
// Only show a function as supported when all relevant overloads are supported.
|
||||
if (!functions.ContainsKey(f))
|
||||
functions.Add(f, GL.SupportsFunction(f.EntryPoint));
|
||||
functions.Add(f, (bool)delegates.GetField(f.EntryPoint).GetValue(null));
|
||||
else
|
||||
functions[f] &= GL.SupportsFunction(f.EntryPoint);
|
||||
functions[f] &= (bool)delegates.GetField(f.EntryPoint).GetValue(null);
|
||||
}
|
||||
|
||||
// Count supported functions using the delegates directly.
|
||||
|
|
|
@ -30,6 +30,8 @@ using System.Collections.Generic;
|
|||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using OpenTK.Audio.OpenAL;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ using System.Collections.Generic;
|
|||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
|
||||
using OpenTK.Audio;
|
||||
using OpenTK.Audio.OpenAL;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
|
|
|
@ -28,7 +28,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics;
|
||||
|
||||
using OpenTK.Audio.OpenAL;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
|
|
|
@ -29,6 +29,8 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using OpenTK.Audio.OpenAL;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
struct AudioDeviceErrorChecker : IDisposable
|
||||
|
|
|
@ -63,7 +63,7 @@ typedef void ALvoid;
|
|||
* void
|
||||
*/
|
||||
|
||||
namespace OpenTK.Audio
|
||||
namespace OpenTK.Audio.OpenAL
|
||||
{
|
||||
public static partial class AL
|
||||
{
|
||||
|
@ -1448,34 +1448,6 @@ namespace OpenTK.Audio
|
|||
finally { handle.Free(); }
|
||||
}
|
||||
|
||||
/// <summary>This function fills a buffer with audio buffer (PCM format).</summary>
|
||||
/// <param name="bid">Buffer Handle/Name to be filled with buffer.</param>
|
||||
/// <param name="buffer">A SoundData object containing the buffer to upload.</param>
|
||||
[CLSCompliant(false)]
|
||||
[Obsolete("Use BufferData<TBuffer> instead.")]
|
||||
public static void BufferData(uint bid, SoundData buffer)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
fixed (byte* data_ptr = &buffer.Data[0])
|
||||
BufferData(bid, buffer.SoundFormat.SampleFormatAsOpenALFormat, (IntPtr)data_ptr, buffer.Data.Length,
|
||||
buffer.SoundFormat.SampleRate);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>This function fills a buffer with audio buffer (PCM format).</summary>
|
||||
/// <param name="bid">Buffer Handle/Name to be filled with buffer.</param>
|
||||
/// <param name="data">A SoundData object containing the buffer to upload.</param>
|
||||
public static void BufferData(int bid, SoundData data)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
fixed (byte* data_ptr = &data.Data[0])
|
||||
BufferData(bid, data.SoundFormat.SampleFormatAsOpenALFormat, (IntPtr)data_ptr, data.Data.Length,
|
||||
data.SoundFormat.SampleRate);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion BufferData
|
||||
|
||||
#endregion Buffer objects
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
using System;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
namespace OpenTK.Audio.OpenAL
|
||||
{
|
||||
|
||||
///<summary>A list of valid Enable/Disable/IsEnabled parameters</summary>
|
||||
|
|
|
@ -12,7 +12,7 @@ using System.Diagnostics;
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
namespace OpenTK.Audio
|
||||
namespace OpenTK.Audio.OpenAL
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides access to the OpenAL effects extension.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
using System;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
namespace OpenTK.Audio.OpenAL
|
||||
{
|
||||
#region Effect
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
using System;
|
||||
|
||||
|
||||
namespace OpenTK.Audio
|
||||
namespace OpenTK.Audio.OpenAL
|
||||
{
|
||||
public partial class EffectsExtension
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@ using System;
|
|||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
namespace OpenTK.Audio.OpenAL
|
||||
{
|
||||
|
||||
///<summary>The X-Ram Extension is provided on the top-end Sound Blaster X-Fi solutions (Sound Blaster X-Fi Fatal1ty, Sound Blaster X-Fi Elite Pro, or later). These products feature 64MB of X-Ram that can only be used for audio purposes, which can be controlled by this Extension.</summary>
|
||||
|
|
|
@ -66,7 +66,7 @@ typedef void ALCvoid;
|
|||
* IntPtr
|
||||
*/
|
||||
|
||||
namespace OpenTK.Audio
|
||||
namespace OpenTK.Audio.OpenAL
|
||||
{
|
||||
|
||||
/// <summary>Alc = Audio Library Context</summary>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
using System;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
namespace OpenTK.Audio.OpenAL
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines available context attributes.
|
||||
|
|
Loading…
Reference in a new issue