aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-05-26 14:45:53 -0700
committerChris Robinson <[email protected]>2019-05-26 14:45:53 -0700
commit01f717ae59f6fa34cbc6b28af58beb7b68d2b500 (patch)
tree407b439e50f6d4dddbc8844ed30064cf704e7d88 /Alc
parent20e3c78aef6b745d656fa1a28f4a95c98aac6928 (diff)
Use SL_ANDROID_DATAFORMAT_PCM_EX for extended PCM info
Diffstat (limited to 'Alc')
-rw-r--r--Alc/backends/opensl.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/Alc/backends/opensl.cpp b/Alc/backends/opensl.cpp
index 818b381b..2072f99c 100644
--- a/Alc/backends/opensl.cpp
+++ b/Alc/backends/opensl.cpp
@@ -80,7 +80,7 @@ SLuint32 GetChannelMask(DevFmtChannels chans)
return 0;
}
-#ifdef SL_DATAFORMAT_PCM_EX
+#ifdef SL_ANDROID_DATAFORMAT_PCM_EX
SLuint32 GetTypeRepresentation(DevFmtType type)
{
switch(type)
@@ -88,13 +88,13 @@ SLuint32 GetTypeRepresentation(DevFmtType type)
case DevFmtUByte:
case DevFmtUShort:
case DevFmtUInt:
- return SL_PCM_REPRESENTATION_UNSIGNED_INT;
+ return SL_ANDROID_PCM_REPRESENTATION_UNSIGNED_INT;
case DevFmtByte:
case DevFmtShort:
case DevFmtInt:
- return SL_PCM_REPRESENTATION_SIGNED_INT;
+ return SL_ANDROID_PCM_REPRESENTATION_SIGNED_INT;
case DevFmtFloat:
- return SL_PCM_REPRESENTATION_FLOAT;
+ return SL_ANDROID_PCM_REPRESENTATION_FLOAT;
}
return 0;
}
@@ -440,9 +440,9 @@ ALCboolean OpenSLPlayback::reset()
loc_bufq.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE;
loc_bufq.numBuffers = mDevice->BufferSize / mDevice->UpdateSize;
-#ifdef SL_DATAFORMAT_PCM_EX
- SLDataFormat_PCM_EX format_pcm;
- format_pcm.formatType = SL_DATAFORMAT_PCM_EX;
+#ifdef SL_ANDROID_DATAFORMAT_PCM_EX
+ SLAndroidDataFormat_PCM_EX format_pcm{};
+ format_pcm.formatType = SL_ANDROID_DATAFORMAT_PCM_EX;
format_pcm.numChannels = mDevice->channelsFromFmt();
format_pcm.sampleRate = mDevice->Frequency * 1000;
format_pcm.bitsPerSample = mDevice->bytesFromFmt() * 8;
@@ -452,7 +452,7 @@ ALCboolean OpenSLPlayback::reset()
SL_BYTEORDER_BIGENDIAN;
format_pcm.representation = GetTypeRepresentation(mDevice->FmtType);
#else
- SLDataFormat_PCM format_pcm;
+ SLDataFormat_PCM format_pcm{};
format_pcm.formatType = SL_DATAFORMAT_PCM;
format_pcm.numChannels = mDevice->channelsFromFmt();
format_pcm.samplesPerSec = mDevice->Frequency * 1000;
@@ -721,9 +721,9 @@ ALCenum OpenSLCapture::open(const ALCchar* name)
loc_bq.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE;
loc_bq.numBuffers = mDevice->BufferSize / mDevice->UpdateSize;
-#ifdef SL_DATAFORMAT_PCM_EX
- SLDataFormat_PCM_EX format_pcm{};
- format_pcm.formatType = SL_DATAFORMAT_PCM_EX;
+#ifdef SL_ANDROID_DATAFORMAT_PCM_EX
+ SLAndroidDataFormat_PCM_EX format_pcm{};
+ format_pcm.formatType = SL_ANDROID_DATAFORMAT_PCM_EX;
format_pcm.numChannels = mDevice->channelsFromFmt();
format_pcm.sampleRate = mDevice->Frequency * 1000;
format_pcm.bitsPerSample = mDevice->bytesFromFmt() * 8;