diff options
author | Chris Robinson <[email protected]> | 2019-04-26 15:58:25 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-04-26 15:58:25 -0700 |
commit | f23ff0394d8ae58dc12f8d1076fe5cd9dfde383d (patch) | |
tree | 6ab98ccc85c76eb77bf8c533cdaae179fb0b6bd4 /Alc/backends/solaris.cpp | |
parent | 348e01dc4bc16ac4543d54b722fb46dbdebcb1e3 (diff) |
Specify the buffer size as itself instead of the period count
Certain backends don't need a buffer size to be a strict multiple of the period
count, which allows a little more flexibility. The period/update size simply
acts as the minimum request, which helps control CPU load by determining how
often parameter and other pre-mixing updates are processed.
Diffstat (limited to 'Alc/backends/solaris.cpp')
-rw-r--r-- | Alc/backends/solaris.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Alc/backends/solaris.cpp b/Alc/backends/solaris.cpp index dd41de3e..3e59a78c 100644 --- a/Alc/backends/solaris.cpp +++ b/Alc/backends/solaris.cpp @@ -196,7 +196,7 @@ ALCboolean SolarisBackend::reset() } ALsizei frameSize{numChannels * mDevice->bytesFromFmt()}; - info.play.buffer_size = mDevice->UpdateSize*mDevice->NumUpdates * frameSize; + info.play.buffer_size = mDevice->BufferSize * frameSize; if(ioctl(mFd, AUDIO_SETINFO, &info) < 0) { @@ -222,7 +222,8 @@ ALCboolean SolarisBackend::reset() } mDevice->Frequency = info.play.sample_rate; - mDevice->UpdateSize = (info.play.buffer_size/mDevice->NumUpdates) + 1; + mDevice->BufferSize = info.play.buffer_size / frameSize; + mDevice->UpdateSize = mDevice->BufferSize / 2; SetDefaultChannelOrder(mDevice); |