62 lines
1.3 KiB
C
Raw Normal View History

2007-11-13 18:02:18 -08:00
#ifndef _AL_LISTENER_H_
#define _AL_LISTENER_H_
2012-09-14 02:42:36 -07:00
#include "alMain.h"
#include "alu.h"
2007-11-13 18:02:18 -08:00
#ifdef __cplusplus
extern "C" {
#endif
struct ALlistenerProps {
ATOMIC(ALfloat) Position[3];
ATOMIC(ALfloat) Velocity[3];
ATOMIC(ALfloat) Forward[3];
ATOMIC(ALfloat) Up[3];
ATOMIC(ALfloat) Gain;
ATOMIC(ALfloat) MetersPerUnit;
ATOMIC(ALfloat) DopplerFactor;
ATOMIC(ALfloat) DopplerVelocity;
ATOMIC(ALfloat) SpeedOfSound;
ATOMIC(struct ALlistenerProps*) next;
};
typedef struct ALlistener {
volatile ALfloat Position[3];
volatile ALfloat Velocity[3];
2011-09-11 01:26:09 -07:00
volatile ALfloat Forward[3];
volatile ALfloat Up[3];
volatile ALfloat Gain;
volatile ALfloat MetersPerUnit;
2012-10-09 06:19:36 -07:00
/* Pointer to the most recent property values that are awaiting an update.
*/
ATOMIC(struct ALlistenerProps*) Update;
/* A linked list of unused property containers, free to use for future
* updates.
*/
ATOMIC(struct ALlistenerProps*) FreeList;
2012-10-09 06:19:36 -07:00
struct {
2016-05-16 18:28:46 -07:00
aluMatrixf Matrix;
aluVector Velocity;
ALfloat Gain;
ALfloat MetersPerUnit;
ALfloat DopplerFactor;
ALfloat SpeedOfSound;
2012-10-09 06:19:36 -07:00
} Params;
2007-11-13 18:02:18 -08:00
} ALlistener;
void UpdateListenerProps(ALCcontext *context);
2007-11-13 18:02:18 -08:00
#ifdef __cplusplus
}
#endif
#endif