Make BUF_SIZE constexpr

This commit is contained in:
sukibaby
2024-07-10 22:09:23 -07:00
committed by teejusb
parent 51e00b2d86
commit 06bfbbf15d
2 changed files with 5 additions and 5 deletions
+2 -5
View File
@@ -8,14 +8,11 @@
RageSoundMixBuffer::RageSoundMixBuffer()
{
// See how many samples we can stuff into 2MB.
size_t BUF_SIZE = 2 * 1024 * 1024 / sizeof(float);
m_pMixbuf = static_cast<float*>(std::malloc(BUF_SIZE * sizeof(float)));
if (m_pMixbuf == nullptr) {
if (m_pMixbuf == nullptr)
{
ASSERT_M(false, "Failed to allocate memory for the sound mixing buffer");
}
m_iBufSize = BUF_SIZE;
std::memset(m_pMixbuf, 0, m_iBufSize * sizeof(float));
m_iBufUsed = 0;