68 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 ALcontextProps {
ALfloat DopplerFactor;
ALfloat DopplerVelocity;
ALfloat SpeedOfSound;
ALboolean SourceDistanceModel;
enum DistanceModel DistanceModel;
ALfloat MetersPerUnit;
ATOMIC(struct ALcontextProps*) next;
};
struct ALlistenerProps {
2017-03-08 03:38:28 -08:00
ALfloat Position[3];
ALfloat Velocity[3];
ALfloat Forward[3];
ALfloat Up[3];
ALfloat Gain;
ATOMIC(struct ALlistenerProps*) next;
};
typedef struct ALlistener {
alignas(16) ALfloat Position[3];
2017-03-08 03:38:28 -08:00
ALfloat Velocity[3];
ALfloat Forward[3];
ALfloat Up[3];
ALfloat Gain;
2012-10-09 06:19:36 -07:00
ATOMIC_FLAG PropsClean;
/* Pointer to the most recent property values that are awaiting an update.
*/
ATOMIC(struct ALlistenerProps*) Update;
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; /* in units per sec! */
ALfloat ReverbSpeedOfSound; /* in meters per sec! */
ALboolean SourceDistanceModel;
enum DistanceModel DistanceModel;
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