diff --git a/include/boo/audiodev/IAudioSubmix.hpp b/include/boo/audiodev/IAudioSubmix.hpp index fd28271..8956c67 100644 --- a/include/boo/audiodev/IAudioSubmix.hpp +++ b/include/boo/audiodev/IAudioSubmix.hpp @@ -39,9 +39,12 @@ struct IAudioSubmixCallback virtual bool canApplyEffect() const=0; /** Client-provided effect solution for interleaved, master sample-rate audio */ - virtual void applyEffect(int16_t* audio, const ChannelMap& chanMap, double sampleRate) const=0; - virtual void applyEffect(int32_t* audio, const ChannelMap& chanMap, double sampleRate) const=0; - virtual void applyEffect(float* audio, const ChannelMap& chanMap, double sampleRate) const=0; + virtual void applyEffect(int16_t* audio, size_t frameCount, + const ChannelMap& chanMap, double sampleRate) const=0; + virtual void applyEffect(int32_t* audio, size_t frameCount, + const ChannelMap& chanMap, double sampleRate) const=0; + virtual void applyEffect(float* audio, size_t frameCount, + const ChannelMap& chanMap, double sampleRate) const=0; }; } diff --git a/lib/audiodev/AudioSubmix.cpp b/lib/audiodev/AudioSubmix.cpp index ba4c264..6bca5f7 100644 --- a/lib/audiodev/AudioSubmix.cpp +++ b/lib/audiodev/AudioSubmix.cpp @@ -39,7 +39,7 @@ void AudioSubmix::_pumpAndMixVoices(size_t frames, int16_t* dataOut) /* Apply submix effect (if available) */ if (m_cb && m_cb->canApplyEffect()) - m_cb->applyEffect(m_scratch16.data(), info.m_channelMap, info.m_sampleRate); + m_cb->applyEffect(m_scratch16.data(), frames, info.m_channelMap, info.m_sampleRate); /* Merge into output mix */ auto it = m_scratch16.begin(); @@ -72,7 +72,7 @@ void AudioSubmix::_pumpAndMixVoices(size_t frames, int32_t* dataOut) /* Apply submix effect (if available) */ if (m_cb && m_cb->canApplyEffect()) - m_cb->applyEffect(m_scratch32.data(), info.m_channelMap, info.m_sampleRate); + m_cb->applyEffect(m_scratch32.data(), frames, info.m_channelMap, info.m_sampleRate); /* Merge into output mix */ auto it = m_scratch32.begin(); @@ -105,7 +105,7 @@ void AudioSubmix::_pumpAndMixVoices(size_t frames, float* dataOut) /* Apply submix effect (if available) */ if (m_cb && m_cb->canApplyEffect()) - m_cb->applyEffect(m_scratchFlt.data(), info.m_channelMap, info.m_sampleRate); + m_cb->applyEffect(m_scratchFlt.data(), frames, info.m_channelMap, info.m_sampleRate); /* Merge into output mix */ auto it = m_scratchFlt.begin();