Import icculus.org release (2014-12-25)
This commit is contained in:
parent
819e239f23
commit
22475d6d94
57 changed files with 3039 additions and 374 deletions
15
src/openal.c
15
src/openal.c
|
@ -3,8 +3,8 @@
|
|||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
#include "al.h"
|
||||
#include "alc.h"
|
||||
|
||||
#include "fixer.h"
|
||||
|
||||
|
@ -23,6 +23,10 @@
|
|||
#include <AL/eax.h>
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#define OPENAL_DEBUG
|
||||
#endif
|
||||
|
||||
ACTIVESOUNDSAMPLE ActiveSounds[SOUND_MAXACTIVE];
|
||||
ACTIVESOUNDSAMPLE BlankActiveSound = {SID_NOSOUND,ASP_Minimum,0,0,NULL,0,0,0,0,0, { {0,0,0},{0,0,0},0,0 }, 0, 0, { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 }, NULL, NULL, NULL};
|
||||
SOUNDSAMPLEDATA BlankGameSound = {0,0,0,0,0,NULL,0,0,NULL,0};
|
||||
|
@ -563,6 +567,7 @@ int PlatPlaySound(int activeIndex)
|
|||
|
||||
if (ActiveSounds[activeIndex].threedee) {
|
||||
alSourcei(ActiveSounds[activeIndex].ds3DBufferP, AL_SOURCE_RELATIVE, AL_FALSE);
|
||||
alSourcef(ActiveSounds[activeIndex].ds3DBufferP, AL_REFERENCE_DISTANCE, ActiveSounds[activeIndex].threedeedata.inner_range);
|
||||
|
||||
// TODO: min distance ActiveSounds[activeIndex].threedeedata.inner_range?
|
||||
// TODO: max distance DS3D_DEFAULTMAXDISTANCE?
|
||||
|
@ -865,7 +870,9 @@ void PlatUpdatePlayer()
|
|||
or[5] = -(float) ((Global_VDB_Ptr->VDB_Mat.mat32) / 65536.0F);
|
||||
}
|
||||
|
||||
if ((AvP.PlayerType == I_Alien && DopplerShiftIsOn && NormalFrameTime)) {
|
||||
#warning VELOCITY AND/OR OPENAL SETUP IS IN WRONG UNITS
|
||||
static int useVel = 0;
|
||||
if (useVel!=0&&(AvP.PlayerType == I_Alien && DopplerShiftIsOn && NormalFrameTime)) {
|
||||
DYNAMICSBLOCK *dynPtr = Player->ObStrategyBlock->DynPtr;
|
||||
float invFrameTime = 100000.0f/(float)NormalFrameTime;
|
||||
|
||||
|
@ -883,7 +890,7 @@ void PlatUpdatePlayer()
|
|||
pos[2] = Global_VDB_Ptr->VDB_World.vz; // 10000.0;
|
||||
|
||||
#ifdef OPENAL_DEBUG
|
||||
fprintf(stderr, "OPENAL: Player: (%f, %f, %f) (%f, %f, %f %f, %f, %f)\n", pos[0], pos[1], pos[2], or[0], or[1], or[2], or[3], or[4], or[5]);
|
||||
fprintf(stderr, "OPENAL: Player: (%f, %f, %f) (%f, %f, %f %f, %f, %f) (%f, %f, %f)\n", pos[0], pos[1], pos[2], or[0], or[1], or[2], or[3], or[4], or[5], vel[0], vel[1], vel[2]);
|
||||
#endif
|
||||
|
||||
pos[0] = 0.0f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue