> ## 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_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](/reference/audio/acphal/enums/acp_message_type)。

*droppedMessageCount*\
类型:UINT32

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

*usec*\
类型:UINT32

构造此消息的时刻。

*audioFrameStart*\
类型:[ACP\_MESSAGE\_AUDIO\_FRAME\_START](/reference/audio/acphal/structs/acp_message_audio_frame_start)

[ACP\_MESSAGE\_AUDIO\_FRAME\_START](/reference/audio/acphal/structs/acp_message_audio_frame_start) 消息。

*flowgraphCompleted*\
类型:[ACP\_MESSAGE\_FLOWGRAPH\_COMPLETED](/reference/audio/acphal/structs/acp_message_flowgraph_completed)

[ACP\_MESSAGE\_FLOWGRAPH\_COMPLETED](/reference/audio/acphal/structs/acp_message_flowgraph_completed) 消息。

*shapeCommandBlocked*\
类型:[ACP\_MESSAGE\_SHAPE\_COMMAND\_BLOCKED](/reference/audio/acphal/structs/acp_message_shape_command_blocked)

[ACP\_MESSAGE\_SHAPE\_COMMAND\_BLOCKED](/reference/audio/acphal/structs/acp_message_shape_command_blocked) 消息。

*commandCompleted*\
类型:[ACP\_MESSAGE\_COMMAND\_COMPLETED](/reference/audio/acphal/structs/acp_message_command_completed)

[ACP\_MESSAGE\_COMMAND\_COMPLETED](/reference/audio/acphal/structs/acp_message_command_completed) 消息。

*flowgraphTerminated*\
类型:[ACP\_MESSAGE\_FLOWGRAPH\_TERMINATED](/reference/audio/acphal/structs/acp_message_flowgraph_terminated)

[ACP\_MESSAGE\_FLOWGRAPH\_TERMINATED](/reference/audio/acphal/structs/acp_message_flowgraph_terminated) 消息。

*error*\
类型:[ACP\_MESSAGE\_ERROR](/reference/audio/acphal/structs/acp_message_error)

[ACP\_MESSAGE\_ERROR](/reference/audio/acphal/structs/acp_message_error) 消息。

## 备注

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

若要确定消息队列中的消息数量,请使用 [GetNumMessages](/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_getnummessages) 方法。若要从队列中获取最早的消息,请使用 [PopMessage](/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_popmessage) 方法。

## 要求

**头文件:** acphal.h

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

## 另请参阅

[ACP\_MESSAGE\_TYPE](/reference/audio/acphal/enums/acp_message_type)\
[GetNumMessages](/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_getnummessages)\
[PopMessage](/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_popmessage)\
[AcpHal](/reference/audio/acphal/acphal_members)


## Related topics

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