diff options
author | Chris Robinson <[email protected]> | 2017-04-12 18:26:07 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-04-12 18:26:07 -0700 |
commit | 901804d724d49f316cd2bf51ec1cd2cd9fb9eb91 (patch) | |
tree | cb86be080e6db627256d5965548d8a39edb91298 /Alc/backends/solaris.c | |
parent | 46046f9caa2f9014d70c0f8553ada6dafa16c1e9 (diff) |
Store the ambisonic order separate from the channel enum
Diffstat (limited to 'Alc/backends/solaris.c')
-rw-r--r-- | Alc/backends/solaris.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Alc/backends/solaris.c b/Alc/backends/solaris.c index 98c00525..5b3f6136 100644 --- a/Alc/backends/solaris.c +++ b/Alc/backends/solaris.c @@ -116,7 +116,7 @@ static int ALCsolarisBackend_mixerProc(void *ptr) SetRTPriority(); althrd_setname(althrd_current(), MIXER_THREAD_NAME); - frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType); + frame_size = FrameSizeFromDevFmt(device->FmtChans, device->FmtType, device->AmbiOrder); ALCsolarisBackend_lock(self); while(!ATOMIC_LOAD_SEQ(&self->killNow) && device->Connected) @@ -209,7 +209,7 @@ static ALCboolean ALCsolarisBackend_reset(ALCsolarisBackend *self) if(device->FmtChans != DevFmtMono) device->FmtChans = DevFmtStereo; - numChannels = ChannelsFromDevFmt(device->FmtChans); + numChannels = ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder); info.play.channels = numChannels; switch(device->FmtType) @@ -243,9 +243,9 @@ static ALCboolean ALCsolarisBackend_reset(ALCsolarisBackend *self) return ALC_FALSE; } - if(ChannelsFromDevFmt(device->FmtChans) != (ALsizei)info.play.channels) + if(ChannelsFromDevFmt(device->FmtChans, device->AmbiOrder) != (ALsizei)info.play.channels) { - ERR("Could not set %d channels, got %d instead\n", ChannelsFromDevFmt(device->FmtChans), info.play.channels); + ERR("Failed to set %s, got %u channels instead\n", DevFmtChannelsString(device->FmtChans), info.play.channels); return ALC_FALSE; } @@ -265,7 +265,9 @@ static ALCboolean ALCsolarisBackend_reset(ALCsolarisBackend *self) SetDefaultChannelOrder(device); free(self->mix_data); - self->data_size = device->UpdateSize * FrameSizeFromDevFmt(device->FmtChans, device->FmtType); + self->data_size = device->UpdateSize * FrameSizeFromDevFmt( + device->FmtChans, device->FmtType, device->AmbiOrder + ); self->mix_data = calloc(1, self->data_size); return ALC_TRUE; |