ACP_COMMAND_UPDATE_FILTVOL_CONTEXT_ENTRY Structure

Entry to update SHAPE_FILTVOL_CONTEXT.

Syntax

struct ACP_COMMAND_UPDATE_FILTVOL_CONTEXT_ENTRY {
    UINT32 contextIndex;
    UINT32 gainTarget;
    UINT32 qRecipTarget;
    UINT32 fcTarget;
};  

Members

contextIndex
Index in the range 0 to ACP_MAX_NUM_FILTVOL_CONTEXTS.

gainTarget
Replaces the existing value of SHAPE_FILTVOL_CONTEXT::gainTarget.

qRecipTarget
Replaces the existing value of SHAPE_FILTVOL_CONTEXT::qRecipTarget.

fcTarget
Replaces the existing value of SHAPE_FILTVOL_CONTEXT::fcTarget.

Remarks

This structure is used by ACP_COMMAND_UPDATE_ALL_CONTEXTS and ACP_COMMAND_UPDATE_CONTEXTS.

This structure also includes the inline methods:

      inline void SetOutputGainTarget(float outputGainTarget) // Output gain target [-2.0, 2.00] amplitude, not dB
      {
      gainTarget = (UINT32)((INT32)(outputGainTarget * SHAPE_Q14)) & 0x0000ffff;
      }

      inline void SetQTarget(float qTarget) // Bandwidth target
      {
      qRecipTarget = (UINT32)((INT32)((1.0f / qTarget) * SHAPE_Q23)) & 0x00ffffff;
      }

      inline void SetFrequencyTarget(float frequencyTarget) // Frequency target [0, 8000] Hz
      {
      fcTarget = (UINT32)((INT32)(2.0f * (float)sin(M_PI * frequencyTarget / SHAPE_SAMPLE_RATE) * SHAPE_Q24)) & 0x00ffffff;
      }  

Requirements

Header: Declared in acphal.h.

Library: Use acphal.lib.