aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-02-26 00:43:25 -0800
committerChris Robinson <[email protected]>2023-02-26 01:38:46 -0800
commit0b700286bd33abca9526d30496745d7a52cbeb1a (patch)
tree070bc3dc215021c42b40c88e8ff9f22a90e30adc /alc
parent097fac398470d15e9761a6441df5d47fa9a1ddfb (diff)
Add formats for UHJ with muLaw, and ADPCM for 2-channel UHJ
ADPCM doesn't seem to be well defined for more than two channels, even though there doesn't seem to be any issue with simply increasing the channel step over interleaved data (ffmpeg refuses to create IMA4 or MSADPCM files with more than two channels, and its decoder behaves oddly different when channels > 2). So IMA4 and MSADPCM can only safely handle 2-channel UHJ. There's no problem with muLaw supporting 2-, 3-, or 4-channel UHJ though.
Diffstat (limited to 'alc')
-rw-r--r--alc/inprogext.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/alc/inprogext.h b/alc/inprogext.h
index 5dfc22cb..284af05e 100644
--- a/alc/inprogext.h
+++ b/alc/inprogext.h
@@ -64,11 +64,21 @@ void AL_APIENTRY alSourcePlayAtTimevSOFT(ALsizei n, const ALuint *sources, ALint
#endif
#endif
+#ifndef AL_SOFT_UHJ_ex
+#define AL_SOFT_UHJ_ex
+#define AL_FORMAT_UHJ2CHN_MULAW_SOFT 0x19B3
+#define AL_FORMAT_UHJ2CHN_IMA4_SOFT 0x19B4
+#define AL_FORMAT_UHJ2CHN_MSADPCM_SOFT 0x19B5
+#define AL_FORMAT_UHJ3CHN_MULAW_SOFT 0x19B6
+#define AL_FORMAT_UHJ4CHN_MULAW_SOFT 0x19B7
+#endif
+
+
/* Non-standard export. Not part of any extension. */
AL_API const ALchar* AL_APIENTRY alsoft_get_version(void);
-/* Functions from abandoned extenions. Only here for binary compatibility. */
+/* Functions from abandoned extensions. Only here for binary compatibility. */
AL_API void AL_APIENTRY alSourceQueueBufferLayersSOFT(ALuint src, ALsizei nb,
const ALuint *buffers);