presets semi-working

This commit is contained in:
chrisbrandtner 2008-01-19 01:05:57 +00:00
parent 39f4384931
commit deb8263baf

View file

@ -18,113 +18,142 @@ namespace OpenTK.OpenAL
{ {
public struct EaxReverb public struct EaxReverb
{ {
public uint ulEnvironment; public uint _Environment;
public float flEnvironmentSize; public float _EnvironmentSize;
public float flEnvironmentDiffusion; public float _EnvironmentDiffusion;
public int lRoom; public int _Room;
public int lRoomHF; public int _RoomHF;
public int lRoomLF; public int _RoomLF;
public float flDecayTime; public float DecayTime;
public float flDecayHFRatio; public float DecayHFRatio;
public float flDecayLFRatio; public float DecayLFRatio;
public int lReflections; public int _Reflections;
public float flReflectionsDelay; public float ReflectionsDelay;
public Vector3 vReflectionsPan; public Vector3 ReflectionsPan;
public int lReverb; public int _Reverb;
public float flReverbDelay; public float ReverbDelay;
public Vector3 vReverbPan; public Vector3 ReverbPan;
public float flEchoTime; public float EchoTime;
public float flEchoDepth; public float EchoDepth;
public float flModulationTime; public float ModulationTime;
public float flModulationDepth; public float ModulationDepth;
public float flAirAbsorptionHF; public float AirAbsorptionHF;
public float flHFReference; public float HFReference;
public float flLFReference; public float LFReference;
public float flRoomRolloffFactor; public float RoomRolloffFactor;
public uint ulFlags; public uint _Flags;
public EaxReverb( uint Environment, public EaxReverb( uint environment,
float EnvironmentSize, float environmentSize,
float EnvironmentDiffusion, float environmentDiffusion,
int Room, int room,
int RoomHF, int roomHF,
int RoomLF, int roomLF,
float DecayTime, float decayTime,
float DecayHFRatio, float decayHFRatio,
float DecayLFRatio, float decayLFRatio,
int Reflections, int reflections,
float ReflectionsDelay, float reflectionsDelay,
float ReflectionsPanX, float reflectionsPanX,
float ReflectionsPanY, float reflectionsPanY,
float ReflectionsPanZ, float reflectionsPanZ,
int Reverb, int reverb,
float ReverbDelay, float reverbDelay,
float ReverbPanX, float reverbPanX,
float ReverbPanY, float reverbPanY,
float ReverbPanZ, float reverbPanZ,
float EchoTime, float echoTime,
float EchoDepth, float echoDepth,
float ModulationTime, float modulationTime,
float ModulationDepth, float modulationDepth,
float AirAbsorptionHF, float airAbsorptionHF,
float HFReference, float hfReference,
float LFReference, float lfReference,
float RoomRolloffFactor, float roomRolloffFactor,
uint Flags ) uint flags )
{ {
ulEnvironment = Environment; _Environment = environment;
flEnvironmentSize = EnvironmentSize; _EnvironmentSize = environmentSize;
flEnvironmentDiffusion = EnvironmentDiffusion; _EnvironmentDiffusion = environmentDiffusion;
lRoom = Room; _Room = room;
lRoomHF = RoomHF; _RoomHF = roomHF;
lRoomLF = RoomLF; _RoomLF = roomLF;
flDecayTime = DecayTime; DecayTime = decayTime;
flDecayHFRatio = DecayHFRatio; DecayHFRatio = decayHFRatio;
flDecayLFRatio = DecayLFRatio; DecayLFRatio = decayLFRatio;
lReflections = Reflections; _Reflections = reflections;
flReflectionsDelay = ReflectionsDelay; ReflectionsDelay = reflectionsDelay;
vReflectionsPan = new Vector3(ReflectionsPanX,ReflectionsPanY,ReflectionsPanZ); ReflectionsPan = new Vector3(reflectionsPanX,reflectionsPanY,reflectionsPanZ);
lReverb = Reverb; _Reverb = reverb;
flReverbDelay = ReverbDelay; ReverbDelay = reverbDelay;
vReverbPan = new Vector3(ReverbPanX,ReverbPanY,ReverbPanZ); ReverbPan = new Vector3(reverbPanX,reverbPanY,reverbPanZ);
flEchoTime = EchoTime; EchoTime = echoTime;
flEchoDepth = EchoDepth; EchoDepth = echoDepth;
flModulationTime = ModulationTime; ModulationTime = modulationTime;
flModulationDepth = ModulationDepth; ModulationDepth = modulationDepth;
flAirAbsorptionHF = AirAbsorptionHF; AirAbsorptionHF = airAbsorptionHF;
flHFReference = HFReference; HFReference = hfReference;
flLFReference = LFReference; LFReference = lfReference;
flRoomRolloffFactor = RoomRolloffFactor; RoomRolloffFactor = roomRolloffFactor;
ulFlags = Flags; _Flags = flags;
} }
} }
public static void GetEaxFromEfxEax( ref EaxReverb a,out EfxEaxReverb b )
{
b.AirAbsorptionGainHF = 0.995f; // a.AirAbsorptionHF; // * gain?
b.Density = 1f; // todo
b.Diffusion = 1f; // todo
b.EchoDepth = a.EchoDepth;
b.EchoTime = a.EchoTime;
b.Gain = 1f; // todo
b.GainHF = 1f; // todo
b.GainLF = 1f; // todo
b.HFReference = a.HFReference;
b.LateReverbDelay = a.ReverbDelay;
b.LateReverbGain = 1f; // todo
b.LateReverbPan = a.ReverbPan;
b.LFReference = a.LFReference;
b.ModulationDepth = a.ModulationDepth;
b.ModulationTime = a.ModulationTime;
b.ReflectionsDelay = a.ReflectionsDelay;
b.ReflectionsGain = 1f; // todo
b.ReflectionsPan = a.ReflectionsPan;
b.RoomRolloffFactor = a.RoomRolloffFactor;
b.DecayTime = a.DecayTime;
b.DecayHFLimit = 0; // todo
b.DecayHFRatio = a.DecayHFRatio;
b.DecayLFRatio = a.DecayLFRatio;
}
public struct EfxEaxReverb public struct EfxEaxReverb
{ {
public float flDensity; public float Density;
public float flDiffusion; public float Diffusion;
public float flGain; public float Gain;
public float flGainHF; public float GainHF;
public float flGainLF; public float GainLF;
public float flDecayTime; public float DecayTime;
public float flDecayHFRatio; public float DecayHFRatio;
public float flDecayLFRatio; public float DecayLFRatio;
public float flReflectionsGain; public float ReflectionsGain;
public float flReflectionsDelay; public float ReflectionsDelay;
public Vector3 flReflectionsPan; public Vector3 ReflectionsPan;
public float flLateReverbGain; public float LateReverbGain;
public float flLateReverbDelay; public float LateReverbDelay;
public Vector3 flLateReverbPan; public Vector3 LateReverbPan;
public float flEchoTime; public float EchoTime;
public float flEchoDepth; public float EchoDepth;
public float flModulationTime; public float ModulationTime;
public float flModulationDepth; public float ModulationDepth;
public float flAirAbsorptionGainHF; public float AirAbsorptionGainHF;
public float flHFReference; public float HFReference;
public float flLFReference; public float LFReference;
public float flRoomRolloffFactor; public float RoomRolloffFactor;
public int iDecayHFLimit; public int DecayHFLimit;
} }
/* /*