AudioStreamOggVorbis
繼承: AudioStream < Resource < RefCounted < Object
用於表示 Ogg Vorbis 音訊串流的類別。
說明
AudioStreamOggVorbis 類別是專門用於處理 Ogg Vorbis 檔案格式的 AudioStream。它提供載入與播放 Ogg Vorbis 檔案的功能,並能管理循環與其他播放屬性。此類別隸屬於音訊串流系統的一部分,該系統亦透過 AudioStreamWAV 類別支援 WAV 檔案。
教學
屬性
|
||
|
||
|
||
|
||
|
||
|
方法
load_from_buffer(stream_data: PackedByteArray) static |
|
load_from_file(path: String) static |
屬性說明
There is currently no description for this property. Please help us by contributing one!
There is currently no description for this property. Please help us by contributing one!
There is currently no description for this property. Please help us by contributing one!
如果為 true,音訊播放完畢後會從 loop_offset 指定的位置重新開始。適用於環境聲效與背景音樂。
迴圈後串流重新開始的時間(秒)。
OggPacketSequence packet_sequence 🔗
void set_packet_sequence(value: OggPacketSequence)
OggPacketSequence get_packet_sequence()
包含此串流的原始 Ogg 資料。
Dictionary tags = {} 🔗
void set_tags(value: Dictionary)
Dictionary get_tags()
若在 Ogg Vorbis 資料中找到,則包含使用者自訂的標籤。
常見標籤包括 title、artist、album、tracknumber 與 date(date 沒有統一的日期格式)。
注意: 並非所有檔案都保證具有這些標籤,因此請務必考慮鍵值可能不存在的情況。
方法說明
AudioStreamOggVorbis load_from_buffer(stream_data: PackedByteArray) static 🔗
從指定的緩衝區建立新的 AudioStreamOggVorbis 實例。緩衝區必須包含 Ogg Vorbis 資料。
AudioStreamOggVorbis load_from_file(path: String) static 🔗
從指定的檔案路徑建立新的 AudioStreamOggVorbis 實例。該檔案必須為 Ogg Vorbis 格式。