mirror of https://github.com/AxioDL/boo.git
Update effect API to include sample count info
This commit is contained in:
parent
08a4c5d7a8
commit
f86b9706d4
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue