Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
AudioStreamOggVorbis¶
继承: AudioStream < Resource < RefCounted < Object
代表 Ogg Vorbis 音频流的类。
描述¶
AudioStreamOggVorbis 类是专用于处理 Ogg Vorbis 文件格式的 AudioStream 类。它提供加载和播放 Ogg Vorbis 文件以及管理循环和其他播放属性的功能。该类是音频流系统的一部分,该系统还通过 AudioStreamWAV 类支持 WAV 系统。
教程¶
属性¶
|
||
|
||
|
||
|
||
|
||
方法¶
load_from_buffer ( PackedByteArray buffer ) static |
|
load_from_file ( String path ) static |
属性说明¶
int bar_beats = 4
目前没有这个属性的描述。请帮我们贡献一个!
int beat_count = 0
目前没有这个属性的描述。请帮我们贡献一个!
float bpm = 0.0
目前没有这个属性的描述。请帮我们贡献一个!
bool loop = false
如果为 true
,则音频播放完成后将从 loop_offset 指定的位置再次播放。可用于环境声音和背景音乐。
float loop_offset = 0.0
循环时,流开始的时间,单位为秒。
OggPacketSequence packet_sequence
void set_packet_sequence ( OggPacketSequence value )
OggPacketSequence get_packet_sequence ( )
包含用于这个流的原始 Ogg 数据。
方法说明¶
AudioStreamOggVorbis load_from_buffer ( PackedByteArray buffer ) static
从给定缓冲区创建一个新的 AudioStreamOggVorbis 实例。缓冲区必须包含 Ogg Vorbis 数据。
AudioStreamOggVorbis load_from_file ( String path ) static
从给定文件路径创建新的 AudioStreamOggVorbis 实例。文件必须采用 Ogg Vorbis 格式。