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

*droppedMessageCount*\
類型：UINT32

在此訊息之前遭捨棄的訊息數目。

*usec*\
類型：UINT32

建構此訊息的時間。

*audioFrameStart*\
類型：[ACP\_MESSAGE\_AUDIO\_FRAME\_START](/zh-TW/reference/audio/acphal/structs/acp_message_audio_frame_start)

[ACP\_MESSAGE\_AUDIO\_FRAME\_START](/zh-TW/reference/audio/acphal/structs/acp_message_audio_frame_start) 訊息。

*flowgraphCompleted*\
類型：[ACP\_MESSAGE\_FLOWGRAPH\_COMPLETED](/zh-TW/reference/audio/acphal/structs/acp_message_flowgraph_completed)

[ACP\_MESSAGE\_FLOWGRAPH\_COMPLETED](/zh-TW/reference/audio/acphal/structs/acp_message_flowgraph_completed) 訊息。

*shapeCommandBlocked*\
類型：[ACP\_MESSAGE\_SHAPE\_COMMAND\_BLOCKED](/zh-TW/reference/audio/acphal/structs/acp_message_shape_command_blocked)

[ACP\_MESSAGE\_SHAPE\_COMMAND\_BLOCKED](/zh-TW/reference/audio/acphal/structs/acp_message_shape_command_blocked) 訊息。

*commandCompleted*\
類型：[ACP\_MESSAGE\_COMMAND\_COMPLETED](/zh-TW/reference/audio/acphal/structs/acp_message_command_completed)

[ACP\_MESSAGE\_COMMAND\_COMPLETED](/zh-TW/reference/audio/acphal/structs/acp_message_command_completed) 訊息。

*flowgraphTerminated*\
類型：[ACP\_MESSAGE\_FLOWGRAPH\_TERMINATED](/zh-TW/reference/audio/acphal/structs/acp_message_flowgraph_terminated)

[ACP\_MESSAGE\_FLOWGRAPH\_TERMINATED](/zh-TW/reference/audio/acphal/structs/acp_message_flowgraph_terminated) 訊息。

*error*\
類型：[ACP\_MESSAGE\_ERROR](/zh-TW/reference/audio/acphal/structs/acp_message_error)

[ACP\_MESSAGE\_ERROR](/zh-TW/reference/audio/acphal/structs/acp_message_error) 訊息。

## 備註

若要判斷訊息的類型，請檢查 *type* 成員。

若要判斷訊息佇列中的訊息數目，請使用 [GetNumMessages](/zh-TW/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_getnummessages) 方法。若要從佇列取得最舊的訊息，請使用 [PopMessage](/zh-TW/reference/audio/acphal/interfaces/IAcpHal/methods/iacphal_popmessage) 方法。

## 需求

**標頭：** acphal.h

**支援的平台：** XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

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


## Related topics

- [ACP_MESSAGE](/reference/audio/acphal/structs/acp_message.md)
- [ACP_MESSAGE_TYPE](/reference/audio/acphal/enums/acp_message_type.md)
