coastline 0.0.4
Loading...
Searching...
No Matches
directionalmatrix.h
Go to the documentation of this file.
1#ifndef COASTLINE_EAR_DIRECTIONALMATRIX_H
2#define COASTLINE_EAR_DIRECTIONALMATRIX_H
3
4#include <stdint.h>
5
6#pragma pack(push, 1)
7
9#define EAR_DIRECTIONAL_MATRIX_ENTRY_COUNT 0x80
10
13#ifdef __cplusplus
21 void SetPresetEntry(int32_t newPan, float newGain) {
22 pan = newPan;
23 gain = newGain;
24 }
25#endif
26 int32_t pan;
27 float gain;
29
30#ifdef __cplusplus
32class EarPresetTable {
33public:
38 EarPresetTable();
39
47 void FillPresetTable(int32_t pan, float gain);
56 void SetPresetTableEntry(uint16_t direction, int32_t pan, float gain);
64 void CopyPresetTableEntry(uint16_t destination, uint16_t source);
71 void SetPresetTableMode(uint16_t newMode) {
72 mode = newMode;
73 }
79 int32_t GetPresetEntryInteger(uint16_t direction) const {
80 return entries[direction].pan;
81 }
87 float GetPresetEntryFloat(uint16_t direction) const {
88 return entries[direction].gain;
89 }
97 void CopyDirectionalMatrixRow(uint16_t direction, EarDirectionalMatrixEntry *entry) const;
98
99private:
101 uint16_t mode;
102};
103
104extern "C" {
105#endif
106
116void __stdcall
117CopyDirectionalMatrixEntry(uint16_t matrix, uint16_t direction, EarDirectionalMatrixEntry *entry);
118
124void __stdcall GrowMatrixRegistry(void);
125
131int __stdcall EarRegisterMatrixExportWrapper(uint32_t flags);
132
141int __stdcall EAR_DLL_RegisterMatrix(uint32_t flags);
142
148int __stdcall EarShutDownMatrixExportWrapper(uint32_t matrix);
149
157int __stdcall EAR_DLL_ShutDownMatrix(uint32_t matrix);
158
166
172
178
184
190
191#ifdef __cplusplus
192}
193#endif
194
195#pragma pack(pop)
196
197#endif /* COASTLINE_EAR_DIRECTIONALMATRIX_H */
int __stdcall EarRegisterMatrixExportWrapper(uint32_t flags)
int __stdcall EAR_DLL_ShutDownMatrix(uint32_t matrix)
Shut down a directional matrix, or every matrix.
void __stdcall GrowMatrixRegistry(void)
Copy the matrices into a larger hash table once the table holds one matrix a bucket.
#define EAR_DIRECTIONAL_MATRIX_ENTRY_COUNT
The number of entries of a directional matrix.
Definition directionalmatrix.h:9
int __stdcall RegisterBuiltinDirectionalMatrix4(void)
int __stdcall RegisterBuiltinDirectionalMatrix1(void)
Register the built-in matrix of one direction as matrix 1.
void __stdcall CopyDirectionalMatrixEntry(uint16_t matrix, uint16_t direction, EarDirectionalMatrixEntry *entry)
Copy the entry of a direction of a matrix, or an empty entry for a direction or a matrix that is not ...
int __stdcall RegisterBuiltinDirectionalMatrix16(void)
int __stdcall EarShutDownMatrixExportWrapper(uint32_t matrix)
struct EarDirectionalMatrixEntry EarDirectionalMatrixEntry
The pan and the gain of one direction of a directional matrix.
int __stdcall RegisterBuiltinDirectionalMatrix32(void)
int __stdcall RegisterBuiltinDirectionalMatrix64(void)
int __stdcall EAR_DLL_RegisterMatrix(uint32_t flags)
Register the built-in matrices the flags select: 0x1, 0x4, 0x10, 0x20, and 0x40 for the matrices of 1...
The pan and the gain of one direction of a directional matrix.
Definition directionalmatrix.h:12
int32_t pan
Definition directionalmatrix.h:26
float gain
Definition directionalmatrix.h:27