aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-17 08:49:49 -0800
committerChris Robinson <[email protected]>2018-01-17 08:49:49 -0800
commit884fe40fd1262fe642a86d29f27e157e2b562212 (patch)
treebc41817b5349d69f0fd825a753d41204a52257d7 /OpenAL32/Include
parent3baf9d0e81c16555fc417697a5445b7cd674db02 (diff)
Store mulaw and alaw samples directly in the buffer
They're now decompressed on the fly in the mixer. This is not a significant performance issue given that it only needs a 512-byte lookup table, and the buffer stores half as much data (it may actually be faster, requiring less overall memory).
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alBuffer.h2
-rw-r--r--OpenAL32/Include/sample_cvt.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/OpenAL32/Include/alBuffer.h b/OpenAL32/Include/alBuffer.h
index b13e1231..7653db6a 100644
--- a/OpenAL32/Include/alBuffer.h
+++ b/OpenAL32/Include/alBuffer.h
@@ -47,6 +47,8 @@ enum FmtType {
FmtByte = UserFmtByte,
FmtShort = UserFmtShort,
FmtFloat = UserFmtFloat,
+ FmtMulaw = UserFmtMulaw,
+ FmtAlaw = UserFmtAlaw,
};
enum FmtChannels {
FmtMono = UserFmtMono,
diff --git a/OpenAL32/Include/sample_cvt.h b/OpenAL32/Include/sample_cvt.h
index 12bb1fa6..35ead20c 100644
--- a/OpenAL32/Include/sample_cvt.h
+++ b/OpenAL32/Include/sample_cvt.h
@@ -4,6 +4,9 @@
#include "AL/al.h"
#include "alBuffer.h"
+extern const ALshort muLawDecompressionTable[256];
+extern const ALshort aLawDecompressionTable[256];
+
void ConvertData(ALvoid *dst, enum UserFmtType dstType, const ALvoid *src, enum UserFmtType srcType, ALsizei numchans, ALsizei len, ALsizei align);
#endif /* SAMPLE_CVT_H */