aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/sndio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/sndio.cpp')
-rw-r--r--Alc/backends/sndio.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/Alc/backends/sndio.cpp b/Alc/backends/sndio.cpp
index 1dabe5ca..9ebad671 100644
--- a/Alc/backends/sndio.cpp
+++ b/Alc/backends/sndio.cpp
@@ -97,7 +97,7 @@ static int SndioPlayback_mixerProc(SndioPlayback *self)
SetRTPriority();
althrd_setname(MIXER_THREAD_NAME);
- frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
+ frameSize = device->frameSizeFromFmt();
while(!self->mKillNow.load(std::memory_order_acquire) &&
device->Connected.load(std::memory_order_acquire))
@@ -238,9 +238,7 @@ static ALCboolean SndioPlayback_start(SndioPlayback *self)
{
ALCdevice *device = STATIC_CAST(ALCbackend,self)->mDevice;
- self->data_size = device->UpdateSize * FrameSizeFromDevFmt(
- device->FmtChans, device->FmtType, device->mAmbiOrder
- );
+ self->data_size = device->UpdateSize * device->frameSizeFromFmt();
al_free(self->mix_data);
self->mix_data = al_calloc(16, self->data_size);
@@ -334,7 +332,7 @@ static int SndioCapture_recordProc(SndioCapture *self)
SetRTPriority();
althrd_setname(RECORD_THREAD_NAME);
- frameSize = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->mAmbiOrder);
+ frameSize = device->frameSizeFromFmt();
while(!self->mKillNow.load(std::memory_order_acquire) &&
device->Connected.load(std::memory_order_acquire))
@@ -433,7 +431,7 @@ static ALCenum SndioCapture_open(SndioCapture *self, const ALCchar *name)
par.bits = par.bps * 8;
par.le = SIO_LE_NATIVE;
par.msb = SIO_LE_NATIVE ? 0 : 1;
- par.rchan = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
+ par.rchan = device->channelsFromFmt();
par.rate = device->Frequency;
par.appbufsz = maxu(device->UpdateSize*device->NumUpdates, (device->Frequency+9)/10);
@@ -461,7 +459,7 @@ static ALCenum SndioCapture_open(SndioCapture *self, const ALCchar *name)
(device->FmtType == DevFmtUShort && par.bits == 16 && par.sig == 0) ||
(device->FmtType == DevFmtInt && par.bits == 32 && par.sig != 0) ||
(device->FmtType == DevFmtUInt && par.bits == 32 && par.sig == 0)) ||
- ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder) != (ALsizei)par.rchan ||
+ device->channelsFromFmt() != (ALsizei)par.rchan ||
device->Frequency != par.rate)
{
ERR("Failed to set format %s %s %uhz, got %c%u %u-channel %uhz instead\n",