From 3006aae081f8329ca77791223cb5e57bb69572c1 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 7 Sep 2021 16:14:25 -0400 Subject: [PATCH] Cortex: Use bytes_per_frame in another case. No functional change. --- src/apps/cortex/addons/common/AudioBuffer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/cortex/addons/common/AudioBuffer.cpp b/src/apps/cortex/addons/common/AudioBuffer.cpp index 92ceffb4f9..ffaea04cc8 100644 --- a/src/apps/cortex/addons/common/AudioBuffer.cpp +++ b/src/apps/cortex/addons/common/AudioBuffer.cpp @@ -37,6 +37,7 @@ #include #include #include "AudioBuffer.h" +#include "SoundUtils.h" #include #include @@ -104,14 +105,13 @@ AudioBuffer::AudioBuffer( RawBuffer(), m_format(format) - { - +{ if(pBuffer->Header()->type != B_MEDIA_RAW_AUDIO) return; // reference it: m_pData = pBuffer->Data(); - m_frameSize = (m_format.format & 0x0f) * m_format.channel_count; + m_frameSize = bytes_per_frame(m_format); m_frames = pBuffer->Header()->size_used / m_frameSize; m_allocatedSize = 0; m_bOwnData = false;