Make some pointer-to-array parameters const
[openal-soft.git] / Alc / bformatdec.h
blobe78d89a7b476969b34f7ec2c1934dd0e1b6a34ae
1 #ifndef BFORMATDEC_H
2 #define BFORMATDEC_H
4 #include "alMain.h"
6 struct AmbDecConf;
7 struct BFormatDec;
8 struct AmbiUpsampler;
10 enum BFormatDecFlags {
11 BFDF_DistanceComp = 1<<0
14 struct BFormatDec *bformatdec_alloc();
15 void bformatdec_free(struct BFormatDec *dec);
16 int bformatdec_getOrder(const struct BFormatDec *dec);
17 void bformatdec_reset(struct BFormatDec *dec, const struct AmbDecConf *conf, ALuint chancount, ALuint srate, const ALuint chanmap[MAX_OUTPUT_CHANNELS], int flags);
19 /* Decodes the ambisonic input to the given output channels. */
20 void bformatdec_process(struct BFormatDec *dec, ALfloat (*restrict OutBuffer)[BUFFERSIZE], ALuint OutChannels, const ALfloat (*restrict InSamples)[BUFFERSIZE], ALuint SamplesToDo);
22 /* Up-samples a first-order input to the decoder's configuration. */
23 void bformatdec_upSample(struct BFormatDec *dec, ALfloat (*restrict OutBuffer)[BUFFERSIZE], const ALfloat (*restrict InSamples)[BUFFERSIZE], ALuint InChannels, ALuint SamplesToDo);
26 /* Stand-alone first-order upsampler. Kept here because it shares some stuff
27 * with bformatdec.
29 struct AmbiUpsampler *ambiup_alloc();
30 void ambiup_free(struct AmbiUpsampler *ambiup);
31 void ambiup_reset(struct AmbiUpsampler *ambiup, const ALCdevice *device);
33 void ambiup_process(struct AmbiUpsampler *ambiup, ALfloat (*restrict OutBuffer)[BUFFERSIZE], ALuint OutChannels, const ALfloat (*restrict InSamples)[BUFFERSIZE], ALuint SamplesToDo);
36 /* Band splitter. Splits a signal into two phase-matching frequency bands. */
37 typedef struct BandSplitter {
38 ALfloat coeff;
39 ALfloat lp_z1;
40 ALfloat lp_z2;
41 ALfloat hp_z1;
42 } BandSplitter;
44 void bandsplit_init(BandSplitter *splitter, ALfloat freq_mult);
45 void bandsplit_clear(BandSplitter *splitter);
46 void bandsplit_process(BandSplitter *splitter, ALfloat *restrict hpout, ALfloat *restrict lpout,
47 const ALfloat *input, ALuint count);
49 #endif /* BFORMATDEC_H */