OpenAL WIP.
This commit is contained in:
parent
243e6d8f55
commit
6efffab0c5
1 changed files with 7 additions and 7 deletions
14
src/openal.c
14
src/openal.c
|
@ -20,7 +20,7 @@
|
||||||
#include "stratdef.h"
|
#include "stratdef.h"
|
||||||
|
|
||||||
#if defined( _MSC_VER )
|
#if defined( _MSC_VER )
|
||||||
#include <eax.h>
|
#include <AL/eax.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ACTIVESOUNDSAMPLE ActiveSounds[SOUND_MAXACTIVE];
|
ACTIVESOUNDSAMPLE ActiveSounds[SOUND_MAXACTIVE];
|
||||||
|
@ -50,8 +50,8 @@ static struct {
|
||||||
// EAX1.0
|
// EAX1.0
|
||||||
#define EAX_ENVIRONMENT_DEFAULT EAX_ENVIRONMENT_PLAIN
|
#define EAX_ENVIRONMENT_DEFAULT EAX_ENVIRONMENT_PLAIN
|
||||||
|
|
||||||
ALAPI ALenum ALAPIENTRY (*EAX_pfPropSet)(const GUID *propertySetID,ALuint property,ALuint source,ALvoid *pValue,ALuint size);
|
EAXSet EAX_pfPropSet;
|
||||||
ALAPI ALenum ALAPIENTRY (*EAX_pfPropGet)(const GUID *propertySetID,ALuint property,ALuint source,ALvoid *value,ALuint size);
|
EAXGet EAX_pfPropGet;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* start simplistic riff wave parsing */
|
/* start simplistic riff wave parsing */
|
||||||
|
@ -235,7 +235,7 @@ int PlatStartSoundSys()
|
||||||
EAX_pfPropSet = NULL;
|
EAX_pfPropSet = NULL;
|
||||||
EAX_pfPropGet = NULL;
|
EAX_pfPropGet = NULL;
|
||||||
|
|
||||||
if( alISExtensionPresent( (ALubyte*) "EAX" ) == AL_TRUE ) {
|
if( alIsExtensionPresent( (ALubyte*) "EAX" ) == AL_TRUE ) {
|
||||||
EAX_pfPropSet = alGetProcAddress( (ALubyte*) "EAXSet" );
|
EAX_pfPropSet = alGetProcAddress( (ALubyte*) "EAXSet" );
|
||||||
EAX_pfPropGet = alGetProcAddress( (ALubyte*) "EAXGet" );
|
EAX_pfPropGet = alGetProcAddress( (ALubyte*) "EAXGet" );
|
||||||
}
|
}
|
||||||
|
@ -920,14 +920,14 @@ void PlatSetEnviroment(unsigned int env_index, float reverb_mix)
|
||||||
}
|
}
|
||||||
|
|
||||||
if( EAX_pfPropSet != NULL ) {
|
if( EAX_pfPropSet != NULL ) {
|
||||||
ALulong ulEAXVal = env_index;
|
ALuint ulEAXVal = env_index;
|
||||||
|
|
||||||
EAX_pfPropSet(PROPSETID_EAX_ListenerProperties,
|
EAX_pfPropSet(&DSPROPSETID_EAX20_ListenerProperties,
|
||||||
DSPROPERTY_EAXLISTENER_ENVIRONMENT, 0, &ulEAXVal, sizeof( ulEAXVal ) );
|
DSPROPERTY_EAXLISTENER_ENVIRONMENT, 0, &ulEAXVal, sizeof( ulEAXVal ) );
|
||||||
|
|
||||||
// how to set all parameters:
|
// how to set all parameters:
|
||||||
// EAXLISTENERPROPERTIES mystruct = { ... };
|
// EAXLISTENERPROPERTIES mystruct = { ... };
|
||||||
// EAX_pfPrp[Set(PROPSETID_EAX_ListenerProperites,
|
// EAX_pfPropSet(&DSPROPSETID_EAX_ListenerProperites,
|
||||||
// DSPROPERTY_EAXLISTENER_ALL, 0, &mystruct, sizeof(EAXLISTENERPROPERTIES));
|
// DSPROPERTY_EAXLISTENER_ALL, 0, &mystruct, sizeof(EAXLISTENERPROPERTIES));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue