aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/opensl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/opensl.cpp')
-rw-r--r--Alc/backends/opensl.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/Alc/backends/opensl.cpp b/Alc/backends/opensl.cpp
index c2acda3a..78212791 100644
--- a/Alc/backends/opensl.cpp
+++ b/Alc/backends/opensl.cpp
@@ -464,7 +464,7 @@ static ALCboolean ALCopenslPlayback_reset(ALCopenslPlayback *self)
device->FmtType = DevFmtShort;
SetDefaultWFXChannelOrder(device);
- self->mFrameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
+ self->mFrameSize = device->frameSizeFromFmt();
loc_bufq.locatorType = SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE;
@@ -473,9 +473,9 @@ 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, device->mAmbiOrder);
+ format_pcm.numChannels = device->channelsFromFmt();
format_pcm.sampleRate = device->Frequency * 1000;
- format_pcm.bitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
+ format_pcm.bitsPerSample = device->bytesFromFmt() * 8;
format_pcm.containerSize = format_pcm.bitsPerSample;
format_pcm.channelMask = GetChannelMask(device->FmtChans);
format_pcm.endianness = IS_LITTLE_ENDIAN ? SL_BYTEORDER_LITTLEENDIAN :
@@ -484,9 +484,9 @@ static ALCboolean ALCopenslPlayback_reset(ALCopenslPlayback *self)
#else
SLDataFormat_PCM format_pcm;
format_pcm.formatType = SL_DATAFORMAT_PCM;
- format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
+ format_pcm.numChannels = device->channelsFromFmt();
format_pcm.samplesPerSec = device->Frequency * 1000;
- format_pcm.bitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
+ format_pcm.bitsPerSample = device->bytesFromFmt() * 8;
format_pcm.containerSize = format_pcm.bitsPerSample;
format_pcm.channelMask = GetChannelMask(device->FmtChans);
format_pcm.endianness = IS_LITTLE_ENDIAN ? SL_BYTEORDER_LITTLEENDIAN :
@@ -755,7 +755,7 @@ static ALCenum ALCopenslCapture_open(ALCopenslCapture *self, const ALCchar *name
device->UpdateSize = update_len;
device->NumUpdates = (length+update_len-1) / update_len;
- self->mFrameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
+ self->mFrameSize = device->frameSizeFromFmt();
}
loc_dev.locatorType = SL_DATALOCATOR_IODEVICE;
loc_dev.deviceType = SL_IODEVICE_AUDIOINPUT;
@@ -771,9 +771,9 @@ static ALCenum ALCopenslCapture_open(ALCopenslCapture *self, const ALCchar *name
#ifdef SL_DATAFORMAT_PCM_EX
SLDataFormat_PCM_EX format_pcm;
format_pcm.formatType = SL_DATAFORMAT_PCM_EX;
- format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
+ format_pcm.numChannels = device->channelsFromFmt();
format_pcm.sampleRate = device->Frequency * 1000;
- format_pcm.bitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
+ format_pcm.bitsPerSample = device->bytesFromFmt() * 8;
format_pcm.containerSize = format_pcm.bitsPerSample;
format_pcm.channelMask = GetChannelMask(device->FmtChans);
format_pcm.endianness = IS_LITTLE_ENDIAN ? SL_BYTEORDER_LITTLEENDIAN :
@@ -782,9 +782,9 @@ static ALCenum ALCopenslCapture_open(ALCopenslCapture *self, const ALCchar *name
#else
SLDataFormat_PCM format_pcm;
format_pcm.formatType = SL_DATAFORMAT_PCM;
- format_pcm.numChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
+ format_pcm.numChannels = device->channelsFromFmt();
format_pcm.samplesPerSec = device->Frequency * 1000;
- format_pcm.bitsPerSample = BytesFromDevFmt(device->FmtType) * 8;
+ format_pcm.bitsPerSample = device->bytesFromFmt() * 8;
format_pcm.containerSize = format_pcm.bitsPerSample;
format_pcm.channelMask = GetChannelMask(device->FmtChans);
format_pcm.endianness = IS_LITTLE_ENDIAN ? SL_BYTEORDER_LITTLEENDIAN :