mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-24 22:05:40 +00:00
OpenALEffects
Ground work, this commit enables reverb zones and opens the slots for other effects to be added later. Tested using the full template. Build your openal dll and your full.exe use one of the environment presets and it will work
This commit is contained in:
parent
0b9ac45747
commit
ef9a9da83f
11 changed files with 1961 additions and 1212 deletions
|
|
@ -36,6 +36,8 @@
|
|||
#else
|
||||
# include <al/al.h>
|
||||
# include <al/alc.h>
|
||||
# include <AL/alext.h>
|
||||
# include <AL/efx-presets.h>
|
||||
#endif
|
||||
|
||||
#ifndef ALAPIENTRY
|
||||
|
|
@ -134,6 +136,31 @@ typedef void * (ALCAPIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, con
|
|||
typedef ALCenum (ALCAPIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname );
|
||||
typedef const ALCchar* (ALCAPIENTRY *LPALCGETSTRING)( ALCdevice *device, ALCenum param );
|
||||
typedef void (ALCAPIENTRY *LPALCGETINTEGERV)( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest );
|
||||
///Changes for effects
|
||||
typedef void (ALAPIENTRY *LPALGENEFFECTS)(ALsizei n, ALuint *effects);
|
||||
typedef void (ALAPIENTRY *LPALDELETEEFFECTS)(ALsizei n, const ALuint *effects);
|
||||
typedef ALboolean (ALAPIENTRY *LPALISEFFECT)(ALuint effect);
|
||||
typedef void (ALAPIENTRY *LPALEFFECTI)(ALuint effect, ALenum param, ALint value);
|
||||
typedef void (ALAPIENTRY *LPALEFFECTIV)(ALuint effect, ALenum param, const ALint *values);
|
||||
typedef void (ALAPIENTRY *LPALEFFECTF)(ALuint effect, ALenum param, ALfloat value);
|
||||
typedef void (ALAPIENTRY *LPALEFFECTFV)(ALuint effect, ALenum param, const ALfloat *values);
|
||||
typedef void (ALAPIENTRY *LPALGETEFFECTI)(ALuint effect, ALenum param, ALint *value);
|
||||
typedef void (ALAPIENTRY *LPALGETEFFECTIV)(ALuint effect, ALenum param, ALint *values);
|
||||
typedef void (ALAPIENTRY *LPALGETEFFECTF)(ALuint effect, ALenum param, ALfloat *value);
|
||||
typedef void (ALAPIENTRY *LPALGETEFFECTFV)(ALuint effect, ALenum param, ALfloat *values);
|
||||
typedef void (ALAPIENTRY *LPALRELEASEALEFFECTS)(ALCdevice *device);
|
||||
typedef void (ALAPIENTRY *LPALGENAUXILIARYEFFECTSLOTS)(ALsizei n, ALuint *effectslots);
|
||||
typedef void (ALAPIENTRY *LPALDELETEAUXILIARYEFFECTSLOTS)(ALsizei n, const ALuint *effectslots);
|
||||
typedef ALboolean (ALAPIENTRY *LPALISAUXILIARYEFFECTSLOT)(ALuint effectslot);
|
||||
typedef void (ALAPIENTRY *LPALAUXILIARYEFFECTSLOTI)(ALuint effectslot, ALenum param, ALint value);
|
||||
typedef void (ALAPIENTRY *LPALAUXILIARYEFFECTSLOTIV)(ALuint effectslot, ALenum param, const ALint *values);
|
||||
typedef void (ALAPIENTRY *LPALAUXILIARYEFFECTSLOTF)(ALuint effectslot, ALenum param, ALfloat value);
|
||||
typedef void (ALAPIENTRY *LPALAUXILIARYEFFECTSLOTFV)(ALuint effectslot, ALenum param, const ALfloat *values);
|
||||
typedef void (ALAPIENTRY *LPALGETAUXILIARYEFFECTSLOTI)(ALuint effectslot, ALenum param, ALint *value);
|
||||
typedef void (ALAPIENTRY *LPALGETAUXILIARYEFFECTSLOTIV)(ALuint effectslot, ALenum param, ALint *values);
|
||||
typedef void (ALAPIENTRY *LPALGETAUXILIARYEFFECTSLOTF)(ALuint effectslot, ALenum param, ALfloat *value);
|
||||
typedef void (ALAPIENTRY *LPALGETAUXILIARYEFFECTSLOTFV)(ALuint effectslot, ALenum param, ALfloat *values);
|
||||
typedef void (ALAPIENTRY *LPALSOURCE3I)(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
@ -166,6 +193,7 @@ typedef struct
|
|||
LPALISSOURCE alIsSource;
|
||||
LPALSOURCEI alSourcei;
|
||||
LPALSOURCEF alSourcef;
|
||||
LPALSOURCE3I alSource3i;
|
||||
LPALSOURCE3F alSource3f;
|
||||
LPALSOURCEFV alSourcefv;
|
||||
LPALGETSOURCEI alGetSourcei;
|
||||
|
|
@ -203,6 +231,29 @@ typedef struct
|
|||
LPALCISEXTENSIONPRESENT alcIsExtensionPresent;
|
||||
LPALCGETPROCADDRESS alcGetProcAddress;
|
||||
LPALCGETENUMVALUE alcGetEnumValue;
|
||||
LPALGENEFFECTS alGenEffects;
|
||||
LPALDELETEEFFECTS alDeleteEffects;
|
||||
LPALISEFFECT alIsEffect;
|
||||
LPALEFFECTI alEffecti;
|
||||
LPALEFFECTIV alEffectiv;
|
||||
LPALEFFECTF alEffectf;
|
||||
LPALEFFECTFV alEffectfv;
|
||||
LPALGETEFFECTI alGetEffecti;
|
||||
LPALGETEFFECTIV alGetEffectiv;
|
||||
LPALGETEFFECTF alGetEffectf;
|
||||
LPALGETEFFECTFV alGetEffectfv;
|
||||
LPALRELEASEALEFFECTS alReleaseEffects;
|
||||
LPALGENAUXILIARYEFFECTSLOTS alGenAuxiliaryEffectSlots;
|
||||
LPALDELETEAUXILIARYEFFECTSLOTS alDeleteAuxiliaryEffectSlots;
|
||||
LPALISAUXILIARYEFFECTSLOT alIsAuxiliaryEffectSlot;
|
||||
LPALAUXILIARYEFFECTSLOTI alAuxiliaryEffectSloti;
|
||||
LPALAUXILIARYEFFECTSLOTIV alAuxiliaryEffectSlotiv;
|
||||
LPALAUXILIARYEFFECTSLOTF alAuxiliaryEffectSlotf;
|
||||
LPALAUXILIARYEFFECTSLOTFV alAuxiliaryEffectSlotfv;
|
||||
LPALGETAUXILIARYEFFECTSLOTI alGetAuxiliaryEffectSloti;
|
||||
LPALGETAUXILIARYEFFECTSLOTIV alGetAuxiliaryEffectSlotiv;
|
||||
LPALGETAUXILIARYEFFECTSLOTF alGetAuxiliaryEffectSlotf;
|
||||
LPALGETAUXILIARYEFFECTSLOTFV alGetAuxiliaryEffectSlotfv;
|
||||
} OPENALFNTABLE, *LPOPENALFNTABLE;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -42,16 +42,21 @@ SFXALDevice::SFXALDevice( SFXProvider *provider,
|
|||
|
||||
// TODO: The OpenAL device doesn't set the primary buffer
|
||||
// $pref::SFX::frequency or $pref::SFX::bitrate!
|
||||
//check auxiliary device sends 4 and add them to the device
|
||||
ALint attribs[4] = { 0 };
|
||||
ALCint iSends = 0;
|
||||
attribs[0] = ALC_MAX_AUXILIARY_SENDS;
|
||||
attribs[1] = 4;
|
||||
|
||||
mDevice = mOpenAL.alcOpenDevice( name );
|
||||
mOpenAL.alcGetError( mDevice );
|
||||
if( mDevice )
|
||||
{
|
||||
mContext = mOpenAL.alcCreateContext( mDevice, NULL );
|
||||
mContext = mOpenAL.alcCreateContext( mDevice, attribs );
|
||||
|
||||
if( mContext )
|
||||
mOpenAL.alcMakeContextCurrent( mContext );
|
||||
|
||||
mOpenAL.alcGetIntegerv(mDevice, ALC_MAX_AUXILIARY_SENDS, 1, &iSends);
|
||||
U32 err = mOpenAL.alcGetError( mDevice );
|
||||
|
||||
if( err != ALC_NO_ERROR )
|
||||
|
|
@ -78,7 +83,10 @@ SFXALDevice::SFXALDevice( SFXProvider *provider,
|
|||
SFXALDevice::~SFXALDevice()
|
||||
{
|
||||
_releaseAllResources();
|
||||
|
||||
///cleanup our effects
|
||||
mOpenAL.alDeleteAuxiliaryEffectSlots(4, effectSlot);
|
||||
mOpenAL.alDeleteEffects(2, effect);
|
||||
///cleanup of effects ends
|
||||
mOpenAL.alcMakeContextCurrent( NULL );
|
||||
mOpenAL.alcDestroyContext( mContext );
|
||||
mOpenAL.alcCloseDevice( mDevice );
|
||||
|
|
@ -145,6 +153,9 @@ void SFXALDevice::setListener( U32 index, const SFXListenerProperties& listener
|
|||
mOpenAL.alListenerfv( AL_POSITION, pos );
|
||||
mOpenAL.alListenerfv( AL_VELOCITY, velocity );
|
||||
mOpenAL.alListenerfv( AL_ORIENTATION, (const F32 *)&tupple[0] );
|
||||
///Pass a unit size to openal, 1.0 assumes 1 meter to 1 game unit.
|
||||
///Crucial for air absorbtion calculations.
|
||||
mOpenAL.alListenerf(AL_METERS_PER_UNIT, 1.0f);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -164,7 +175,13 @@ void SFXALDevice::setDistanceModel( SFXDistanceModel model )
|
|||
if( mUserRolloffFactor != mRolloffFactor )
|
||||
_setRolloffFactor( mUserRolloffFactor );
|
||||
break;
|
||||
|
||||
/// create a case for our exponential distance model
|
||||
case SFXDistanceModelExponent:
|
||||
mOpenAL.alDistanceModel(AL_EXPONENT_DISTANCE_CLAMPED);
|
||||
if (mUserRolloffFactor != mRolloffFactor)
|
||||
_setRolloffFactor(mUserRolloffFactor);
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertWarn( false, "SFXALDevice::setDistanceModel - distance model not implemented" );
|
||||
}
|
||||
|
|
@ -200,3 +217,109 @@ void SFXALDevice::setRolloffFactor( F32 factor )
|
|||
|
||||
mUserRolloffFactor = factor;
|
||||
}
|
||||
|
||||
void SFXALDevice::openSlots()
|
||||
{
|
||||
for (uLoop = 0; uLoop < 4; uLoop++)
|
||||
{
|
||||
mOpenAL.alGenAuxiliaryEffectSlots(1, &effectSlot[uLoop]);
|
||||
}
|
||||
|
||||
for (uLoop = 0; uLoop < 2; uLoop++)
|
||||
{
|
||||
mOpenAL.alGenEffects(1, &effect[uLoop]);
|
||||
}
|
||||
///debug string output so we know our slots are open
|
||||
Platform::outputDebugString("Slots Open");
|
||||
}
|
||||
|
||||
///create reverb effect
|
||||
void SFXALDevice::setReverb(const SFXReverbProperties& reverb)
|
||||
{
|
||||
///output a debug string so we know each time the reverb changes
|
||||
Platform::outputDebugString("Updated");
|
||||
|
||||
///load an efxeaxreverb default and add our values from
|
||||
///sfxreverbproperties to it
|
||||
EFXEAXREVERBPROPERTIES prop = EFX_REVERB_PRESET_GENERIC;
|
||||
|
||||
prop.flDensity = reverb.flDensity;
|
||||
prop.flDiffusion = reverb.flDiffusion;
|
||||
prop.flGain = reverb.flGain;
|
||||
prop.flGainHF = reverb.flGainHF;
|
||||
prop.flGainLF = reverb.flGainLF;
|
||||
prop.flDecayTime = reverb.flDecayTime;
|
||||
prop.flDecayHFRatio = reverb.flDecayHFRatio;
|
||||
prop.flDecayLFRatio = reverb.flDecayLFRatio;
|
||||
prop.flReflectionsGain = reverb.flReflectionsGain;
|
||||
prop.flReflectionsDelay = reverb.flReflectionsDelay;
|
||||
prop.flLateReverbGain = reverb.flLateReverbGain;
|
||||
prop.flLateReverbDelay = reverb.flLateReverbDelay;
|
||||
prop.flEchoTime = reverb.flEchoTime;
|
||||
prop.flEchoDepth = reverb.flEchoDepth;
|
||||
prop.flModulationTime = reverb.flModulationTime;
|
||||
prop.flModulationDepth = reverb.flModulationDepth;
|
||||
prop.flAirAbsorptionGainHF = reverb.flAirAbsorptionGainHF;
|
||||
prop.flHFReference = reverb.flHFReference;
|
||||
prop.flLFReference = reverb.flLFReference;
|
||||
prop.flRoomRolloffFactor = reverb.flRoomRolloffFactor;
|
||||
prop.iDecayHFLimit = reverb.iDecayHFLimit;
|
||||
|
||||
if (mOpenAL.alGetEnumValue("AL_EFFECT_EAXREVERB") != 0)
|
||||
{
|
||||
|
||||
/// EAX Reverb is available. Set the EAX effect type
|
||||
|
||||
mOpenAL.alEffecti(effect[0], AL_EFFECT_TYPE, AL_EFFECT_EAXREVERB);
|
||||
|
||||
///add our values to the setup of the reverb
|
||||
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_DENSITY, prop.flDensity);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_DIFFUSION, prop.flDiffusion);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_GAIN, prop.flGain);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_GAINHF, prop.flGainHF);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_GAINLF, prop.flGainLF);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_DECAY_TIME, prop.flDecayTime);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_DECAY_HFRATIO, prop.flDecayHFRatio);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_DECAY_LFRATIO, prop.flDecayLFRatio);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_REFLECTIONS_GAIN, prop.flReflectionsGain);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_REFLECTIONS_DELAY, prop.flReflectionsDelay);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_LATE_REVERB_GAIN, prop.flLateReverbGain);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_LATE_REVERB_DELAY, prop.flLateReverbDelay);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_ECHO_TIME, prop.flEchoTime);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_ECHO_DEPTH, prop.flEchoDepth);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_MODULATION_TIME, prop.flModulationTime);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_MODULATION_DEPTH, prop.flModulationDepth);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_AIR_ABSORPTION_GAINHF, prop.flAirAbsorptionGainHF);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_HFREFERENCE, prop.flHFReference);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_LFREFERENCE, prop.flLFReference);
|
||||
mOpenAL.alEffectf(effect[0], AL_EAXREVERB_ROOM_ROLLOFF_FACTOR, prop.flRoomRolloffFactor);
|
||||
mOpenAL.alEffecti(effect[0], AL_EAXREVERB_DECAY_HFLIMIT, prop.iDecayHFLimit);
|
||||
mOpenAL.alAuxiliaryEffectSloti(1, AL_EFFECTSLOT_EFFECT, effect[0]);
|
||||
Platform::outputDebugString("eax reverb properties set");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
/// No EAX Reverb. Set the standard reverb effect
|
||||
mOpenAL.alEffecti(effect[0], AL_EFFECT_TYPE, AL_EFFECT_REVERB);
|
||||
|
||||
mOpenAL.alEffectf(effect[0], AL_REVERB_DENSITY, prop.flDensity);
|
||||
mOpenAL.alEffectf(effect[0], AL_REVERB_DIFFUSION, prop.flDiffusion);
|
||||
mOpenAL.alEffectf(effect[0], AL_REVERB_GAIN, prop.flGain);
|
||||
mOpenAL.alEffectf(effect[0], AL_REVERB_GAINHF, prop.flGainHF);
|
||||
mOpenAL.alEffectf(effect[0], AL_REVERB_DECAY_TIME, prop.flDecayTime);
|
||||
mOpenAL.alEffectf(effect[0], AL_REVERB_DECAY_HFRATIO, prop.flDecayHFRatio);
|
||||
mOpenAL.alEffectf(effect[0], AL_REVERB_REFLECTIONS_GAIN, prop.flReflectionsGain);
|
||||
mOpenAL.alEffectf(effect[0], AL_REVERB_REFLECTIONS_DELAY, prop.flReflectionsDelay);
|
||||
mOpenAL.alEffectf(effect[0], AL_REVERB_LATE_REVERB_GAIN, prop.flLateReverbGain);
|
||||
mOpenAL.alEffectf(effect[0], AL_REVERB_LATE_REVERB_DELAY, prop.flLateReverbDelay);
|
||||
mOpenAL.alEffectf(effect[0], AL_REVERB_AIR_ABSORPTION_GAINHF, prop.flAirAbsorptionGainHF);
|
||||
mOpenAL.alEffectf(effect[0], AL_REVERB_ROOM_ROLLOFF_FACTOR, prop.flRoomRolloffFactor);
|
||||
mOpenAL.alEffecti(effect[0], AL_REVERB_DECAY_HFLIMIT, prop.iDecayHFLimit);
|
||||
mOpenAL.alAuxiliaryEffectSloti(1, AL_EFFECTSLOT_EFFECT, effect[0]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -85,6 +85,15 @@ class SFXALDevice : public SFXDevice
|
|||
virtual void setDistanceModel( SFXDistanceModel model );
|
||||
virtual void setDopplerFactor( F32 factor );
|
||||
virtual void setRolloffFactor( F32 factor );
|
||||
//function for openAL to open slots
|
||||
virtual void openSlots();
|
||||
//slots
|
||||
ALuint effectSlot[4] = { 0 };
|
||||
ALuint effect[2] = { 0 };
|
||||
ALuint uLoop;
|
||||
//get values from sfxreverbproperties and pass it to openal device
|
||||
virtual void setReverb(const SFXReverbProperties& reverb);
|
||||
virtual void resetReverb() {}
|
||||
};
|
||||
|
||||
#endif // _SFXALDEVICE_H_
|
||||
|
|
@ -118,7 +118,8 @@ void SFXALVoice::_play()
|
|||
#ifdef DEBUG_SPEW
|
||||
Platform::outputDebugString( "[SFXALVoice] Starting playback" );
|
||||
#endif
|
||||
|
||||
//send every voice that plays to the alauxiliary slot that has the reverb
|
||||
mOpenAL.alSource3i(mSourceName, AL_AUXILIARY_SEND_FILTER, 1, 0, AL_FILTER_NULL);
|
||||
mOpenAL.alSourcePlay( mSourceName );
|
||||
|
||||
//WORKAROUND: Adjust play cursor for buggy OAL when resuming playback. Do this after alSourcePlay
|
||||
|
|
|
|||
|
|
@ -439,7 +439,118 @@ ALboolean LoadOAL10Library(char *szOALFullPathName, LPOPENALFNTABLE lpOALFnTable
|
|||
OutputDebugStringA("Failed to retrieve 'alcGetEnumValue' function address\n");
|
||||
return AL_FALSE;
|
||||
}
|
||||
lpOALFnTable->alGenEffects = (LPALGENEFFECTS)GetProcAddress(g_hOpenALDLL, "alGenEffects");
|
||||
if (lpOALFnTable->alGenEffects == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alGenEffects' function address\n");
|
||||
}
|
||||
lpOALFnTable->alEffecti = (LPALEFFECTI)GetProcAddress(g_hOpenALDLL, "alEffecti");
|
||||
if (lpOALFnTable->alEffecti == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alEffecti' function address\n");
|
||||
}
|
||||
lpOALFnTable->alEffectiv = (LPALEFFECTIV)GetProcAddress(g_hOpenALDLL, "alEffectiv");
|
||||
if (lpOALFnTable->alEffectiv == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alEffectiv' function address\n");
|
||||
}
|
||||
lpOALFnTable->alEffectf = (LPALEFFECTF)GetProcAddress(g_hOpenALDLL, "alEffectf");
|
||||
if (lpOALFnTable->alEffectf == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alEffectf' function address\n");
|
||||
}
|
||||
lpOALFnTable->alEffectfv = (LPALEFFECTFV)GetProcAddress(g_hOpenALDLL, "alEffectfv");
|
||||
if (lpOALFnTable->alEffectfv == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alEffectfv' function address\n");
|
||||
}
|
||||
lpOALFnTable->alGetEffecti = (LPALGETEFFECTI)GetProcAddress(g_hOpenALDLL, "alGetEffecti");
|
||||
if (lpOALFnTable->alGetEffecti == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alGetEffecti' function address\n");
|
||||
}
|
||||
lpOALFnTable->alGetEffectiv = (LPALGETEFFECTIV)GetProcAddress(g_hOpenALDLL, "alGetEffectiv");
|
||||
if (lpOALFnTable->alGetEffectiv == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alGetEffectiv' function address\n");
|
||||
}
|
||||
lpOALFnTable->alGetEffectf = (LPALGETEFFECTF)GetProcAddress(g_hOpenALDLL, "alGetEffectf");
|
||||
if (lpOALFnTable->alGetEffectf == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alGetEffectf' function address\n");
|
||||
}
|
||||
lpOALFnTable->alGetEffectfv = (LPALGETEFFECTFV)GetProcAddress(g_hOpenALDLL, "alGetEffectfv");
|
||||
if (lpOALFnTable->alGetEffectfv == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alGetEffectfv' function address\n");
|
||||
}
|
||||
|
||||
lpOALFnTable->alDeleteEffects = (LPALDELETEEFFECTS)GetProcAddress(g_hOpenALDLL, "alDeleteEffects");
|
||||
if (lpOALFnTable->alDeleteEffects == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alDeleteEffects' function address\n");
|
||||
}
|
||||
lpOALFnTable->alIsEffect = (LPALISEFFECT)GetProcAddress(g_hOpenALDLL, "alIsEffect");
|
||||
if (lpOALFnTable->alIsEffect == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alIsEffect' function address\n");
|
||||
}
|
||||
lpOALFnTable->alAuxiliaryEffectSlotf = (LPALAUXILIARYEFFECTSLOTF)GetProcAddress(g_hOpenALDLL, "alAuxiliaryEffectSlotf");
|
||||
if (lpOALFnTable->alAuxiliaryEffectSlotf == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alAuxiliaryEffectSlotf' function address\n");
|
||||
}
|
||||
lpOALFnTable->alAuxiliaryEffectSlotfv = (LPALAUXILIARYEFFECTSLOTFV)GetProcAddress(g_hOpenALDLL, "alAuxiliaryEffectSlotfv");
|
||||
if (lpOALFnTable->alAuxiliaryEffectSlotfv == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alAuxiliaryEffectSlotfv' function address\n");
|
||||
}
|
||||
lpOALFnTable->alAuxiliaryEffectSloti = (LPALAUXILIARYEFFECTSLOTI)GetProcAddress(g_hOpenALDLL, "alAuxiliaryEffectSloti");
|
||||
if (lpOALFnTable->alAuxiliaryEffectSloti == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alAuxiliaryEffectSloti' function address\n");
|
||||
}
|
||||
lpOALFnTable->alAuxiliaryEffectSlotiv = (LPALAUXILIARYEFFECTSLOTIV)GetProcAddress(g_hOpenALDLL, "alAuxiliaryEffectSlotiv");
|
||||
if (lpOALFnTable->alAuxiliaryEffectSlotiv == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alAuxiliaryEffectSlotiv' function address\n");
|
||||
}
|
||||
lpOALFnTable->alIsAuxiliaryEffectSlot = (LPALISAUXILIARYEFFECTSLOT)GetProcAddress(g_hOpenALDLL, "alIsAuxiliaryEffectSlot");
|
||||
if (lpOALFnTable->alIsAuxiliaryEffectSlot == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alIsAuxiliaryEffectSlot' function address\n");
|
||||
}
|
||||
lpOALFnTable->alGenAuxiliaryEffectSlots = (LPALGENAUXILIARYEFFECTSLOTS)GetProcAddress(g_hOpenALDLL, "alGenAuxiliaryEffectSlots");
|
||||
if (lpOALFnTable->alGenAuxiliaryEffectSlots == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alGenAuxiliaryEffectSlots' function address\n");
|
||||
}
|
||||
lpOALFnTable->alDeleteAuxiliaryEffectSlots = (LPALDELETEAUXILIARYEFFECTSLOTS)GetProcAddress(g_hOpenALDLL, "alDeleteAuxiliaryEffectSlots");
|
||||
if (lpOALFnTable->alDeleteAuxiliaryEffectSlots == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alDeleteAuxiliaryEffectSlots' function address\n");
|
||||
}
|
||||
lpOALFnTable->alGetAuxiliaryEffectSlotf = (LPALGETAUXILIARYEFFECTSLOTF)GetProcAddress(g_hOpenALDLL, "alGetAuxiliaryEffectSlotf");
|
||||
if (lpOALFnTable->alGetAuxiliaryEffectSlotf == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alGetAuxiliaryEffectSlotf' function address\n");
|
||||
}
|
||||
lpOALFnTable->alGetAuxiliaryEffectSlotfv = (LPALGETAUXILIARYEFFECTSLOTFV)GetProcAddress(g_hOpenALDLL, "alGetAuxiliaryEffectSlotfv");
|
||||
if (lpOALFnTable->alGetAuxiliaryEffectSlotfv == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alGetAuxiliaryEffectSlotfv' function address\n");
|
||||
}
|
||||
lpOALFnTable->alGetAuxiliaryEffectSloti = (LPALGETAUXILIARYEFFECTSLOTI)GetProcAddress(g_hOpenALDLL, "alGetAuxiliaryEffectSloti");
|
||||
if (lpOALFnTable->alGetAuxiliaryEffectSloti == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alGetAuxiliaryEffectSloti' function address\n");
|
||||
}
|
||||
lpOALFnTable->alGetAuxiliaryEffectSlotiv = (LPALGETAUXILIARYEFFECTSLOTIV)GetProcAddress(g_hOpenALDLL, "alGetAuxiliaryEffectSlotiv");
|
||||
if (lpOALFnTable->alGetAuxiliaryEffectSlotiv == NULL)
|
||||
{
|
||||
OutputDebugStringA("Failed to retrieve 'alGetAuxiliaryEffectSlotiv' function address\n");
|
||||
}
|
||||
lpOALFnTable->alSource3i = (LPALSOURCE3I)GetProcAddress(g_hOpenALDLL, "alSource3i");
|
||||
return AL_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue