aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/opensl.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-04-12 18:26:07 -0700
committerChris Robinson <[email protected]>2017-04-12 18:26:07 -0700
commit901804d724d49f316cd2bf51ec1cd2cd9fb9eb91 (patch)
treecb86be080e6db627256d5965548d8a39edb91298 /Alc/backends/opensl.c
parent46046f9caa2f9014d70c0f8553ada6dafa16c1e9 (diff)
Store the ambisonic order separate from the channel enum
Diffstat (limited to 'Alc/backends/opensl.c')
-rw-r--r--Alc/backends/opensl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/Alc/backends/opensl.c b/Alc/backends/opensl.c
index 41f55120..622437b8 100644
--- a/Alc/backends/opensl.c
+++ b/Alc/backends/opensl.c
@@ -65,9 +65,7 @@ static SLuint32 GetChannelMask(enum DevFmtChannels chans)
SL_SPEAKER_FRONT_CENTER|SL_SPEAKER_LOW_FREQUENCY|
SL_SPEAKER_BACK_LEFT|SL_SPEAKER_BACK_RIGHT|
SL_SPEAKER_SIDE_LEFT|SL_SPEAKER_SIDE_RIGHT;
- case DevFmtAmbi1:
- case DevFmtAmbi2:
- case DevFmtAmbi3:
+ case DevFmtAmbi3D:
break;
}
return 0;
@@ -513,7 +511,7 @@ static ALCboolean ALCopenslPlayback_reset(ALCopenslPlayback *self)
device->FmtType = DevFmtShort;
SetDefaultWFXChannelOrder(device);
- self->mFrameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType);
+ self->mFrameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder);
loc_bufq.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE;
@@ -522,7 +520,7 @@ static ALCboolean ALCopenslPlayback_reset(ALCopenslPlayback *self)
#ifdef SL_DATAFORMAT_PCM_EX
SLDataFormat_PCM_EX format_pcm;
format_pcm.formatType = SL_DATAFORMAT_PCM_EX;
- format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans);
+ format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
format_pcm.sampleRate = device->Frequency * 1000;
format_pcm.bitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
format_pcm.containerSize = format_pcm.bitsPerSample;
@@ -533,7 +531,7 @@ static ALCboolean ALCopenslPlayback_reset(ALCopenslPlayback *self)
#else
SLDataFormat_PCM format_pcm;
format_pcm.formatType = SL_DATAFORMAT_PCM;
- format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans);
+ format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder);
format_pcm.samplesPerSec = device->Frequency * 1000;
format_pcm.bitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
format_pcm.containerSize = format_pcm.bitsPerSample;