diff --git a/src/soundio/soundmanagerconfig.cpp b/src/soundio/soundmanagerconfig.cpp index 08a68091e8ac..1b3dada4c6b7 100644 --- a/src/soundio/soundmanagerconfig.cpp +++ b/src/soundio/soundmanagerconfig.cpp @@ -409,7 +409,7 @@ unsigned int SoundManagerConfig::getFramesPerBuffer() const { } const unsigned int sampleRateKhz = static_cast(m_sampleRate / 1000); - return std::bit_ceil(sampleRateKhz) << (audioBufferSizeIndex - 1); + return roundUpToPowerOf2(sampleRateKhz) << (audioBufferSizeIndex - 1); } // Set the audio buffer size