openal-soft/Alc/ambdec.h

46 lines
948 B
C
Raw Normal View History

2016-03-14 09:04:03 -07:00
#ifndef AMBDEC_H
#define AMBDEC_H
2018-11-03 19:51:23 -07:00
#include <string>
2016-03-14 09:04:03 -07:00
2018-11-03 19:51:23 -07:00
#include "alMain.h"
2018-11-03 19:02:11 -07:00
2016-03-14 09:04:03 -07:00
/* Helpers to read .ambdec configuration files. */
2018-11-03 19:51:23 -07:00
enum class AmbDecScale {
N3D,
SN3D,
FuMa,
2016-03-14 09:04:03 -07:00
};
2018-11-03 19:51:23 -07:00
struct AmbDecConf {
std::string Description;
2016-03-14 09:04:03 -07:00
ALuint Version; /* Must be 3 */
ALuint ChanMask;
ALuint FreqBands; /* Must be 1 or 2 */
ALsizei NumSpeakers;
2018-11-03 19:51:23 -07:00
AmbDecScale CoeffScale;
2016-03-14 09:04:03 -07:00
ALfloat XOverFreq;
ALfloat XOverRatio;
2018-12-09 22:34:21 -08:00
struct SpeakerConf {
2018-11-03 19:51:23 -07:00
std::string Name;
2016-03-14 09:04:03 -07:00
ALfloat Distance;
ALfloat Azimuth;
ALfloat Elevation;
2018-11-03 19:51:23 -07:00
std::string Connection;
2016-03-14 09:04:03 -07:00
} Speakers[MAX_OUTPUT_CHANNELS];
/* Unused when FreqBands == 1 */
ALfloat LFOrderGain[MAX_AMBI_ORDER+1];
ALfloat LFMatrix[MAX_OUTPUT_CHANNELS][MAX_AMBI_COEFFS];
ALfloat HFOrderGain[MAX_AMBI_ORDER+1];
ALfloat HFMatrix[MAX_OUTPUT_CHANNELS][MAX_AMBI_COEFFS];
int load(const char *fname) noexcept;
2018-11-03 19:51:23 -07:00
};
2018-11-03 19:02:11 -07:00
2016-03-14 09:04:03 -07:00
#endif /* AMBDEC_H */