Skip to main content
GameDev.net gamedev.net
🔒 Locked

Convert EAX 1.0 parameters to OpenAL EFX EAX parameters?

Started by Melekor Jul 7, 2010 at 9:11 PM 2 replies 2.7k views
Original Post
Melekor
Melekor
I have an old game that uses the old EAX 1.0 reverb parameters for DirectSound:

typedef struct {    unsigned long environment;          // 0 to EAX_ENVIRONMENT_COUNT-1    float fVolume;                      // 0 to 1    float fDecayTime_sec;               // seconds, 0.1 to 100    float fDamping;                     // 0 to 1} EAX_REVERBPROPERTIES;


I'm rewriting it with OpenAL's EFX EAX extension and I'd need a method to convert the old parameters into the new ones (see below) so that it sounds the same (or as close as possible).

I can use the "environment" member in the old struct to fill in most of the members in the new struct (using the table of pre-defined environments in OpenAL's EFX-util.h), and I guess fVolume and flGain go together (correct?), as well as fDecayTime_sec and flDecayTime. But fDamping doesn't seem to have an obvious correspondence, and I don't know what most of these parameter names actually mean.

Does anyone know how to do this conversion?

This is the new structure:

typedef struct{	float flDensity;	float flDiffusion;	float flGain;	float flGainHF;	float flGainLF;	float flDecayTime;	float flDecayHFRatio;	float flDecayLFRatio;	float flReflectionsGain;	float flReflectionsDelay;	float flReflectionsPan[3];	float flLateReverbGain;	float flLateReverbDelay;	float flLateReverbPan[3];	float flEchoTime;	float flEchoDepth;	float flModulationTime;	float flModulationDepth;	float flAirAbsorptionGainHF;	float flHFReference;	float flLFReference;	float flRoomRolloffFactor;	int iDecayHFLimit;} EFXEAXREVERBPROPERTIES, *LPEFXEAXREVERBPROPERTIES;



Thanks,

Mel
Melekor
Melekor
Also, if anyone could suggest a forum or mailinglist where someone might be more likely to know the answer, that would be appreciated too.
Melekor
Melekor
Hi Momoko Fan, Thanks for the reply. That code seems to be converting from the newer EAXREVERBPROPERTIES structure (I guess since it is defined as float[28] which matches size, and the code looks right too). I need to convert from the small structure described in the OP.

I did find this: http://icculus.org/~taylor/fso/misc/new-sound-3_6_12.diff, which confirms fVolume<=>flGain and fDecayTime_sec<=>flDecayTime. It also assigns fDamping directly into flDecayHFRatio, but I'm not sure if this is correct because it still sounds a bit different than it does under dsound.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.