13 #ifndef _MpBridgeAlgBase_h_ 14 #define _MpBridgeAlgBase_h_ 26 #define MP_BRIDGE_INT_LENGTH INT16_C(5) 27 #define MP_BRIDGE_FRAC_LENGTH INT16_C(10) 28 #define MPF_BRIDGE_FLOAT(num) ((MpBridgeGain)MPF_FLOAT((num), MP_BRIDGE_INT_LENGTH, MP_BRIDGE_FRAC_LENGTH)) 29 #define MPF_BRIDGE_MAX ((MpBridgeGain)MPF_MAX(MP_BRIDGE_INT_LENGTH, MP_BRIDGE_FRAC_LENGTH)) 30 #define MPF_BRIDGE_STEP ((MpBridgeGain)MPF_STEP(MP_BRIDGE_INT_LENGTH, MP_BRIDGE_FRAC_LENGTH)) 32 #define MP_BRIDGE_GAIN_UNDEFINED INT16_MAX 33 #define MP_BRIDGE_GAIN_MAX MPF_BRIDGE_MAX 34 #define MP_BRIDGE_GAIN_MIN MPF_BRIDGE_FLOAT(0.0f) 35 #define MP_BRIDGE_GAIN_STEP MPF_BRIDGE_STEP 36 #define MP_BRIDGE_GAIN_MUTED MP_BRIDGE_GAIN_MIN 37 #define MP_BRIDGE_GAIN_PASSTHROUGH MPF_BRIDGE_FLOAT(1.0f) 39 #define MAX_AMPLITUDE_ROUND (1<<(MP_AUDIO_SAMPLE_SIZE-1)) 45 #ifdef MP_FIXED_POINT // [ 47 #else // MP_FIXED_POINT ][ 49 #endif // MP_FIXED_POINT ] 51 #ifdef MP_FIXED_POINT // [ 53 #else // MP_FIXED_POINT ][ 55 #endif // MP_FIXED_POINT ] 167 for (
int i=0; i<inBufsSize; i++)
169 if (inBufs[i].isValid())
178 #endif // _MpBridgeAlgBase_h_ virtual void setGainMatrixValue(int column, int row, MpBridgeGain val)=0
Set selected gain to the given value.
virtual ~MpBridgeAlgBase()
Destructor.
Definition: MpBridgeAlgBase.h:86
MpAudioSample * mpPrevAmplitudes
the previous frame processing interval.
Definition: MpBridgeAlgBase.h:143
int mMaxInputs
Number of possible bridge inputs.
Definition: MpBridgeAlgBase.h:140
int maxOutputs() const
Get maximum number of outputs.
Definition: MpBridgeAlgBase.h:159
void saveAmplitudes(MpBufPtr inBufs[], int inBufsSize)
Save buffers amplitudes to internal array.
Definition: MpBridgeAlgBase.h:164
float MpBridgeAccum
Definition: MpBridgeAlgBase.h:48
virtual void setGainMatrixColumn(int column, int numValues, const MpBridgeGain val[])=0
Set selected gain column to the given value.
virtual void setGainMatrixRow(int row, int numValues, const MpBridgeGain val[])=0
Set selected gain row to the given value.
int16_t MpAudioSample
Definition: MpTypes.h:44
MpBridgeAlgBase(int maxInputs, int maxOutputs, UtlBoolean mixSilence)
Constructor.
Definition: MpBridgeAlgBase.h:72
Smart pointer to MpAudioBuf.
Definition: MpAudioBuf.h:168
UtlBoolean mMixSilence
Should Bridge ignore or mix frames marked as silence?
Definition: MpBridgeAlgBase.h:142
int maxInputs() const
Get maximum number of inputs.
Definition: MpBridgeAlgBase.h:154
int mMaxOutputs
Number of possible bridge outputs.
Definition: MpBridgeAlgBase.h:141
virtual UtlBoolean doMix(MpBufPtr inBufs[], int inBufsSize, MpBufPtr outBufs[], int outBufsSize, int samplesPerFrame)=0
Mix together inputs onto outputs according to mpGainMatrix matrix.
Smart pointer to MpBuf.
Definition: MpBuf.h:160
float MpBridgeGain
Definition: MpBridgeAlgBase.h:54
Base class for the Bridge mixing algorithms.
Definition: MpBridgeAlgBase.h:62