1 #pragma once 2 3 #include <QVarLengthArray> 4 5 #include "util/types.h" 6 #include "engine/enginemaster.h" 7 #include "effects/engineeffectsmanager.h" 8 9 class ChannelMixer { 10 public: 11 // This does not modify the input channel buffers. All manipulation of the input 12 // channel buffers is done after copying to a temporary buffer, then they are mixed 13 // to make the output buffer. 14 static void applyEffectsAndMixChannels( 15 const EngineMaster::GainCalculator& gainCalculator, 16 QVarLengthArray<EngineMaster::ChannelInfo*, kPreallocatedChannels>* activeChannels, 17 QVarLengthArray<EngineMaster::GainCache, kPreallocatedChannels>* channelGainCache, 18 CSAMPLE* pOutput, const ChannelHandle& outputHandle, 19 unsigned int iBufferSize, 20 unsigned int iSampleRate, 21 EngineEffectsManager* pEngineEffectsManager); 22 // This does modify the input channel buffers, then mixes them to make the output buffer. 23 static void applyEffectsInPlaceAndMixChannels( 24 const EngineMaster::GainCalculator& gainCalculator, 25 QVarLengthArray<EngineMaster::ChannelInfo*, kPreallocatedChannels>* activeChannels, 26 QVarLengthArray<EngineMaster::GainCache, kPreallocatedChannels>* channelGainCache, 27 CSAMPLE* pOutput, const ChannelHandle& outputHandle, 28 unsigned int iBufferSize, 29 unsigned int iSampleRate, 30 EngineEffectsManager* pEngineEffectsManager); 31 }; 32