Skip to content

Commit

Permalink
Use roundUpToPowerOf2 as a wrapper for std::bit_ceil
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Sep 29, 2023
1 parent 9b74581 commit 8d061cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/soundio/soundmanagerconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ unsigned int SoundManagerConfig::getFramesPerBuffer() const {
}

const unsigned int sampleRateKhz = static_cast<unsigned int>(m_sampleRate / 1000);
return std::bit_ceil(sampleRateKhz) << (audioBufferSizeIndex - 1);
return roundUpToPowerOf2(sampleRateKhz) << (audioBufferSizeIndex - 1);
}

// Set the audio buffer size
Expand Down

0 comments on commit 8d061cf

Please sign in to comment.