diff options
author | Chris Robinson <[email protected]> | 2018-11-03 19:51:23 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-03 19:51:23 -0700 |
commit | 96819237d6317c62959dd25bcd37d17e3fa790e8 (patch) | |
tree | abbe402e7d6cd20803a94b35b843535ee776281d /Alc/ambdec.h | |
parent | 4bfaa173c41076051b63aee85ab20572fdce46c2 (diff) |
Convert ambdec.c to C++
Diffstat (limited to 'Alc/ambdec.h')
-rw-r--r-- | Alc/ambdec.h | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/Alc/ambdec.h b/Alc/ambdec.h index 7776ae11..d6d154fb 100644 --- a/Alc/ambdec.h +++ b/Alc/ambdec.h @@ -1,38 +1,35 @@ #ifndef AMBDEC_H #define AMBDEC_H -#include "alstring.h" -#include "alMain.h" +#include <string> -#ifdef __cplusplus -extern "C" { -#endif +#include "alMain.h" /* Helpers to read .ambdec configuration files. */ -enum AmbDecScaleType { - ADS_N3D, - ADS_SN3D, - ADS_FuMa, +enum class AmbDecScale { + N3D, + SN3D, + FuMa, }; -typedef struct AmbDecConf { - al_string Description; +struct AmbDecConf { + std::string Description; ALuint Version; /* Must be 3 */ ALuint ChanMask; ALuint FreqBands; /* Must be 1 or 2 */ ALsizei NumSpeakers; - enum AmbDecScaleType CoeffScale; + AmbDecScale CoeffScale; ALfloat XOverFreq; ALfloat XOverRatio; struct { - al_string Name; + std::string Name; ALfloat Distance; ALfloat Azimuth; ALfloat Elevation; - al_string Connection; + std::string Connection; } Speakers[MAX_OUTPUT_CHANNELS]; /* Unused when FreqBands == 1 */ @@ -41,14 +38,8 @@ typedef struct AmbDecConf { ALfloat HFOrderGain[MAX_AMBI_ORDER+1]; ALfloat HFMatrix[MAX_OUTPUT_CHANNELS][MAX_AMBI_COEFFS]; -} AmbDecConf; -void ambdec_init(AmbDecConf *conf); -void ambdec_deinit(AmbDecConf *conf); -int ambdec_load(AmbDecConf *conf, const char *fname); - -#ifdef __cplusplus -} // extern "C" -#endif + int load(const char *fname); +}; #endif /* AMBDEC_H */ |