ResourceImporterOggVorbis
Imports an Ogg Vorbis audio file for playback.
ResourceImporterOggVorbis.swift:22class ResourceImporterOggVorbis
Ogg Vorbis is a lossy audio format, with better audio quality compared to ResourceImporterMP3
at a given bitrate.
In most cases, it’s recommended to use Ogg Vorbis over MP3. However, if you’re using an MP3 sound source with no higher quality source available, then it’s recommended to use the MP3 file directly to avoid double lossy compression.
Ogg Vorbis requires more CPU to decode than ResourceImporterWAV
. If you need to play a lot of simultaneous sounds, it’s recommended to use WAV for those sounds instead, especially if targeting low-end devices.
Superclasses
class ResourceImporter
Base class for resource importers.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
static func loadFromBuffer(PackedByteArray
) -> AudioStreamOggVorbis? This method loads audio data from a PackedByteArray buffer into an AudioStreamOggVorbis object.
static func loadFromFile(path: String
) -> AudioStreamOggVorbis? This method loads audio data from a file into an AudioStreamOggVorbis object. The file path is provided as a string.
class var godotClassName: StringName