> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ACP_COMMAND_UPDATE_FILTVOL_CONTEXT_ENTRY

> ACP_COMMAND_UPDATE_FILTVOL_CONTEXT_ENTRY

# ACP\_COMMAND\_UPDATE\_FILTVOL\_CONTEXT\_ENTRY

Entry for updating `SHAPE_FILTVOL_CONTEXT`.

## Syntax

```cpp theme={null}
typedef struct ACP_COMMAND_UPDATE_FILTVOL_CONTEXT_ENTRY {  
    UINT32 contextIndex;  
    UINT32 gainTarget;  
    UINT32 qRecipTarget;  
    UINT32 fcTarget;  
} ACP_COMMAND_UPDATE_FILTVOL_CONTEXT_ENTRY  
```

### Members

*contextIndex*\
Type: UINT32

Index in the range of 0 to `ACP_MAX_NUM_FILTVOL_CONTEXTS`.

*gainTarget*\
Type: UINT32

Replaces the existing value of `SHAPE_FILTVOL_CONTEXT::gainTarget`.

*qRecipTarget*\
Type: UINT32

Replaces the existing value of `SHAPE_FILTVOL_CONTEXT::qRecipTarget`.

*fcTarget*\
Type: UINT32

Replaces the existing value of `SHAPE_FILTVOL_CONTEXT::fcTarget`.

## Remarks

This structure is used by the `ACP_COMMAND_UPDATE_CONTEXTS` and `ACP_COMMAND_UPDATE_ALL_CONTEXTS` commands to update a single Filter/Volume context. Use the command to update only a small number of contexts per audio frame; updating a large number of contexts is not efficient. See the [Rendering audio section of Overview of ACP](/build/console-features/audio/overviews/acp-overview#ID4E6C) for more detail.

This structure also includes inline methods:

```cpp theme={null}
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:** acphal.h

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[ACP\_COMMAND\_TYPE](/reference/audio/acphal/enums/acp_command_type)\
[SubmitCommand](/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_submitcommand)\
[AcpHal](/reference/audio/acphal/acphal_members)


## Related topics

- [AcpHal](/reference/audio/acphal/acphal_members.md)
- [ACP_COMMAND_UPDATE_CONTEXTS](/reference/audio/acphal/structs/acp_command_update_contexts.md)
- [ACP_COMMAND_UPDATE_FILTVOL_CONTEXT](/reference/audio/acphal/structs/acp_command_update_filtvol_context.md)
- [ACP_COMMAND_UPDATE_XMA_CONTEXT_ENTRY](/reference/audio/acphal/structs/acp_command_update_xma_context_entry.md)
- [ACP_COMMAND_UPDATE_EQCOMP_CONTEXT_ENTRY](/reference/audio/acphal/structs/acp_command_update_eqcomp_context_entry.md)
