Jump to content
  • Advertisement
Sign in to follow this  
Melekor

Convert EAX 1.0 parameters to OpenAL EFX EAX parameters?

This topic is 2996 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Also, if anyone could suggest a forum or mailinglist where someone might be more likely to know the answer, that would be appreciated too.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!