game_chat_audio_format
描述解譯 Game Chat 2 音訊資料所需的格式資訊。語法
成員
sample_rate類型:uint32_t 每個聲道應播放或錄製的取樣頻率。 channel_mask
類型:uint32_t 用來覆寫多聲道音訊串流中聲道與喇叭位置指派的聲道遮罩。如需此值的位元與喇叭對應,請參閱 Microsoft Docs 上 WAVEFORMATEXTENSIBLE 結構之 dwChannelMask 成員的描述。若要使用預設對應,請將此值設為 0。 channel_count
類型:uint16_t 音訊資料的聲道數目。 bits_per_sample
類型:uint16_t 每個樣本的位元數。如果此值無法以位元組整除,則會假設所包含的樣本類型已填補位元,使其可以位元組整除。 sample_type
類型:game_chat_sample_type 指定 Game Chat 2 使用的是以整數 (game_chat_sample_type::integer) 或浮點數 (game_chat_sample_type::ieee_float) 表示的脈衝編碼調變 (PCM) 資料。 is_interleaved
類型:bool 旗標,代表多聲道格式的多聲道音訊串流是否為交錯式。 從 Game Chat 2 擷取的音訊一律會標示為交錯式。只有在 game_chat_audio_format::channel_count 大於 1 時,此參數才有意義。
備註
此結構用於描述 Game Chat 2 中編碼前音訊串流、解碼後音訊來源串流和解碼後音訊接收串流的音訊資料格式。下列函式會取得或設定其對應串流物件所使用的game_chat_audio_format:
- pre_encode_audio_stream::get_pre_processed_format
- pre_encode_audio_stream::set_processed_format
- post_decode_audio_source_stream::get_pre_processed_format
- post_decode_audio_sink_stream::set_processed_format
需求
標頭: GameChat2.h 支援的平台: Windows、XBOX One 系列主機和 XBOX Series 主機另請參閱
Game Chat 2 簡介chat_manager
pre_encode_audio_stream
post_decode_audio_sink_stream
post_decode_audio_source_stream
GameChat2 成員
