Convert EAX 1.0 parameters to OpenAL EFX EAX parameters?

Started by
2 comments, last by Melekor 13 years, 9 months ago
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
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.
Here's some code that might help:
http://code.google.com/p/jmonkeyengine/source/browse/branches/jme3/src/core/com/jme3/audio/Environment.java

Look at the constructor that takes a float array, those are for an EAX preset. There are descriptions for every entry in the float array and how the conversion is done to EFX.
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.

This topic is closed to new replies.

Advertisement