aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alu.h
blob: ac33de27e7e241407dcab172962b85c9b2b70315 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef ALU_H
#define ALU_H

#include <array>
#include <cmath>
#include <cstddef>
#include <string>
#include <type_traits>

#include "aloptional.h"
#include "alspan.h"
#include "core/ambidefs.h"
#include "core/bufferline.h"
#include "core/devformat.h"

struct ALCcontext;
struct ALCdevice;
struct EffectSlot;
struct MixParams;


#define MAX_SENDS  6


constexpr float GainMixMax{1000.0f}; /* +60dB */

constexpr float SpeedOfSoundMetersPerSec{343.3f};
constexpr float AirAbsorbGainHF{0.99426f}; /* -0.05dB */


enum HrtfRequestMode {
    Hrtf_Default = 0,
    Hrtf_Enable = 1,
    Hrtf_Disable = 2,
};

void aluInit(void);

void aluInitMixer(al::optional<std::string> resampler);

/* aluInitRenderer
 *
 * Set up the appropriate panning method and mixing method given the device
 * properties.
 */
void aluInitRenderer(ALCdevice *device, int hrtf_id, HrtfRequestMode hrtf_appreq,
    HrtfRequestMode hrtf_userreq);

void aluInitEffectPanning(EffectSlot *slot, ALCcontext *context);


extern const float ConeScale;
extern const float ZScale;

#endif