#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.OpenAL { ///A list of valid Enable/Disable/IsEnabled parameters public enum ALCapability : int { ///Currently no state toggles exist for vanilla OpenAL and no Extension uses it. Invalid = -1, } ///A list of valid 32-Bits Float Listener/GetListener parameters public enum ALListenerf : int { ///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. Gain = 0x100A, ///(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 EfxMetersPerUnit = 0x20004, } ///A list of valid Math.Vector3 Listener/GetListener parameters public enum ALListener3f : int { ///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. Position = 0x1004, ///Specify the current velocity in three dimensional space. Velocity = 0x1006, } ///A list of valid float[] Listener/GetListener parameters public enum ALListenerfv : int { ///Indicate Listener orientation. Expects two Vector3, At followed by Up. Orientation = 0x100F, } ///A list of valid 32-Bits Float Source/GetSource parameters public enum ALSourcef : int { ///Source specific reference distance. Type: float Range: [0.0f - float.PositiveInfinity] At 0.0f, no distance attenuation occurs. Type: float Default: 1.0f. ReferenceDistance = 0x1020, ///Indicate distance above which Sources are not attenuated using the inverse clamped distance model. Default: float.PositiveInfinity Type: float Range: [0.0f - float.PositiveInfinity] MaxDistance = 0x1023, ///Source specific rolloff factor. Type: float Range: [0.0f - float.PositiveInfinity] RolloffFactor = 0x1021, ///Specify the pitch to be applied, either at Source, or on mixer results, at Listener. Range: [0.5f - 2.0f] Default: 1.0f Pitch = 0x1003, ///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. Gain = 0x100A, ///Indicate minimum Source attenuation. Type: float Range: [0.0f - 1.0f] (Logarthmic) MinGain = 0x100D, ///Indicate maximum Source attenuation. Type: float Range: [0.0f - 1.0f] (Logarthmic) MaxGain = 0x100E, ///Directional Source, inner cone angle, in degrees. Range: [0-360] Default: 360 ConeInnerAngle = 0x1001, ///Directional Source, outer cone angle, in degrees. Range: [0-360] Default: 360 ConeOuterAngle = 0x1002, ///Directional Source, outer cone gain. Default: 0.0f Range: [0.0f - 1.0] (Logarithmic) ConeOuterGain = 0x1022, /// The playback position, expressed in seconds. SecOffset = 0x1024, // AL_EXT_OFFSET extension. ///(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 EfxAirAbsorptionFactor = 0x20007, ///(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 EfxRoomRolloffFactor = 0x20008, ///(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 EfxConeOuterGainHighFrequency = 0x20009, } ///A list of valid Math.Vector3 Source/GetSource parameters public enum ALSource3f : int { ///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. Position = 0x1004, ///Specify the current velocity in three dimensional space. Velocity = 0x1006, ///Specify the current direction vector. Direction = 0x1005, } ///A list of valid 8-Bits boolean Source/GetSource parameters public enum ALSourceb : int { ///Indicate that the Source has relative coordinates. Type: bool Range: [True, False] SourceRelative = 0x202, ///Indicate whether the Source is looping. Type: bool Range: [True, False] Default: False. Looping = 0x1007, ///(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 EfxDirectFilterGainHighFrequencyAuto = 0x2000A, ///(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 EfxAuxiliarySendFilterGainAuto = 0x2000B, ///(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 EfxAuxiliarySendFilterGainHighFrequencyAuto = 0x2000C, } ///A list of valid Int32 Source parameters public enum ALSourcei : int { ///The playback position, expressed in bytes. ByteOffset = 0x1026, // AL_EXT_OFFSET extension. ///The playback position, expressed in samples. SampleOffset = 0x1025, // AL_EXT_OFFSET extension. ///Indicate the Buffer to provide sound samples. Type: uint Range: any valid Buffer Handle. Buffer = 0x1009, ///Source type (Static, Streaming or undetermined). Use enum AlSourceType for comparison SourceType = 0x1027, ///(EFX Extension) This Source property is used to apply filtering on the direct-path (dry signal) of a Source. EfxDirectFilter = 0x20005, } ///A list of valid 3x Int32 Source/GetSource parameters public enum ALSource3i : int { ///(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. EfxAuxiliarySendFilter = 0x20006, } ///A list of valid Int32 GetSource parameters public enum ALGetSourcei : int { ///The playback position, expressed in bytes. AL_EXT_OFFSET Extension. ByteOffset = 0x1026, ///The playback position, expressed in samples. AL_EXT_OFFSET Extension. SampleOffset = 0x1025, ///Indicate the Buffer to provide sound samples. Type: uint Range: any valid Buffer Handle. Buffer = 0x1009, /// The state of the source (Stopped, Playing, etc.) Use the enum AlSourceState for comparison. SourceState = 0x1010, /// The number of buffers queued on this source. BuffersQueued = 0x1015, /// The number of buffers in the queue that have been processed. BuffersProcessed = 0x1016, ///Source type (Static, Streaming or undetermined). Use enum AlSourceType for comparison. SourceType = 0x1027, } /* public enum ALDeprecated : int { ///Deprecated. Specify the channel mask. (Creative) Type: uint Range: [0 - 255] ChannelMask = 0x3000, } */ ///Source state information, can be retrieved by AL.Source() with ALSourcei.SourceState. public enum ALSourceState : int { ///Default State when loaded, can be manually set with AL.SourceRewind(). Initial = 0x1011, ///The source is currently playing. Playing = 0x1012, ///The source has paused playback. Paused = 0x1013, ///The source is not playing. Stopped = 0x1014, } ///Source type information, can be retrieved by AL.Source() with ALSourcei.SourceType. public enum ALSourceType : int { ///Source is Static if a Buffer has been attached using AL.Source with the parameter Sourcei.Buffer. Static = 0x1028, ///Source is Streaming if one or more Buffers have been attached using AL.SourceQueueBuffers Streaming = 0x1029, ///Source is undetermined when it has a null Buffer attached Undetermined = 0x1030, } ///Sound samples: Format specifier. public enum ALFormat : int { ///1 Channel, 8 Bits per sample. Mono8 = 0x1100, ///1 Channel, 16 Bits per sample. Mono16 = 0x1101, ///2 Channels, 8 Bits per sample each. Stereo8 = 0x1102, ///2 Channels, 16 Bits per sample each. Stereo16 = 0x1103, /// 1 Channel, A-law encoded data. Requires Extension: AL_EXT_ALAW MonoALawExt = 0x10016, /// 2 Channels, A-law encoded data. Requires Extension: AL_EXT_ALAW StereoALawExt = 0x10017, /// 1 Channel, µ-law encoded data. Requires Extension: AL_EXT_MULAW MonoMuLawExt = 0x10014, /// 2 Channels, µ-law encoded data. Requires Extension: AL_EXT_MULAW StereoMuLawExt = 0x10015, /// Ogg Vorbis encoded data. Requires Extension: AL_EXT_vorbis VorbisExt = 0x10003, /// MP3 encoded data. Requires Extension: AL_EXT_mp3 Mp3Ext = 0x10020, /// 1 Channel, IMA4 ADPCM encoded data. Requires Extension: AL_EXT_IMA4 MonoIma4Ext = 0x1300, /// 2 Channels, IMA4 ADPCM encoded data. Requires Extension: AL_EXT_IMA4 StereoIma4Ext = 0x1301, /// 1 Channel, single-precision floating-point data. Requires Extension: AL_EXT_float32 MonoFloat32Ext = 0x10010, /// 2 Channels, single-precision floating-point data. Requires Extension: AL_EXT_float32 StereoFloat32Ext = 0x10011, /// 1 Channel, double-precision floating-point data. Requires Extension: AL_EXT_double MonoDoubleExt = 0x10012, /// 2 Channels, double-precision floating-point data. Requires Extension: AL_EXT_double StereoDoubleExt = 0x10013, /// Multichannel 5.1, 16 Bits data. Requires Extension: AL_EXT_MCFORMATS Multi51Chn16Ext = 0x120B, /// Multichannel 5.1, 32 Bits data. Requires Extension: AL_EXT_MCFORMATS Multi51Chn32Ext = 0x120C, /// Multichannel 5.1, 8 Bits data. Requires Extension: AL_EXT_MCFORMATS Multi51Chn8Ext = 0x120A, /// Multichannel 6.1, 16 Bits data. Requires Extension: AL_EXT_MCFORMATS Multi61Chn16Ext = 0x120E, /// Multichannel 6.1, 32 Bits data. Requires Extension: AL_EXT_MCFORMATS Multi61Chn32Ext = 0x120F, /// Multichannel 6.1, 8 Bits data. Requires Extension: AL_EXT_MCFORMATS Multi61Chn8Ext = 0x120D, /// Multichannel 7.1, 16 Bits data. Requires Extension: AL_EXT_MCFORMATS Multi71Chn16Ext = 0x1211, /// Multichannel 7.1, 32 Bits data. Requires Extension: AL_EXT_MCFORMATS Multi71Chn32Ext = 0x1212, /// Multichannel 7.1, 8 Bits data. Requires Extension: AL_EXT_MCFORMATS Multi71Chn8Ext = 0x1210, /// Multichannel 4.0, 16 Bits data. Requires Extension: AL_EXT_MCFORMATS MultiQuad16Ext = 0x1205, /// Multichannel 4.0, 32 Bits data. Requires Extension: AL_EXT_MCFORMATS MultiQuad32Ext = 0x1206, /// Multichannel 4.0, 8 Bits data. Requires Extension: AL_EXT_MCFORMATS MultiQuad8Ext = 0x1204, /// 1 Channel rear speaker, 16 Bits data. See Quadrophonic setups. Requires Extension: AL_EXT_MCFORMATS MultiRear16Ext = 0x1208, /// 1 Channel rear speaker, 32 Bits data. See Quadrophonic setups. Requires Extension: AL_EXT_MCFORMATS MultiRear32Ext = 0x1209, /// 1 Channel rear speaker, 8 Bits data. See Quadrophonic setups. Requires Extension: AL_EXT_MCFORMATS MultiRear8Ext = 0x1207, } ///A list of valid Int32 GetBuffer parameters public enum ALGetBufferi : int { ///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. Frequency = 0x2001, /// Bit depth of the buffer. Should be 8 or 16. Bits = 0x2002, /// Number of channels in buffer. > 1 is valid, but buffer won’t be positioned when played. 1 for Mono, 2 for Stereo. Channels = 0x2003, /// size of the Buffer in bytes. 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 } ///Buffer state. Not supported for public use (yet). public enum ALBufferState : int { ///Buffer state. Not supported for public use (yet). Unused = 0x2010, ///Buffer state. Not supported for public use (yet). Pending = 0x2011, ///Buffer state. Not supported for public use (yet). Processed = 0x2012, } /// Returned by AL.GetError public enum ALError : int { ///No OpenAL Error. NoError = 0, ///Invalid Name paramater passed to OpenAL call. InvalidName = 0xA001, ///Invalid parameter passed to OpenAL call. IllegalEnum = 0xA002, ///Invalid parameter passed to OpenAL call. InvalidEnum = 0xA002, ///Invalid OpenAL enum parameter value. InvalidValue = 0xA003, ///Illegal OpenAL call. IllegalCommand = 0xA004, ///Illegal OpenAL call. InvalidOperation = 0xA004, ///No OpenAL memory left. OutOfMemory = 0xA005, } ///A list of valid string AL.Get() parameters public enum ALGetString : int { /// Gets the Vendor name. Vendor = 0xB001, /// Gets the driver version. Version = 0xB002, /// Gets the renderer mode. Renderer = 0xB003, /// Gets a list of all available Extensions, separated with spaces. Extensions = 0xB004, } ///A list of valid 32-Bits Float AL.Get() parameters public enum ALGetFloat : int { ///Doppler scale. Default 1.0f DopplerFactor = 0xC000, ///Tweaks speed of propagation. This functionality is deprecated. DopplerVelocity = 0xC001, ///Speed of Sound in units per second. Default: 343.3f SpeedOfSound = 0xC003, } ///A list of valid Int32 AL.Get() parameters public enum ALGetInteger : int { ///See enum ALDistanceModel. DistanceModel = 0xD000, } /// Used by AL.DistanceModel(), the distance model can be retrieved by AL.Get() with ALGetInteger.DistanceModel public enum ALDistanceModel : int { ///Bypasses all distance attenuation calculation for all Sources. None = 0, ///InverseDistance is equivalent to the IASIG I3DL2 model with the exception that ALSourcef.ReferenceDistance does not imply any clamping. InverseDistance = 0xD001, ///InverseDistanceClamped is the IASIG I3DL2 model, with ALSourcef.ReferenceDistance indicating both the reference distance and the distance below which gain will be clamped. InverseDistanceClamped = 0xD002, ///AL_EXT_LINEAR_DISTANCE extension. LinearDistance = 0xD003, ///AL_EXT_LINEAR_DISTANCE extension. LinearDistanceClamped = 0xD004, ///AL_EXT_EXPONENT_DISTANCE extension. ExponentDistance = 0xD005, ///AL_EXT_EXPONENT_DISTANCE extension. ExponentDistanceClamped = 0xD006, } }