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

# ACP_MESSAGE

> ACP_MESSAGE

# ACP\_MESSAGE

来自 ACP 的消息。

## 语法

```cpp theme={null}
typedef struct ACP_MESSAGE {  
    UINT32 type;  
    UINT32 droppedMessageCount;  
    UINT32 usec;  
    union  
    {  
        ACP_MESSAGE_AUDIO_FRAME_START audioFrameStart;  
        ACP_MESSAGE_FLOWGRAPH_COMPLETED flowgraphCompleted;  
        ACP_MESSAGE_SHAPE_COMMAND_BLOCKED shapeCommandBlocked;  
        ACP_MESSAGE_COMMAND_COMPLETED commandCompleted;  
        ACP_MESSAGE_FLOWGRAPH_TERMINATED flowgraphTerminated;  
        ACP_MESSAGE_ERROR error;  
    };  
} ACP_MESSAGE  
```

### 成员

*type*\
类型:UINT32

消息类型;请参阅 [ACP\_MESSAGE\_TYPE](https://docs.xbox.com/zh-CN/reference/audio/acphal/enums/acp_message_type.md)。

*droppedMessageCount*\
类型:UINT32

在此消息之前丢弃的消息数量。

*usec*\
类型:UINT32

构造此消息的时刻。

*audioFrameStart*\
类型:[ACP\_MESSAGE\_AUDIO\_FRAME\_START](https://docs.xbox.com/zh-CN/reference/audio/acphal/structs/acp_message_audio_frame_start.md)

[ACP\_MESSAGE\_AUDIO\_FRAME\_START](https://docs.xbox.com/zh-CN/reference/audio/acphal/structs/acp_message_audio_frame_start.md) 消息。

*flowgraphCompleted*\
类型:[ACP\_MESSAGE\_FLOWGRAPH\_COMPLETED](https://docs.xbox.com/zh-CN/reference/audio/acphal/structs/acp_message_flowgraph_completed.md)

[ACP\_MESSAGE\_FLOWGRAPH\_COMPLETED](https://docs.xbox.com/zh-CN/reference/audio/acphal/structs/acp_message_flowgraph_completed.md) 消息。

*shapeCommandBlocked*\
类型:[ACP\_MESSAGE\_SHAPE\_COMMAND\_BLOCKED](https://docs.xbox.com/zh-CN/reference/audio/acphal/structs/acp_message_shape_command_blocked.md)

[ACP\_MESSAGE\_SHAPE\_COMMAND\_BLOCKED](https://docs.xbox.com/zh-CN/reference/audio/acphal/structs/acp_message_shape_command_blocked.md) 消息。

*commandCompleted*\
类型:[ACP\_MESSAGE\_COMMAND\_COMPLETED](https://docs.xbox.com/zh-CN/reference/audio/acphal/structs/acp_message_command_completed.md)

[ACP\_MESSAGE\_COMMAND\_COMPLETED](https://docs.xbox.com/zh-CN/reference/audio/acphal/structs/acp_message_command_completed.md) 消息。

*flowgraphTerminated*\
类型:[ACP\_MESSAGE\_FLOWGRAPH\_TERMINATED](https://docs.xbox.com/zh-CN/reference/audio/acphal/structs/acp_message_flowgraph_terminated.md)

[ACP\_MESSAGE\_FLOWGRAPH\_TERMINATED](https://docs.xbox.com/zh-CN/reference/audio/acphal/structs/acp_message_flowgraph_terminated.md) 消息。

*error*\
类型:[ACP\_MESSAGE\_ERROR](https://docs.xbox.com/zh-CN/reference/audio/acphal/structs/acp_message_error.md)

[ACP\_MESSAGE\_ERROR](https://docs.xbox.com/zh-CN/reference/audio/acphal/structs/acp_message_error.md) 消息。

## 备注

若要确定消息的类型,请检查 *type* 成员。

若要确定消息队列中的消息数量,请使用 [GetNumMessages](https://docs.xbox.com/zh-CN/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_getnummessages.md) 方法。若要从队列中获取最早的消息,请使用 [PopMessage](https://docs.xbox.com/zh-CN/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_popmessage.md) 方法。

## 要求

**头文件:** acphal.h

**支持的平台:** XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[ACP\_MESSAGE\_TYPE](https://docs.xbox.com/zh-CN/reference/audio/acphal/enums/acp_message_type.md)\
[GetNumMessages](https://docs.xbox.com/zh-CN/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_getnummessages.md)\
[PopMessage](https://docs.xbox.com/zh-CN/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_popmessage.md)\
[AcpHal](https://docs.xbox.com/zh-CN/reference/audio/acphal/acphal_members.md)


## Related topics

- [ACP_MESSAGE_TYPE](https://docs.xbox.com/zh-CN/reference/audio/acphal/enums/acp_message_type.md)
- [IAcpHal::PopMessage](https://docs.xbox.com/zh-CN/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_popmessage.md)
- [AcpHal](https://docs.xbox.com/zh-CN/reference/audio/acphal/acphal_members.md)
- [SHAPE 音频流程图构建最佳实践](https://docs.xbox.com/zh-CN/build/console-features/audio/overviews/best-practices-audio-flowgraph-construction.md)
- [SHAPE 概述](https://docs.xbox.com/zh-CN/build/console-features/audio/overviews/shape-overview.md)
