> ## 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.

# XAppCaptureMetadataAddDoubleEvent

> XAppCaptureMetadataAddDoubleEvent

# XAppCaptureMetadataAddDoubleEvent

將具有 double 值的中繼資料事件新增至您的應用程式擷取。

## 語法

```cpp theme={null}
HRESULT XAppCaptureMetadataAddDoubleEvent(  
         const char* name,  
         double value,  
         XAppCaptureMetadataPriority priority  
)  
```

### 參數

*name*   \_In\_z\_\
類型：char\*

要新增至應用程式擷取時間軸的事件名稱。

*value*   \_In\_\
類型：double

要新增至時間軸的事件值。必須是 double。

*priority*   \_In\_\
類型：[XAppCaptureMetadataPriority](/zh-TW/reference/system/xappcapture/enums/xappcapturemetadatapriority)

中繼資料的優先順序。用來決定在超過儲存空間限制時要儲存的內容。[XAppCaptureMetaDataPriority](/zh-TW/reference/system/xappcapture/enums/xappcapturemetadatapriority) 列舉的成員。

### 傳回值

類型：HRESULT

函式結果。

## 備註

<Note>在時間敏感執行緒上呼叫此函式並不安全。如需詳細資訊，請參閱[時間敏感執行緒](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)。</Note>

呼叫此方法時，系統會將中繼資料事件與時間戳記建立關聯。此中繼資料用來在直播和擷取的播放期間識別事件，以便分類和搜尋內容。若要儲存適用於一段時間範圍的 double 值，請使用 [XAppCaptureMetaDataStartDoubleState](/zh-TW/reference/system/xappcapture/functions/xappcapturemetadatastartdoublestate)。

與此函式搭配使用的 double 值必須是有限值。非有限的 double 值會轉換為 0 並予以接受。

<Note>中繼資料可能會上傳至 XBOX Live 和/或儲存至 .mp4 檔案、螢幕擷取畫面，或在廣播期間使用，因此絕不應在中繼資料中記錄私人使用者資訊。</Note>

## 需求

**標頭：** XAppCapture.h

**程式庫：** xgameruntime.lib

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

## 概念文件

* [時間敏感執行緒](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## 另請參閱

[GameDVR 概觀](/zh-TW/build/console-features/game-dvr/gamedvr-broadcast)\
[XAppCapture 成員](/zh-TW/reference/system/xappcapture/xappcapture_members)\
[XAppCaptureMetadataAddInt32Event](/zh-TW/reference/system/xappcapture/functions/xappcapturemetadatastartint32state)\
[XAppCaptureMetadataAddStringEvent](/zh-TW/reference/system/xappcapture/functions/xappcapturemetadatastartstringstate)


## Related topics

- [XAppCaptureMetadataAddDoubleEvent](/reference/system/xappcapture/functions/xappcapturemetadataadddoubleevent.md)
- [XAppCaptureMetadataAddInt32Event](/reference/system/xappcapture/functions/xappcapturemetadataaddint32event.md)
- [XAppCaptureMetadataAddStringEvent](/reference/system/xappcapture/functions/xappcapturemetadataaddstringevent.md)
