Entry to update SHAPE_EQCOMP_CONTEXT.
struct ACP_COMMAND_UPDATE_EQCOMP_CONTEXT_ENTRY {
UINT32 contextIndex;
UINT32 eqAB0Target : 24;
UINT32 eqAB1Target_L : 8;
UINT32 eqAB1Target_H : 16;
UINT32 eqAB2Target_L : 16;
UINT32 eqAB2Target_H : 8;
UINT32 eqAA1Target : 24;
UINT32 eqAA2Target : 24;
UINT32 eqBB0Target_L : 8;
UINT32 eqBB0Target_H : 16;
UINT32 eqBB1Target_L : 16;
UINT32 eqBB1Target_H : 8;
UINT32 eqBB2Target : 24;
UINT32 eqBA1Target : 24;
UINT32 eqBA2Target_L : 8;
UINT32 eqBA2Target_H : 16;
UINT32 eqCB0Target_L : 16;
UINT32 eqCB0Target_H : 8;
UINT32 eqCB1Target : 24;
UINT32 eqCB2Target : 24;
UINT32 eqCA1Target_L : 8;
UINT32 eqCA1Target_H : 16;
UINT32 eqCA2Target_L : 16;
UINT32 eqCA2Target_H : 8;
UINT32 Reserved : 24;
UINT32 compGainTarget;
};
contextIndex
Index in the range 0 to ACP_MAX_NUM_EQCOMP_CONTEXTS.
eqAB0Target
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqAB0Target.
eqAB1Target_L
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqAB1Target_L.
eqAB1Target_H
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqAB1Target_H.
eqAB2Target_L
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqAB2Target_L.
eqAB2Target_H
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqAB2Target_H.
eqAA1Target
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqAA1Target.
eqAA2Target
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqAA2Target.
eqBB0Target_L
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqBB0Target_L.
eqBB0Target_H
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqBB0Target_H.
eqBB1Target_L
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqBB1Target_L.
eqBB1Target_H
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqBB1Target_H.
eqBB2Target
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqBB2Target.
eqBA1Target
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqBA1Target.
eqBA2Target_L
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqBA2Target_L.
eqBA2Target_H
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqBA2Target_H.
eqCB0Target_L
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqCB0Target_L.
eqCB0Target_H
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqCB0Target_H.
eqCB1Target
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqCB1Target.
eqCB2Target
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqCB2Target.
eqCA1Target_L
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqCA1Target_L.
eqCA1Target_H
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqCA1Target_H.
eqCA2Target_L
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqCA2Target_L.
eqCA2Target_H
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::eqCA2Target_H.
Reserved
Reserved.
compGainTarget
Replaces the existing value of SHAPE_EQCOMP_CONTEXT::compGainTarget.
This structure is used by ACP_COMMAND_UPDATE_ALL_CONTEXTS and ACP_COMMAND_UPDATE_CONTEXTS.
This structure also includes the inline methods:
inline void SetRawFilterATargetCoefficients(INT32 a1, INT32 a2, INT32 b0, INT32 b1, INT32 b2)
{
eqAA1Target = ShapeSignedToU24(a1);
eqAA2Target = ShapeSignedToU24(a2);
eqAB0Target = ShapeSignedToU24(b0);
eqAB1Target_L = ShapeSignedToLowU8(b1);
eqAB1Target_H = ShapeSignedToHighU16(b1);
eqAB2Target_L = ShapeSignedToLowU16(b2);
eqAB2Target_H = ShapeSignedToHighU8(b2);
}
inline void SetRawFilterBTargetCoefficients(INT32 a1, INT32 a2, INT32 b0, INT32 b1, INT32 b2)
{
eqBA1Target = ShapeSignedToU24(a1);
eqBA2Target_L = ShapeSignedToLowU8(a2);
eqBA2Target_H = ShapeSignedToHighU16(a2);
eqBB0Target_L = ShapeSignedToLowU8(b0);
eqBB0Target_H = ShapeSignedToHighU16(b0);
eqBB1Target_L = ShapeSignedToLowU16(b1);
eqBB1Target_H = ShapeSignedToHighU8(b1);
eqBB2Target = ShapeSignedToU24(b2);
}
inline void SetRawFilterCTargetCoefficients(INT32 a1, INT32 a2, INT32 b0, INT32 b1, INT32 b2)
{
eqCA1Target_L = ShapeSignedToLowU8(a1);
eqCA1Target_H = ShapeSignedToHighU16(a1);
eqCA2Target_L = ShapeSignedToLowU16(a2);
eqCA2Target_H = ShapeSignedToHighU8(a2);
eqCB0Target_L = ShapeSignedToLowU16(b0);
eqCB0Target_H = ShapeSignedToHighU8(b0);
eqCB1Target = ShapeSignedToU24(b1);
eqCB2Target = ShapeSignedToU24(b2);
};
inline void SetGainTarget(float gainTarget) // Gain target (amplitude, not dB)
{
compGainTarget = ShapeUnsignedToU16((UINT32)(gainTarget * SHAPE_Q13));
}
Header: Declared in acphal.h.
Library: Use acphal.lib.