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 格式。