diff options
author | Chris Robinson <[email protected]> | 2023-03-15 03:10:44 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-03-15 03:10:44 -0700 |
commit | a4b1986556f5c21f77b58b619312fcb7d5435e97 (patch) | |
tree | 47ee65e4a3ee0f3b2fc1ddd6766ce99e8c11ba48 /alc/backends | |
parent | 24685b51df3199968cb9b29b88ccd3137a6ca44c (diff) |
Recognize I24 and I32 formats from Oboe
Diffstat (limited to 'alc/backends')
-rw-r--r-- | alc/backends/oboe.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/alc/backends/oboe.cpp b/alc/backends/oboe.cpp index 68f7205b..461f5a6a 100644 --- a/alc/backends/oboe.cpp +++ b/alc/backends/oboe.cpp @@ -107,6 +107,10 @@ bool OboePlayback::reset() break; case DevFmtInt: case DevFmtUInt: +#if OBOE_VERSION_MAJOR > 1 || (OBOE_VERSION_MAJOR == 1 && OBOE_VERSION_MINOR >= 6) + format = oboe::AudioFormat::I32; + break; +#endif case DevFmtFloat: format = oboe::AudioFormat::Float; break; @@ -155,6 +159,12 @@ bool OboePlayback::reset() case oboe::AudioFormat::Float: mDevice->FmtType = DevFmtFloat; break; +#if OBOE_VERSION_MAJOR > 1 || (OBOE_VERSION_MAJOR == 1 && OBOE_VERSION_MINOR >= 6) + case oboe::AudioFormat::I32: + mDevice->FmtType = DevFmtInt; + break; + case oboe::AudioFormat::I24: +#endif case oboe::AudioFormat::Unspecified: case oboe::AudioFormat::Invalid: throw al::backend_exception{al::backend_error::DeviceError, @@ -266,10 +276,14 @@ void OboeCapture::open(const char *name) case DevFmtFloat: builder.setFormat(oboe::AudioFormat::Float); break; + case DevFmtInt: +#if OBOE_VERSION_MAJOR > 1 || (OBOE_VERSION_MAJOR == 1 && OBOE_VERSION_MINOR >= 6) + builder.setFormat(oboe::AudioFormat::I32); + break; +#endif case DevFmtByte: case DevFmtUByte: case DevFmtUShort: - case DevFmtInt: case DevFmtUInt: throw al::backend_exception{al::backend_error::DeviceError, "%s capture samples not supported", DevFmtTypeString(mDevice->FmtType)}; |